1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. healthcare
  5. Workspace
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.healthcare.Workspace

Explore with Pulumi AI

A Data Mapper workspace is used to configure Data Mapper access, permissions and data sources for mapping clinical patient data to the FHIR standard.

To get more information about Workspace, see:

Example Usage

Healthcare Workspace Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const dataset = new gcp.healthcare.Dataset("dataset", {
    name: "example-dataset",
    location: "us-central1",
});
const _default = new gcp.healthcare.Workspace("default", {
    name: "example-dm-workspace",
    dataset: dataset.id,
    settings: {
        dataProjectIds: ["example-data-source-project-id"],
    },
    labels: {
        label1: "labelvalue1",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

dataset = gcp.healthcare.Dataset("dataset",
    name="example-dataset",
    location="us-central1")
default = gcp.healthcare.Workspace("default",
    name="example-dm-workspace",
    dataset=dataset.id,
    settings={
        "data_project_ids": ["example-data-source-project-id"],
    },
    labels={
        "label1": "labelvalue1",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/healthcare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		dataset, err := healthcare.NewDataset(ctx, "dataset", &healthcare.DatasetArgs{
			Name:     pulumi.String("example-dataset"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = healthcare.NewWorkspace(ctx, "default", &healthcare.WorkspaceArgs{
			Name:    pulumi.String("example-dm-workspace"),
			Dataset: dataset.ID(),
			Settings: &healthcare.WorkspaceSettingsArgs{
				DataProjectIds: pulumi.StringArray{
					pulumi.String("example-data-source-project-id"),
				},
			},
			Labels: pulumi.StringMap{
				"label1": pulumi.String("labelvalue1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var dataset = new Gcp.Healthcare.Dataset("dataset", new()
    {
        Name = "example-dataset",
        Location = "us-central1",
    });

    var @default = new Gcp.Healthcare.Workspace("default", new()
    {
        Name = "example-dm-workspace",
        Dataset = dataset.Id,
        Settings = new Gcp.Healthcare.Inputs.WorkspaceSettingsArgs
        {
            DataProjectIds = new[]
            {
                "example-data-source-project-id",
            },
        },
        Labels = 
        {
            { "label1", "labelvalue1" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.healthcare.Dataset;
import com.pulumi.gcp.healthcare.DatasetArgs;
import com.pulumi.gcp.healthcare.Workspace;
import com.pulumi.gcp.healthcare.WorkspaceArgs;
import com.pulumi.gcp.healthcare.inputs.WorkspaceSettingsArgs;
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 dataset = new Dataset("dataset", DatasetArgs.builder()
            .name("example-dataset")
            .location("us-central1")
            .build());

        var default_ = new Workspace("default", WorkspaceArgs.builder()
            .name("example-dm-workspace")
            .dataset(dataset.id())
            .settings(WorkspaceSettingsArgs.builder()
                .dataProjectIds("example-data-source-project-id")
                .build())
            .labels(Map.of("label1", "labelvalue1"))
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:healthcare:Workspace
    properties:
      name: example-dm-workspace
      dataset: ${dataset.id}
      settings:
        dataProjectIds:
          - example-data-source-project-id
      labels:
        label1: labelvalue1
  dataset:
    type: gcp:healthcare:Dataset
    properties:
      name: example-dataset
      location: us-central1
Copy

Create Workspace Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Workspace(name: string, args: WorkspaceArgs, opts?: CustomResourceOptions);
@overload
def Workspace(resource_name: str,
              args: WorkspaceArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Workspace(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              dataset: Optional[str] = None,
              settings: Optional[WorkspaceSettingsArgs] = None,
              labels: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None)
func NewWorkspace(ctx *Context, name string, args WorkspaceArgs, opts ...ResourceOption) (*Workspace, error)
public Workspace(string name, WorkspaceArgs args, CustomResourceOptions? opts = null)
public Workspace(String name, WorkspaceArgs args)
public Workspace(String name, WorkspaceArgs args, CustomResourceOptions options)
type: gcp:healthcare:Workspace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WorkspaceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WorkspaceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var workspaceResource = new Gcp.Healthcare.Workspace("workspaceResource", new()
{
    Dataset = "string",
    Settings = new Gcp.Healthcare.Inputs.WorkspaceSettingsArgs
    {
        DataProjectIds = new[]
        {
            "string",
        },
    },
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := healthcare.NewWorkspace(ctx, "workspaceResource", &healthcare.WorkspaceArgs{
	Dataset: pulumi.String("string"),
	Settings: &healthcare.WorkspaceSettingsArgs{
		DataProjectIds: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var workspaceResource = new Workspace("workspaceResource", WorkspaceArgs.builder()
    .dataset("string")
    .settings(WorkspaceSettingsArgs.builder()
        .dataProjectIds("string")
        .build())
    .labels(Map.of("string", "string"))
    .name("string")
    .build());
Copy
workspace_resource = gcp.healthcare.Workspace("workspaceResource",
    dataset="string",
    settings={
        "data_project_ids": ["string"],
    },
    labels={
        "string": "string",
    },
    name="string")
Copy
const workspaceResource = new gcp.healthcare.Workspace("workspaceResource", {
    dataset: "string",
    settings: {
        dataProjectIds: ["string"],
    },
    labels: {
        string: "string",
    },
    name: "string",
});
Copy
type: gcp:healthcare:Workspace
properties:
    dataset: string
    labels:
        string: string
    name: string
    settings:
        dataProjectIds:
            - string
Copy

Workspace Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Workspace resource accepts the following input properties:

Dataset
This property is required.
Changes to this property will trigger replacement.
string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
Settings This property is required. WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
Labels Dictionary<string, string>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
Dataset
This property is required.
Changes to this property will trigger replacement.
string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
Settings This property is required. WorkspaceSettingsArgs
Settings associated with this workspace. Structure is documented below.
Labels map[string]string
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
dataset
This property is required.
Changes to this property will trigger replacement.
String
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
settings This property is required. WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
labels Map<String,String>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. String
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
dataset
This property is required.
Changes to this property will trigger replacement.
string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
settings This property is required. WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
labels {[key: string]: string}
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
dataset
This property is required.
Changes to this property will trigger replacement.
str
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
settings This property is required. WorkspaceSettingsArgs
Settings associated with this workspace. Structure is documented below.
labels Mapping[str, str]
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. str
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
dataset
This property is required.
Changes to this property will trigger replacement.
String
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
settings This property is required. Property Map
Settings associated with this workspace. Structure is documented below.
labels Map<String>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. String
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'

Outputs

All input properties are implicitly available as output properties. Additionally, the Workspace resource produces the following output properties:

EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id string
The provider-assigned unique ID for this managed resource.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id str
The provider-assigned unique ID for this managed resource.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.

Look up Existing Workspace Resource

Get an existing Workspace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: WorkspaceState, opts?: CustomResourceOptions): Workspace
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dataset: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        settings: Optional[WorkspaceSettingsArgs] = None) -> Workspace
func GetWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceState, opts ...ResourceOption) (*Workspace, error)
public static Workspace Get(string name, Input<string> id, WorkspaceState? state, CustomResourceOptions? opts = null)
public static Workspace get(String name, Output<String> id, WorkspaceState state, CustomResourceOptions options)
resources:  _:    type: gcp:healthcare:Workspace    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Dataset Changes to this property will trigger replacement. string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Labels Dictionary<string, string>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
Settings WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
Dataset Changes to this property will trigger replacement. string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Labels map[string]string
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
Settings WorkspaceSettingsArgs
Settings associated with this workspace. Structure is documented below.
dataset Changes to this property will trigger replacement. String
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Map<String,String>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. String
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
settings WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
dataset Changes to this property will trigger replacement. string
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels {[key: string]: string}
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. string
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
settings WorkspaceSettings
Settings associated with this workspace. Structure is documented below.
dataset Changes to this property will trigger replacement. str
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Mapping[str, str]
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. str
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
settings WorkspaceSettingsArgs
Settings associated with this workspace. Structure is documented below.
dataset Changes to this property will trigger replacement. String
Identifies the dataset addressed by this request. Must be in the format 'projects/{project}/locations/{location}/datasets/{dataset}'
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Map<String>
The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
name Changes to this property will trigger replacement. String
The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
settings Property Map
Settings associated with this workspace. Structure is documented below.

Supporting Types

WorkspaceSettings
, WorkspaceSettingsArgs

DataProjectIds This property is required. List<string>
Project IDs for data projects hosted in a workspace.


DataProjectIds This property is required. []string
Project IDs for data projects hosted in a workspace.


dataProjectIds This property is required. List<String>
Project IDs for data projects hosted in a workspace.


dataProjectIds This property is required. string[]
Project IDs for data projects hosted in a workspace.


data_project_ids This property is required. Sequence[str]
Project IDs for data projects hosted in a workspace.


dataProjectIds This property is required. List<String>
Project IDs for data projects hosted in a workspace.


Import

Workspace can be imported using any of these accepted formats:

  • {{dataset}}/dataMapperWorkspaces/{{name}}

When using the pulumi import command, Workspace can be imported using one of the formats above. For example:

$ pulumi import gcp:healthcare/workspace:Workspace default {{dataset}}/dataMapperWorkspaces/{{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.