Package com.pulumi.gcp.healthcare
Class DatasetIamMember
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.healthcare.DatasetIamMember
-
public class DatasetIamMember extends com.pulumi.resources.CustomResource
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.DatasetIamPolicy` **cannot** be used in conjunction with `gcp.healthcare.DatasetIamBinding` and `gcp.healthcare.DatasetIamMember` or they will fight over what your policy should be. > **Note:** `gcp.healthcare.DatasetIamBinding` resources **can be** used in conjunction with `gcp.healthcare.DatasetIamMember` resources **only if** they do not grant privilege to the same role. ## google\_healthcare\_dataset\_iam\_policy ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.organizations.OrganizationsFunctions; import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs; import com.pulumi.gcp.healthcare.DatasetIamPolicy; import com.pulumi.gcp.healthcare.DatasetIamPolicyArgs; 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) { final var admin = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder() .bindings(GetIAMPolicyBindingArgs.builder() .role("roles/editor") .members("user:[email protected]") .build()) .build()); var dataset = new DatasetIamPolicy("dataset", DatasetIamPolicyArgs.builder() .datasetId("your-dataset-id") .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData())) .build()); } } ``` ## google\_healthcare\_dataset\_iam\_binding ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.healthcare.DatasetIamBinding; import com.pulumi.gcp.healthcare.DatasetIamBindingArgs; 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 DatasetIamBinding("dataset", DatasetIamBindingArgs.builder() .datasetId("your-dataset-id") .members("user:[email protected]") .role("roles/editor") .build()); } } ``` ## google\_healthcare\_dataset\_iam\_member ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.healthcare.DatasetIamMember; import com.pulumi.gcp.healthcare.DatasetIamMemberArgs; 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 DatasetIamMember("dataset", DatasetIamMemberArgs.builder() .datasetId("your-dataset-id") .member("user:[email protected]") .role("roles/editor") .build()); } } ``` ## Import ### Importing IAM policies IAM policy imports use the identifier of the Healthcase Dataset resource. For example* `"{{project_id}}/{{location}}/{{dataset}}"` An [`import` block](https://developer.hashicorp.com/terraform/language/import) (Terraform v1.5.0 and later) can be used to import IAM policiestf import { id = "{{project_id}}/{{location}}/{{dataset}}" to = google_healthcare_dataset_iam_policy.default } ```sh $ pulumi import gcp:healthcare/datasetIamMember:DatasetIamMember The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can also be used ``` ```sh $ pulumi import gcp:healthcare/datasetIamMember:DatasetIamMember default {{project_id}}/{{location}}/{{dataset}} ```
-
-
Constructor Summary
Constructors Constructor Description DatasetIamMember(java.lang.String name)
DatasetIamMember(java.lang.String name, DatasetIamMemberArgs args)
DatasetIamMember(java.lang.String name, DatasetIamMemberArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<DatasetIamMemberCondition>>
condition()
com.pulumi.core.Output<java.lang.String>
datasetId()
com.pulumi.core.Output<java.lang.String>
etag()
static DatasetIamMember
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DatasetIamMemberState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
member()
com.pulumi.core.Output<java.lang.String>
role()
-
-
-
Constructor Detail
-
DatasetIamMember
public DatasetIamMember(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
DatasetIamMember
public DatasetIamMember(java.lang.String name, DatasetIamMemberArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
DatasetIamMember
public DatasetIamMember(java.lang.String name, DatasetIamMemberArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
condition
public com.pulumi.core.Output<java.util.Optional<DatasetIamMemberCondition>> condition()
-
datasetId
public com.pulumi.core.Output<java.lang.String> datasetId()
- Returns:
- 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. * `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values: * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account. * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account. * **user:{emailid}**: An email address that represents a specific Google account. For example, [email protected] or [email protected]. * **serviceAccount:{emailid}**: An email address that represents a service account. For example, [email protected]. * **group:{emailid}**: An email address that represents a Google group. For example, [email protected]. * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
-
etag
public com.pulumi.core.Output<java.lang.String> etag()
- Returns:
- (Computed) The etag of the dataset's IAM policy.
-
member
public com.pulumi.core.Output<java.lang.String> member()
-
role
public com.pulumi.core.Output<java.lang.String> role()
- Returns:
- The role that should be applied. Only one `gcp.healthcare.DatasetIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.
-
get
public static DatasetIamMember get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable DatasetIamMemberState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-