Class JobIAMMember
Three different resources help you manage IAM policies on dataproc jobs. Each of these resources serves a different use case:
gcp.dataproc.JobIAMPolicy: Authoritative. Sets the IAM policy for the job and replaces any existing policy already attached.gcp.dataproc.JobIAMBinding: 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 job are preserved.gcp.dataproc.JobIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the job are preserved.
Note:
gcp.dataproc.JobIAMPolicycannot be used in conjunction withgcp.dataproc.JobIAMBindingandgcp.dataproc.JobIAMMemberor they will fight over what your policy should be. In addition, be careful not to accidentally unset ownership of the job asgcp.dataproc.JobIAMPolicyreplaces the entire policy.
Note:
gcp.dataproc.JobIAMBindingresources can be used in conjunction withgcp.dataproc.JobIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_subscription_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 editor = new Gcp.Dataproc.JobIAMPolicy("editor", new Gcp.Dataproc.JobIAMPolicyArgs
{
Project = "your-project",
Region = "your-region",
JobId = "your-dataproc-job",
PolicyData = admin.Apply(admin => admin.PolicyData),
});
}
}
google_pubsub_subscription_iam_binding
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var editor = new Gcp.Dataproc.JobIAMBinding("editor", new Gcp.Dataproc.JobIAMBindingArgs
{
JobId = "your-dataproc-job",
Members =
{
"user:jane@example.com",
},
Role = "roles/editor",
});
}
}
google_pubsub_subscription_iam_member
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var editor = new Gcp.Dataproc.JobIAMMember("editor", new Gcp.Dataproc.JobIAMMemberArgs
{
JobId = "your-dataproc-job",
Member = "user:jane@example.com",
Role = "roles/editor",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Dataproc
Assembly: Pulumi.Gcp.dll
Syntax
public class JobIAMMember : CustomResource
Constructors
View SourceJobIAMMember(String, JobIAMMemberArgs, CustomResourceOptions)
Create a JobIAMMember resource with the given unique name, arguments, and options.
Declaration
public JobIAMMember(string name, JobIAMMemberArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| JobIAMMemberArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCondition
Declaration
public Output<JobIAMMemberCondition> Condition { get; }
Property Value
| Type | Description |
|---|---|
| Output<JobIAMMemberCondition> |
Etag
(Computed) The etag of the jobs's IAM policy.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
JobId
Declaration
public Output<string> JobId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Member
Declaration
public Output<string> Member { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The project in which the job belongs. If it is not provided, the provider will use a default.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The region in which the job belongs. If it is not provided, the provider will use a default.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Role
The role that should be applied. Only one
gcp.dataproc.JobIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, JobIAMMemberState, CustomResourceOptions)
Get an existing JobIAMMember resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static JobIAMMember Get(string name, Input<string> id, JobIAMMemberState 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. |
| JobIAMMemberState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| JobIAMMember |