1. Packages
  2. Google Cloud Native
  3. API Docs
  4. cloudresourcemanager
  5. cloudresourcemanager/v1beta1
  6. ProjectIamMember

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.cloudresourcemanager/v1beta1.ProjectIamMember

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Sets the IAM access control policy for the specified Project. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. NOTE: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. The following constraints apply when using setIamPolicy(): + Project does not support allUsers and allAuthenticatedUsers as members in a Binding of a Policy. + The owner role can be granted to a user, serviceAccount, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using setIamPolicy(). The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using setIamPolicy(); they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling setIamPolicy() to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. Authorization requires the Google IAM permission resourcemanager.projects.setIamPolicy on the project

Create ProjectIamMember Resource

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

Constructor syntax

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

@overload
def ProjectIamMember(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     member: Optional[str] = None,
                     name: Optional[str] = None,
                     role: Optional[str] = None,
                     condition: Optional[_iam.v1.ConditionArgs] = None)
func NewProjectIamMember(ctx *Context, name string, args ProjectIamMemberArgs, opts ...ResourceOption) (*ProjectIamMember, error)
public ProjectIamMember(string name, ProjectIamMemberArgs args, CustomResourceOptions? opts = null)
public ProjectIamMember(String name, ProjectIamMemberArgs args)
public ProjectIamMember(String name, ProjectIamMemberArgs args, CustomResourceOptions options)
type: google-native:cloudresourcemanager/v1beta1:ProjectIamMember
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. ProjectIamMemberArgs
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. ProjectIamMemberArgs
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. ProjectIamMemberArgs
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. ProjectIamMemberArgs
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. ProjectIamMemberArgs
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 google_nativeProjectIamMemberResource = new GoogleNative.CloudResourceManager.V1Beta1.ProjectIamMember("google-nativeProjectIamMemberResource", new()
{
    Member = "string",
    Name = "string",
    Role = "string",
    Condition = new GoogleNative.IAM.V1.Inputs.ConditionArgs
    {
        Expression = "string",
        Title = "string",
        Description = "string",
    },
});
Copy
example, err := cloudresourcemanagerv1beta1.NewProjectIamMember(ctx, "google-nativeProjectIamMemberResource", &cloudresourcemanagerv1beta1.ProjectIamMemberArgs{
	Member: pulumi.String("string"),
	Name:   pulumi.String("string"),
	Role:   pulumi.String("string"),
	Condition: &iam.ConditionArgs{
		Expression:  pulumi.String("string"),
		Title:       pulumi.String("string"),
		Description: pulumi.String("string"),
	},
})
Copy
var google_nativeProjectIamMemberResource = new ProjectIamMember("google-nativeProjectIamMemberResource", ProjectIamMemberArgs.builder()
    .member("string")
    .name("string")
    .role("string")
    .condition(ConditionArgs.builder()
        .expression("string")
        .title("string")
        .description("string")
        .build())
    .build());
Copy
google_native_project_iam_member_resource = google_native.cloudresourcemanager.v1beta1.ProjectIamMember("google-nativeProjectIamMemberResource",
    member="string",
    name="string",
    role="string",
    condition={
        "expression": "string",
        "title": "string",
        "description": "string",
    })
Copy
const google_nativeProjectIamMemberResource = new google_native.cloudresourcemanager.v1beta1.ProjectIamMember("google-nativeProjectIamMemberResource", {
    member: "string",
    name: "string",
    role: "string",
    condition: {
        expression: "string",
        title: "string",
        description: "string",
    },
});
Copy
type: google-native:cloudresourcemanager/v1beta1:ProjectIamMember
properties:
    condition:
        description: string
        expression: string
        title: string
    member: string
    name: string
    role: string
Copy

ProjectIamMember 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 ProjectIamMember resource accepts the following input properties:

Member This property is required. string
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
Name This property is required. string
The name of the resource to manage IAM policies for.
Role This property is required. string
The role that should be applied.
Condition Pulumi.GoogleNative.IAM.V1.Inputs.Condition
An IAM Condition for a given binding.
Member This property is required. string
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
Name This property is required. string
The name of the resource to manage IAM policies for.
Role This property is required. string
The role that should be applied.
Condition ConditionArgs
An IAM Condition for a given binding.
member This property is required. String
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
name This property is required. String
The name of the resource to manage IAM policies for.
role This property is required. String
The role that should be applied.
condition Condition
An IAM Condition for a given binding.
member This property is required. string
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
name This property is required. string
The name of the resource to manage IAM policies for.
role This property is required. string
The role that should be applied.
condition iam.v1.Condition
An IAM Condition for a given binding.
member This property is required. str
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
name This property is required. str
The name of the resource to manage IAM policies for.
role This property is required. str
The role that should be applied.
condition iam.v1.ConditionArgs
An IAM Condition for a given binding.
member This property is required. String
Identity that will be granted the privilege in role. The entry can have one of the following values:

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
  • 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.
name This property is required. String
The name of the resource to manage IAM policies for.
role This property is required. String
The role that should be applied.
condition Property Map
An IAM Condition for a given binding.

Outputs

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

Etag string
The etag of the resource's IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
Project string
The project in which the resource belongs. If it is not provided, a default will be supplied.
Etag string
The etag of the resource's IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
Project string
The project in which the resource belongs. If it is not provided, a default will be supplied.
etag String
The etag of the resource's IAM policy.
id String
The provider-assigned unique ID for this managed resource.
project String
The project in which the resource belongs. If it is not provided, a default will be supplied.
etag string
The etag of the resource's IAM policy.
id string
The provider-assigned unique ID for this managed resource.
project string
The project in which the resource belongs. If it is not provided, a default will be supplied.
etag str
The etag of the resource's IAM policy.
id str
The provider-assigned unique ID for this managed resource.
project str
The project in which the resource belongs. If it is not provided, a default will be supplied.
etag String
The etag of the resource's IAM policy.
id String
The provider-assigned unique ID for this managed resource.
project String
The project in which the resource belongs. If it is not provided, a default will be supplied.

Supporting Types

Condition
, ConditionArgs

Expression This property is required. string
Textual representation of an expression in Common Expression Language syntax.
Title This property is required. string
A title for the expression, i.e. a short string describing its purpose.
Description string
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.
Expression This property is required. string
Textual representation of an expression in Common Expression Language syntax.
Title This property is required. string
A title for the expression, i.e. a short string describing its purpose.
Description string
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.
expression This property is required. String
Textual representation of an expression in Common Expression Language syntax.
title This property is required. String
A title for the expression, i.e. a short string describing its purpose.
description String
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.
expression This property is required. string
Textual representation of an expression in Common Expression Language syntax.
title This property is required. string
A title for the expression, i.e. a short string describing its purpose.
description string
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.
expression This property is required. str
Textual representation of an expression in Common Expression Language syntax.
title This property is required. str
A title for the expression, i.e. a short string describing its purpose.
description str
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.
expression This property is required. String
Textual representation of an expression in Common Expression Language syntax.
title This property is required. String
A title for the expression, i.e. a short string describing its purpose.
description String
An optional description of the expression. This is a longer text which describes the expression, e.g., when hovering over it in a UI.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi