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

gcp.healthcare.ConsentStore

Explore with Pulumi AI

The Consent Management API is a tool for tracking user consents and the documentation associated with the consents.

To get more information about ConsentStore, see:

Example Usage

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

const dataset = new gcp.healthcare.Dataset("dataset", {
    location: "us-central1",
    name: "my-dataset",
});
const my_consent = new gcp.healthcare.ConsentStore("my-consent", {
    dataset: dataset.id,
    name: "my-consent-store",
});
Copy
import pulumi
import pulumi_gcp as gcp

dataset = gcp.healthcare.Dataset("dataset",
    location="us-central1",
    name="my-dataset")
my_consent = gcp.healthcare.ConsentStore("my-consent",
    dataset=dataset.id,
    name="my-consent-store")
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{
			Location: pulumi.String("us-central1"),
			Name:     pulumi.String("my-dataset"),
		})
		if err != nil {
			return err
		}
		_, err = healthcare.NewConsentStore(ctx, "my-consent", &healthcare.ConsentStoreArgs{
			Dataset: dataset.ID(),
			Name:    pulumi.String("my-consent-store"),
		})
		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()
    {
        Location = "us-central1",
        Name = "my-dataset",
    });

    var my_consent = new Gcp.Healthcare.ConsentStore("my-consent", new()
    {
        Dataset = dataset.Id,
        Name = "my-consent-store",
    });

});
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.ConsentStore;
import com.pulumi.gcp.healthcare.ConsentStoreArgs;
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()
            .location("us-central1")
            .name("my-dataset")
            .build());

        var my_consent = new ConsentStore("my-consent", ConsentStoreArgs.builder()
            .dataset(dataset.id())
            .name("my-consent-store")
            .build());

    }
}
Copy
resources:
  dataset:
    type: gcp:healthcare:Dataset
    properties:
      location: us-central1
      name: my-dataset
  my-consent:
    type: gcp:healthcare:ConsentStore
    properties:
      dataset: ${dataset.id}
      name: my-consent-store
Copy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const dataset = new gcp.healthcare.Dataset("dataset", {
    location: "us-central1",
    name: "my-dataset",
});
const my_consent = new gcp.healthcare.ConsentStore("my-consent", {
    dataset: dataset.id,
    name: "my-consent-store",
    enableConsentCreateOnUpdate: true,
    defaultConsentTtl: "90000s",
    labels: {
        label1: "labelvalue1",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

dataset = gcp.healthcare.Dataset("dataset",
    location="us-central1",
    name="my-dataset")
my_consent = gcp.healthcare.ConsentStore("my-consent",
    dataset=dataset.id,
    name="my-consent-store",
    enable_consent_create_on_update=True,
    default_consent_ttl="90000s",
    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{
			Location: pulumi.String("us-central1"),
			Name:     pulumi.String("my-dataset"),
		})
		if err != nil {
			return err
		}
		_, err = healthcare.NewConsentStore(ctx, "my-consent", &healthcare.ConsentStoreArgs{
			Dataset:                     dataset.ID(),
			Name:                        pulumi.String("my-consent-store"),
			EnableConsentCreateOnUpdate: pulumi.Bool(true),
			DefaultConsentTtl:           pulumi.String("90000s"),
			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()
    {
        Location = "us-central1",
        Name = "my-dataset",
    });

    var my_consent = new Gcp.Healthcare.ConsentStore("my-consent", new()
    {
        Dataset = dataset.Id,
        Name = "my-consent-store",
        EnableConsentCreateOnUpdate = true,
        DefaultConsentTtl = "90000s",
        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.ConsentStore;
import com.pulumi.gcp.healthcare.ConsentStoreArgs;
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()
            .location("us-central1")
            .name("my-dataset")
            .build());

        var my_consent = new ConsentStore("my-consent", ConsentStoreArgs.builder()
            .dataset(dataset.id())
            .name("my-consent-store")
            .enableConsentCreateOnUpdate(true)
            .defaultConsentTtl("90000s")
            .labels(Map.of("label1", "labelvalue1"))
            .build());

    }
}
Copy
resources:
  dataset:
    type: gcp:healthcare:Dataset
    properties:
      location: us-central1
      name: my-dataset
  my-consent:
    type: gcp:healthcare:ConsentStore
    properties:
      dataset: ${dataset.id}
      name: my-consent-store
      enableConsentCreateOnUpdate: true
      defaultConsentTtl: 90000s
      labels:
        label1: labelvalue1
Copy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const dataset = new gcp.healthcare.Dataset("dataset", {
    location: "us-central1",
    name: "my-dataset",
});
const my_consent = new gcp.healthcare.ConsentStore("my-consent", {
    dataset: dataset.id,
    name: "my-consent-store",
});
const test_account = new gcp.serviceaccount.Account("test-account", {
    accountId: "my-account",
    displayName: "Test Service Account",
});
const test_iam = new gcp.healthcare.ConsentStoreIamMember("test-iam", {
    dataset: dataset.id,
    consentStoreId: my_consent.name,
    role: "roles/editor",
    member: pulumi.interpolate`serviceAccount:${test_account.email}`,
});
Copy
import pulumi
import pulumi_gcp as gcp

dataset = gcp.healthcare.Dataset("dataset",
    location="us-central1",
    name="my-dataset")
my_consent = gcp.healthcare.ConsentStore("my-consent",
    dataset=dataset.id,
    name="my-consent-store")
test_account = gcp.serviceaccount.Account("test-account",
    account_id="my-account",
    display_name="Test Service Account")
test_iam = gcp.healthcare.ConsentStoreIamMember("test-iam",
    dataset=dataset.id,
    consent_store_id=my_consent.name,
    role="roles/editor",
    member=test_account.email.apply(lambda email: f"serviceAccount:{email}"))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/healthcare"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
	"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{
			Location: pulumi.String("us-central1"),
			Name:     pulumi.String("my-dataset"),
		})
		if err != nil {
			return err
		}
		my_consent, err := healthcare.NewConsentStore(ctx, "my-consent", &healthcare.ConsentStoreArgs{
			Dataset: dataset.ID(),
			Name:    pulumi.String("my-consent-store"),
		})
		if err != nil {
			return err
		}
		test_account, err := serviceaccount.NewAccount(ctx, "test-account", &serviceaccount.AccountArgs{
			AccountId:   pulumi.String("my-account"),
			DisplayName: pulumi.String("Test Service Account"),
		})
		if err != nil {
			return err
		}
		_, err = healthcare.NewConsentStoreIamMember(ctx, "test-iam", &healthcare.ConsentStoreIamMemberArgs{
			Dataset:        dataset.ID(),
			ConsentStoreId: my_consent.Name,
			Role:           pulumi.String("roles/editor"),
			Member: test_account.Email.ApplyT(func(email string) (string, error) {
				return fmt.Sprintf("serviceAccount:%v", email), nil
			}).(pulumi.StringOutput),
		})
		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()
    {
        Location = "us-central1",
        Name = "my-dataset",
    });

    var my_consent = new Gcp.Healthcare.ConsentStore("my-consent", new()
    {
        Dataset = dataset.Id,
        Name = "my-consent-store",
    });

    var test_account = new Gcp.ServiceAccount.Account("test-account", new()
    {
        AccountId = "my-account",
        DisplayName = "Test Service Account",
    });

    var test_iam = new Gcp.Healthcare.ConsentStoreIamMember("test-iam", new()
    {
        Dataset = dataset.Id,
        ConsentStoreId = my_consent.Name,
        Role = "roles/editor",
        Member = test_account.Email.Apply(email => $"serviceAccount:{email}"),
    });

});
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.ConsentStore;
import com.pulumi.gcp.healthcare.ConsentStoreArgs;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.healthcare.ConsentStoreIamMember;
import com.pulumi.gcp.healthcare.ConsentStoreIamMemberArgs;
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()
            .location("us-central1")
            .name("my-dataset")
            .build());

        var my_consent = new ConsentStore("my-consent", ConsentStoreArgs.builder()
            .dataset(dataset.id())
            .name("my-consent-store")
            .build());

        var test_account = new Account("test-account", AccountArgs.builder()
            .accountId("my-account")
            .displayName("Test Service Account")
            .build());

        var test_iam = new ConsentStoreIamMember("test-iam", ConsentStoreIamMemberArgs.builder()
            .dataset(dataset.id())
            .consentStoreId(my_consent.name())
            .role("roles/editor")
            .member(test_account.email().applyValue(_email -> String.format("serviceAccount:%s", _email)))
            .build());

    }
}
Copy
resources:
  dataset:
    type: gcp:healthcare:Dataset
    properties:
      location: us-central1
      name: my-dataset
  my-consent:
    type: gcp:healthcare:ConsentStore
    properties:
      dataset: ${dataset.id}
      name: my-consent-store
  test-account:
    type: gcp:serviceaccount:Account
    properties:
      accountId: my-account
      displayName: Test Service Account
  test-iam:
    type: gcp:healthcare:ConsentStoreIamMember
    properties:
      dataset: ${dataset.id}
      consentStoreId: ${["my-consent"].name}
      role: roles/editor
      member: serviceAccount:${["test-account"].email}
Copy

Create ConsentStore Resource

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

Constructor syntax

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

@overload
def ConsentStore(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 dataset: Optional[str] = None,
                 default_consent_ttl: Optional[str] = None,
                 enable_consent_create_on_update: Optional[bool] = None,
                 labels: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None)
func NewConsentStore(ctx *Context, name string, args ConsentStoreArgs, opts ...ResourceOption) (*ConsentStore, error)
public ConsentStore(string name, ConsentStoreArgs args, CustomResourceOptions? opts = null)
public ConsentStore(String name, ConsentStoreArgs args)
public ConsentStore(String name, ConsentStoreArgs args, CustomResourceOptions options)
type: gcp:healthcare:ConsentStore
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. ConsentStoreArgs
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. ConsentStoreArgs
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. ConsentStoreArgs
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. ConsentStoreArgs
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. ConsentStoreArgs
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 consentStoreResource = new Gcp.Healthcare.ConsentStore("consentStoreResource", new()
{
    Dataset = "string",
    DefaultConsentTtl = "string",
    EnableConsentCreateOnUpdate = false,
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := healthcare.NewConsentStore(ctx, "consentStoreResource", &healthcare.ConsentStoreArgs{
	Dataset:                     pulumi.String("string"),
	DefaultConsentTtl:           pulumi.String("string"),
	EnableConsentCreateOnUpdate: pulumi.Bool(false),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var consentStoreResource = new ConsentStore("consentStoreResource", ConsentStoreArgs.builder()
    .dataset("string")
    .defaultConsentTtl("string")
    .enableConsentCreateOnUpdate(false)
    .labels(Map.of("string", "string"))
    .name("string")
    .build());
Copy
consent_store_resource = gcp.healthcare.ConsentStore("consentStoreResource",
    dataset="string",
    default_consent_ttl="string",
    enable_consent_create_on_update=False,
    labels={
        "string": "string",
    },
    name="string")
Copy
const consentStoreResource = new gcp.healthcare.ConsentStore("consentStoreResource", {
    dataset: "string",
    defaultConsentTtl: "string",
    enableConsentCreateOnUpdate: false,
    labels: {
        string: "string",
    },
    name: "string",
});
Copy
type: gcp:healthcare:ConsentStore
properties:
    dataset: string
    defaultConsentTtl: string
    enableConsentCreateOnUpdate: false
    labels:
        string: string
    name: string
Copy

ConsentStore 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 ConsentStore 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}'


DefaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
EnableConsentCreateOnUpdate bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
Labels Dictionary<string, string>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
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}'


DefaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
EnableConsentCreateOnUpdate bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
Labels map[string]string

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
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}'


defaultConsentTtl String
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
enableConsentCreateOnUpdate Boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Map<String,String>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
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}'


defaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
enableConsentCreateOnUpdate boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels {[key: string]: string}

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
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}'


default_consent_ttl str
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
enable_consent_create_on_update bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Mapping[str, str]

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
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}'


defaultConsentTtl String
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
enableConsentCreateOnUpdate Boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Map<String>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"

Outputs

All input properties are implicitly available as output properties. Additionally, the ConsentStore 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 ConsentStore Resource

Get an existing ConsentStore 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?: ConsentStoreState, opts?: CustomResourceOptions): ConsentStore
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dataset: Optional[str] = None,
        default_consent_ttl: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        enable_consent_create_on_update: Optional[bool] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None) -> ConsentStore
func GetConsentStore(ctx *Context, name string, id IDInput, state *ConsentStoreState, opts ...ResourceOption) (*ConsentStore, error)
public static ConsentStore Get(string name, Input<string> id, ConsentStoreState? state, CustomResourceOptions? opts = null)
public static ConsentStore get(String name, Output<String> id, ConsentStoreState state, CustomResourceOptions options)
resources:  _:    type: gcp:healthcare:ConsentStore    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}'


DefaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
EnableConsentCreateOnUpdate bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
Labels Dictionary<string, string>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
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}'


DefaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
EnableConsentCreateOnUpdate bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
Labels map[string]string

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
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}'


defaultConsentTtl String
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
enableConsentCreateOnUpdate Boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Map<String,String>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
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}'


defaultConsentTtl string
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
enableConsentCreateOnUpdate boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels {[key: string]: string}

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
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}'


default_consent_ttl str
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
enable_consent_create_on_update bool
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Mapping[str, str]

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
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}'


defaultConsentTtl String
Default time to live for consents in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
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.
enableConsentCreateOnUpdate Boolean
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
labels Map<String>

User-supplied key-value pairs used to organize Consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a given store. 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 this ConsentStore, for example: "consent1"
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.

Import

ConsentStore can be imported using any of these accepted formats:

  • {{dataset}}/consentStores/{{name}}

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

$ pulumi import gcp:healthcare/consentStore:ConsentStore default {{dataset}}/consentStores/{{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.