github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/grafana/workspace.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package grafana
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an Amazon Managed Grafana workspace resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic configuration
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"encoding/json"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/grafana"
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
    38  //				"Version": "2012-10-17",
    39  //				"Statement": []map[string]interface{}{
    40  //					map[string]interface{}{
    41  //						"Action": "sts:AssumeRole",
    42  //						"Effect": "Allow",
    43  //						"Sid":    "",
    44  //						"Principal": map[string]interface{}{
    45  //							"Service": "grafana.amazonaws.com",
    46  //						},
    47  //					},
    48  //				},
    49  //			})
    50  //			if err != nil {
    51  //				return err
    52  //			}
    53  //			json0 := string(tmpJSON0)
    54  //			assume, err := iam.NewRole(ctx, "assume", &iam.RoleArgs{
    55  //				Name:             pulumi.String("grafana-assume"),
    56  //				AssumeRolePolicy: pulumi.String(json0),
    57  //			})
    58  //			if err != nil {
    59  //				return err
    60  //			}
    61  //			_, err = grafana.NewWorkspace(ctx, "example", &grafana.WorkspaceArgs{
    62  //				AccountAccessType: pulumi.String("CURRENT_ACCOUNT"),
    63  //				AuthenticationProviders: pulumi.StringArray{
    64  //					pulumi.String("SAML"),
    65  //				},
    66  //				PermissionType: pulumi.String("SERVICE_MANAGED"),
    67  //				RoleArn:        assume.Arn,
    68  //			})
    69  //			if err != nil {
    70  //				return err
    71  //			}
    72  //			return nil
    73  //		})
    74  //	}
    75  //
    76  // ```
    77  // <!--End PulumiCodeChooser -->
    78  //
    79  // ## Import
    80  //
    81  // Using `pulumi import`, import Grafana Workspace using the workspace's `id`. For example:
    82  //
    83  // ```sh
    84  // $ pulumi import aws:grafana/workspace:Workspace example g-2054c75a02
    85  // ```
    86  type Workspace struct {
    87  	pulumi.CustomResourceState
    88  
    89  	// The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
    90  	AccountAccessType pulumi.StringOutput `pulumi:"accountAccessType"`
    91  	// The Amazon Resource Name (ARN) of the Grafana workspace.
    92  	Arn pulumi.StringOutput `pulumi:"arn"`
    93  	// The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
    94  	AuthenticationProviders pulumi.StringArrayOutput `pulumi:"authenticationProviders"`
    95  	// 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).
    96  	Configuration pulumi.StringOutput `pulumi:"configuration"`
    97  	// The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
    98  	DataSources pulumi.StringArrayOutput `pulumi:"dataSources"`
    99  	// The workspace description.
   100  	Description pulumi.StringPtrOutput `pulumi:"description"`
   101  	// The endpoint of the Grafana workspace.
   102  	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
   103  	// Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   104  	GrafanaVersion pulumi.StringOutput `pulumi:"grafanaVersion"`
   105  	// The Grafana workspace name.
   106  	Name pulumi.StringOutput `pulumi:"name"`
   107  	// Configuration for network access to your workspace.See Network Access Control below.
   108  	NetworkAccessControl WorkspaceNetworkAccessControlPtrOutput `pulumi:"networkAccessControl"`
   109  	// 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`.
   110  	NotificationDestinations pulumi.StringArrayOutput `pulumi:"notificationDestinations"`
   111  	// The role name that the workspace uses to access resources through Amazon Organizations.
   112  	OrganizationRoleName pulumi.StringPtrOutput `pulumi:"organizationRoleName"`
   113  	// The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   114  	OrganizationalUnits pulumi.StringArrayOutput `pulumi:"organizationalUnits"`
   115  	// 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.
   116  	//
   117  	// The following arguments are optional:
   118  	PermissionType pulumi.StringOutput `pulumi:"permissionType"`
   119  	// The IAM role ARN that the workspace assumes.
   120  	RoleArn                 pulumi.StringPtrOutput `pulumi:"roleArn"`
   121  	SamlConfigurationStatus pulumi.StringOutput    `pulumi:"samlConfigurationStatus"`
   122  	// The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   123  	StackSetName pulumi.StringPtrOutput `pulumi:"stackSetName"`
   124  	// 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
   125  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   126  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   127  	//
   128  	// Deprecated: Please use `tags` instead.
   129  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   130  	// The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   131  	VpcConfiguration WorkspaceVpcConfigurationPtrOutput `pulumi:"vpcConfiguration"`
   132  }
   133  
   134  // NewWorkspace registers a new resource with the given unique name, arguments, and options.
   135  func NewWorkspace(ctx *pulumi.Context,
   136  	name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error) {
   137  	if args == nil {
   138  		return nil, errors.New("missing one or more required arguments")
   139  	}
   140  
   141  	if args.AccountAccessType == nil {
   142  		return nil, errors.New("invalid value for required argument 'AccountAccessType'")
   143  	}
   144  	if args.AuthenticationProviders == nil {
   145  		return nil, errors.New("invalid value for required argument 'AuthenticationProviders'")
   146  	}
   147  	if args.PermissionType == nil {
   148  		return nil, errors.New("invalid value for required argument 'PermissionType'")
   149  	}
   150  	opts = internal.PkgResourceDefaultOpts(opts)
   151  	var resource Workspace
   152  	err := ctx.RegisterResource("aws:grafana/workspace:Workspace", name, args, &resource, opts...)
   153  	if err != nil {
   154  		return nil, err
   155  	}
   156  	return &resource, nil
   157  }
   158  
   159  // GetWorkspace gets an existing Workspace resource's state with the given name, ID, and optional
   160  // state properties that are used to uniquely qualify the lookup (nil if not required).
   161  func GetWorkspace(ctx *pulumi.Context,
   162  	name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) {
   163  	var resource Workspace
   164  	err := ctx.ReadResource("aws:grafana/workspace:Workspace", name, id, state, &resource, opts...)
   165  	if err != nil {
   166  		return nil, err
   167  	}
   168  	return &resource, nil
   169  }
   170  
   171  // Input properties used for looking up and filtering Workspace resources.
   172  type workspaceState struct {
   173  	// The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
   174  	AccountAccessType *string `pulumi:"accountAccessType"`
   175  	// The Amazon Resource Name (ARN) of the Grafana workspace.
   176  	Arn *string `pulumi:"arn"`
   177  	// The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
   178  	AuthenticationProviders []string `pulumi:"authenticationProviders"`
   179  	// 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).
   180  	Configuration *string `pulumi:"configuration"`
   181  	// The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
   182  	DataSources []string `pulumi:"dataSources"`
   183  	// The workspace description.
   184  	Description *string `pulumi:"description"`
   185  	// The endpoint of the Grafana workspace.
   186  	Endpoint *string `pulumi:"endpoint"`
   187  	// Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   188  	GrafanaVersion *string `pulumi:"grafanaVersion"`
   189  	// The Grafana workspace name.
   190  	Name *string `pulumi:"name"`
   191  	// Configuration for network access to your workspace.See Network Access Control below.
   192  	NetworkAccessControl *WorkspaceNetworkAccessControl `pulumi:"networkAccessControl"`
   193  	// 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`.
   194  	NotificationDestinations []string `pulumi:"notificationDestinations"`
   195  	// The role name that the workspace uses to access resources through Amazon Organizations.
   196  	OrganizationRoleName *string `pulumi:"organizationRoleName"`
   197  	// The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   198  	OrganizationalUnits []string `pulumi:"organizationalUnits"`
   199  	// 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.
   200  	//
   201  	// The following arguments are optional:
   202  	PermissionType *string `pulumi:"permissionType"`
   203  	// The IAM role ARN that the workspace assumes.
   204  	RoleArn                 *string `pulumi:"roleArn"`
   205  	SamlConfigurationStatus *string `pulumi:"samlConfigurationStatus"`
   206  	// The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   207  	StackSetName *string `pulumi:"stackSetName"`
   208  	// 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
   209  	Tags map[string]string `pulumi:"tags"`
   210  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   211  	//
   212  	// Deprecated: Please use `tags` instead.
   213  	TagsAll map[string]string `pulumi:"tagsAll"`
   214  	// The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   215  	VpcConfiguration *WorkspaceVpcConfiguration `pulumi:"vpcConfiguration"`
   216  }
   217  
   218  type WorkspaceState struct {
   219  	// The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
   220  	AccountAccessType pulumi.StringPtrInput
   221  	// The Amazon Resource Name (ARN) of the Grafana workspace.
   222  	Arn pulumi.StringPtrInput
   223  	// The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
   224  	AuthenticationProviders pulumi.StringArrayInput
   225  	// 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).
   226  	Configuration pulumi.StringPtrInput
   227  	// The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
   228  	DataSources pulumi.StringArrayInput
   229  	// The workspace description.
   230  	Description pulumi.StringPtrInput
   231  	// The endpoint of the Grafana workspace.
   232  	Endpoint pulumi.StringPtrInput
   233  	// Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   234  	GrafanaVersion pulumi.StringPtrInput
   235  	// The Grafana workspace name.
   236  	Name pulumi.StringPtrInput
   237  	// Configuration for network access to your workspace.See Network Access Control below.
   238  	NetworkAccessControl WorkspaceNetworkAccessControlPtrInput
   239  	// 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`.
   240  	NotificationDestinations pulumi.StringArrayInput
   241  	// The role name that the workspace uses to access resources through Amazon Organizations.
   242  	OrganizationRoleName pulumi.StringPtrInput
   243  	// The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   244  	OrganizationalUnits pulumi.StringArrayInput
   245  	// 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.
   246  	//
   247  	// The following arguments are optional:
   248  	PermissionType pulumi.StringPtrInput
   249  	// The IAM role ARN that the workspace assumes.
   250  	RoleArn                 pulumi.StringPtrInput
   251  	SamlConfigurationStatus pulumi.StringPtrInput
   252  	// The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   253  	StackSetName pulumi.StringPtrInput
   254  	// 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
   255  	Tags pulumi.StringMapInput
   256  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   257  	//
   258  	// Deprecated: Please use `tags` instead.
   259  	TagsAll pulumi.StringMapInput
   260  	// The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   261  	VpcConfiguration WorkspaceVpcConfigurationPtrInput
   262  }
   263  
   264  func (WorkspaceState) ElementType() reflect.Type {
   265  	return reflect.TypeOf((*workspaceState)(nil)).Elem()
   266  }
   267  
   268  type workspaceArgs struct {
   269  	// The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
   270  	AccountAccessType string `pulumi:"accountAccessType"`
   271  	// The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
   272  	AuthenticationProviders []string `pulumi:"authenticationProviders"`
   273  	// 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).
   274  	Configuration *string `pulumi:"configuration"`
   275  	// The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
   276  	DataSources []string `pulumi:"dataSources"`
   277  	// The workspace description.
   278  	Description *string `pulumi:"description"`
   279  	// Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   280  	GrafanaVersion *string `pulumi:"grafanaVersion"`
   281  	// The Grafana workspace name.
   282  	Name *string `pulumi:"name"`
   283  	// Configuration for network access to your workspace.See Network Access Control below.
   284  	NetworkAccessControl *WorkspaceNetworkAccessControl `pulumi:"networkAccessControl"`
   285  	// 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`.
   286  	NotificationDestinations []string `pulumi:"notificationDestinations"`
   287  	// The role name that the workspace uses to access resources through Amazon Organizations.
   288  	OrganizationRoleName *string `pulumi:"organizationRoleName"`
   289  	// The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   290  	OrganizationalUnits []string `pulumi:"organizationalUnits"`
   291  	// 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.
   292  	//
   293  	// The following arguments are optional:
   294  	PermissionType string `pulumi:"permissionType"`
   295  	// The IAM role ARN that the workspace assumes.
   296  	RoleArn *string `pulumi:"roleArn"`
   297  	// The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   298  	StackSetName *string `pulumi:"stackSetName"`
   299  	// 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
   300  	Tags map[string]string `pulumi:"tags"`
   301  	// The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   302  	VpcConfiguration *WorkspaceVpcConfiguration `pulumi:"vpcConfiguration"`
   303  }
   304  
   305  // The set of arguments for constructing a Workspace resource.
   306  type WorkspaceArgs struct {
   307  	// The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
   308  	AccountAccessType pulumi.StringInput
   309  	// The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
   310  	AuthenticationProviders pulumi.StringArrayInput
   311  	// 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).
   312  	Configuration pulumi.StringPtrInput
   313  	// The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
   314  	DataSources pulumi.StringArrayInput
   315  	// The workspace description.
   316  	Description pulumi.StringPtrInput
   317  	// Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   318  	GrafanaVersion pulumi.StringPtrInput
   319  	// The Grafana workspace name.
   320  	Name pulumi.StringPtrInput
   321  	// Configuration for network access to your workspace.See Network Access Control below.
   322  	NetworkAccessControl WorkspaceNetworkAccessControlPtrInput
   323  	// 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`.
   324  	NotificationDestinations pulumi.StringArrayInput
   325  	// The role name that the workspace uses to access resources through Amazon Organizations.
   326  	OrganizationRoleName pulumi.StringPtrInput
   327  	// The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   328  	OrganizationalUnits pulumi.StringArrayInput
   329  	// 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.
   330  	//
   331  	// The following arguments are optional:
   332  	PermissionType pulumi.StringInput
   333  	// The IAM role ARN that the workspace assumes.
   334  	RoleArn pulumi.StringPtrInput
   335  	// The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   336  	StackSetName pulumi.StringPtrInput
   337  	// 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
   338  	Tags pulumi.StringMapInput
   339  	// The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   340  	VpcConfiguration WorkspaceVpcConfigurationPtrInput
   341  }
   342  
   343  func (WorkspaceArgs) ElementType() reflect.Type {
   344  	return reflect.TypeOf((*workspaceArgs)(nil)).Elem()
   345  }
   346  
   347  type WorkspaceInput interface {
   348  	pulumi.Input
   349  
   350  	ToWorkspaceOutput() WorkspaceOutput
   351  	ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput
   352  }
   353  
   354  func (*Workspace) ElementType() reflect.Type {
   355  	return reflect.TypeOf((**Workspace)(nil)).Elem()
   356  }
   357  
   358  func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput {
   359  	return i.ToWorkspaceOutputWithContext(context.Background())
   360  }
   361  
   362  func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput {
   363  	return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput)
   364  }
   365  
   366  // WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values.
   367  // You can construct a concrete instance of `WorkspaceArrayInput` via:
   368  //
   369  //	WorkspaceArray{ WorkspaceArgs{...} }
   370  type WorkspaceArrayInput interface {
   371  	pulumi.Input
   372  
   373  	ToWorkspaceArrayOutput() WorkspaceArrayOutput
   374  	ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput
   375  }
   376  
   377  type WorkspaceArray []WorkspaceInput
   378  
   379  func (WorkspaceArray) ElementType() reflect.Type {
   380  	return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
   381  }
   382  
   383  func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
   384  	return i.ToWorkspaceArrayOutputWithContext(context.Background())
   385  }
   386  
   387  func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
   388  	return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput)
   389  }
   390  
   391  // WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values.
   392  // You can construct a concrete instance of `WorkspaceMapInput` via:
   393  //
   394  //	WorkspaceMap{ "key": WorkspaceArgs{...} }
   395  type WorkspaceMapInput interface {
   396  	pulumi.Input
   397  
   398  	ToWorkspaceMapOutput() WorkspaceMapOutput
   399  	ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput
   400  }
   401  
   402  type WorkspaceMap map[string]WorkspaceInput
   403  
   404  func (WorkspaceMap) ElementType() reflect.Type {
   405  	return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem()
   406  }
   407  
   408  func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput {
   409  	return i.ToWorkspaceMapOutputWithContext(context.Background())
   410  }
   411  
   412  func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput {
   413  	return pulumi.ToOutputWithContext(ctx, i).(WorkspaceMapOutput)
   414  }
   415  
   416  type WorkspaceOutput struct{ *pulumi.OutputState }
   417  
   418  func (WorkspaceOutput) ElementType() reflect.Type {
   419  	return reflect.TypeOf((**Workspace)(nil)).Elem()
   420  }
   421  
   422  func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput {
   423  	return o
   424  }
   425  
   426  func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput {
   427  	return o
   428  }
   429  
   430  // The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
   431  func (o WorkspaceOutput) AccountAccessType() pulumi.StringOutput {
   432  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.AccountAccessType }).(pulumi.StringOutput)
   433  }
   434  
   435  // The Amazon Resource Name (ARN) of the Grafana workspace.
   436  func (o WorkspaceOutput) Arn() pulumi.StringOutput {
   437  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   438  }
   439  
   440  // The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
   441  func (o WorkspaceOutput) AuthenticationProviders() pulumi.StringArrayOutput {
   442  	return o.ApplyT(func(v *Workspace) pulumi.StringArrayOutput { return v.AuthenticationProviders }).(pulumi.StringArrayOutput)
   443  }
   444  
   445  // 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).
   446  func (o WorkspaceOutput) Configuration() pulumi.StringOutput {
   447  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Configuration }).(pulumi.StringOutput)
   448  }
   449  
   450  // The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
   451  func (o WorkspaceOutput) DataSources() pulumi.StringArrayOutput {
   452  	return o.ApplyT(func(v *Workspace) pulumi.StringArrayOutput { return v.DataSources }).(pulumi.StringArrayOutput)
   453  }
   454  
   455  // The workspace description.
   456  func (o WorkspaceOutput) Description() pulumi.StringPtrOutput {
   457  	return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   458  }
   459  
   460  // The endpoint of the Grafana workspace.
   461  func (o WorkspaceOutput) Endpoint() pulumi.StringOutput {
   462  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
   463  }
   464  
   465  // Specifies the version of Grafana to support in the new workspace. Supported values are `8.4` and `9.4`. If not specified, defaults to `8.4`.
   466  func (o WorkspaceOutput) GrafanaVersion() pulumi.StringOutput {
   467  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.GrafanaVersion }).(pulumi.StringOutput)
   468  }
   469  
   470  // The Grafana workspace name.
   471  func (o WorkspaceOutput) Name() pulumi.StringOutput {
   472  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   473  }
   474  
   475  // Configuration for network access to your workspace.See Network Access Control below.
   476  func (o WorkspaceOutput) NetworkAccessControl() WorkspaceNetworkAccessControlPtrOutput {
   477  	return o.ApplyT(func(v *Workspace) WorkspaceNetworkAccessControlPtrOutput { return v.NetworkAccessControl }).(WorkspaceNetworkAccessControlPtrOutput)
   478  }
   479  
   480  // 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`.
   481  func (o WorkspaceOutput) NotificationDestinations() pulumi.StringArrayOutput {
   482  	return o.ApplyT(func(v *Workspace) pulumi.StringArrayOutput { return v.NotificationDestinations }).(pulumi.StringArrayOutput)
   483  }
   484  
   485  // The role name that the workspace uses to access resources through Amazon Organizations.
   486  func (o WorkspaceOutput) OrganizationRoleName() pulumi.StringPtrOutput {
   487  	return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.OrganizationRoleName }).(pulumi.StringPtrOutput)
   488  }
   489  
   490  // The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
   491  func (o WorkspaceOutput) OrganizationalUnits() pulumi.StringArrayOutput {
   492  	return o.ApplyT(func(v *Workspace) pulumi.StringArrayOutput { return v.OrganizationalUnits }).(pulumi.StringArrayOutput)
   493  }
   494  
   495  // 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.
   496  //
   497  // The following arguments are optional:
   498  func (o WorkspaceOutput) PermissionType() pulumi.StringOutput {
   499  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.PermissionType }).(pulumi.StringOutput)
   500  }
   501  
   502  // The IAM role ARN that the workspace assumes.
   503  func (o WorkspaceOutput) RoleArn() pulumi.StringPtrOutput {
   504  	return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.RoleArn }).(pulumi.StringPtrOutput)
   505  }
   506  
   507  func (o WorkspaceOutput) SamlConfigurationStatus() pulumi.StringOutput {
   508  	return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.SamlConfigurationStatus }).(pulumi.StringOutput)
   509  }
   510  
   511  // The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
   512  func (o WorkspaceOutput) StackSetName() pulumi.StringPtrOutput {
   513  	return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.StackSetName }).(pulumi.StringPtrOutput)
   514  }
   515  
   516  // 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
   517  func (o WorkspaceOutput) Tags() pulumi.StringMapOutput {
   518  	return o.ApplyT(func(v *Workspace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   519  }
   520  
   521  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   522  //
   523  // Deprecated: Please use `tags` instead.
   524  func (o WorkspaceOutput) TagsAll() pulumi.StringMapOutput {
   525  	return o.ApplyT(func(v *Workspace) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   526  }
   527  
   528  // The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
   529  func (o WorkspaceOutput) VpcConfiguration() WorkspaceVpcConfigurationPtrOutput {
   530  	return o.ApplyT(func(v *Workspace) WorkspaceVpcConfigurationPtrOutput { return v.VpcConfiguration }).(WorkspaceVpcConfigurationPtrOutput)
   531  }
   532  
   533  type WorkspaceArrayOutput struct{ *pulumi.OutputState }
   534  
   535  func (WorkspaceArrayOutput) ElementType() reflect.Type {
   536  	return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
   537  }
   538  
   539  func (o WorkspaceArrayOutput) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
   540  	return o
   541  }
   542  
   543  func (o WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
   544  	return o
   545  }
   546  
   547  func (o WorkspaceArrayOutput) Index(i pulumi.IntInput) WorkspaceOutput {
   548  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workspace {
   549  		return vs[0].([]*Workspace)[vs[1].(int)]
   550  	}).(WorkspaceOutput)
   551  }
   552  
   553  type WorkspaceMapOutput struct{ *pulumi.OutputState }
   554  
   555  func (WorkspaceMapOutput) ElementType() reflect.Type {
   556  	return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem()
   557  }
   558  
   559  func (o WorkspaceMapOutput) ToWorkspaceMapOutput() WorkspaceMapOutput {
   560  	return o
   561  }
   562  
   563  func (o WorkspaceMapOutput) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput {
   564  	return o
   565  }
   566  
   567  func (o WorkspaceMapOutput) MapIndex(k pulumi.StringInput) WorkspaceOutput {
   568  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workspace {
   569  		return vs[0].(map[string]*Workspace)[vs[1].(string)]
   570  	}).(WorkspaceOutput)
   571  }
   572  
   573  func init() {
   574  	pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceInput)(nil)).Elem(), &Workspace{})
   575  	pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceArrayInput)(nil)).Elem(), WorkspaceArray{})
   576  	pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceMapInput)(nil)).Elem(), WorkspaceMap{})
   577  	pulumi.RegisterOutputType(WorkspaceOutput{})
   578  	pulumi.RegisterOutputType(WorkspaceArrayOutput{})
   579  	pulumi.RegisterOutputType(WorkspaceMapOutput{})
   580  }