Class DatasetIamPolicy
Three different resources help you manage your IAM policy for Healthcare dataset. Each of these resources serves a different use case:
gcp.healthcare.DatasetIamPolicy: Authoritative. Sets the IAM policy for the dataset and replaces any existing policy already attached.gcp.healthcare.DatasetIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the dataset are preserved.gcp.healthcare.DatasetIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the dataset are preserved.
Note:
gcp.healthcare.DatasetIamPolicycannot be used in conjunction withgcp.healthcare.DatasetIamBindingandgcp.healthcare.DatasetIamMemberor they will fight over what your policy should be.
Note:
gcp.healthcare.DatasetIamBindingresources can be used in conjunction withgcp.healthcare.DatasetIamMemberresources only if they do not grant privilege to the same role.
google_healthcare_dataset_iam_policy
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
{
Binding =
{
{
{ "role", "roles/editor" },
{ "members",
{
"user:jane@example.com",
} },
},
},
}));
var dataset = new Gcp.Healthcare.DatasetIamPolicy("dataset", new Gcp.Healthcare.DatasetIamPolicyArgs
{
DatasetId = "your-dataset-id",
PolicyData = admin.Apply(admin => admin.PolicyData),
});
}
}
google_healthcare_dataset_iam_binding
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dataset = new Gcp.Healthcare.DatasetIamBinding("dataset", new Gcp.Healthcare.DatasetIamBindingArgs
{
DatasetId = "your-dataset-id",
Members =
{
"user:jane@example.com",
},
Role = "roles/editor",
});
}
}
google_healthcare_dataset_iam_member
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dataset = new Gcp.Healthcare.DatasetIamMember("dataset", new Gcp.Healthcare.DatasetIamMemberArgs
{
DatasetId = "your-dataset-id",
Member = "user:jane@example.com",
Role = "roles/editor",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Healthcare
Assembly: Pulumi.Gcp.dll
Syntax
public class DatasetIamPolicy : CustomResource
Constructors
View SourceDatasetIamPolicy(String, DatasetIamPolicyArgs, CustomResourceOptions)
Create a DatasetIamPolicy resource with the given unique name, arguments, and options.
Declaration
public DatasetIamPolicy(string name, DatasetIamPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DatasetIamPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDatasetId
The dataset ID, in the form
{project_id}/{location_name}/{dataset_name} or
{location_name}/{dataset_name}. In the second form, the provider's
project setting will be used as a fallback.
Declaration
public Output<string> DatasetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Etag
(Computed) The etag of the dataset's IAM policy.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyData
The policy data generated by
a gcp.organizations.getIAMPolicy data source.
Declaration
public Output<string> PolicyData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DatasetIamPolicyState, CustomResourceOptions)
Get an existing DatasetIamPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DatasetIamPolicy Get(string name, Input<string> id, DatasetIamPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DatasetIamPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DatasetIamPolicy |