1. Packages
  2. Aiven Provider
  3. API Docs
  4. OrganizationUserGroupMember
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

aiven.OrganizationUserGroupMember

Explore with Pulumi AI

aiven logo
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

    Adds and manages users in a user group. You can add organization users and application users to groups.

    Groups are given access to projects using the aiven.OrganizationGroupProject resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const example = new aiven.OrganizationUserGroup("example", {
        description: "Example group of users.",
        organizationId: main.id,
        name: "Example group",
    });
    const projectAdmin = new aiven.OrganizationUserGroupMember("project_admin", {
        groupId: example.groupId,
        organizationId: main.id,
        userId: "u123a456b7890c",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example = aiven.OrganizationUserGroup("example",
        description="Example group of users.",
        organization_id=main["id"],
        name="Example group")
    project_admin = aiven.OrganizationUserGroupMember("project_admin",
        group_id=example.group_id,
        organization_id=main["id"],
        user_id="u123a456b7890c")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := aiven.NewOrganizationUserGroup(ctx, "example", &aiven.OrganizationUserGroupArgs{
    			Description:    pulumi.String("Example group of users."),
    			OrganizationId: pulumi.Any(main.Id),
    			Name:           pulumi.String("Example group"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOrganizationUserGroupMember(ctx, "project_admin", &aiven.OrganizationUserGroupMemberArgs{
    			GroupId:        example.GroupId,
    			OrganizationId: pulumi.Any(main.Id),
    			UserId:         pulumi.String("u123a456b7890c"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aiven.OrganizationUserGroup("example", new()
        {
            Description = "Example group of users.",
            OrganizationId = main.Id,
            Name = "Example group",
        });
    
        var projectAdmin = new Aiven.OrganizationUserGroupMember("project_admin", new()
        {
            GroupId = example.GroupId,
            OrganizationId = main.Id,
            UserId = "u123a456b7890c",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.OrganizationUserGroup;
    import com.pulumi.aiven.OrganizationUserGroupArgs;
    import com.pulumi.aiven.OrganizationUserGroupMember;
    import com.pulumi.aiven.OrganizationUserGroupMemberArgs;
    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 example = new OrganizationUserGroup("example", OrganizationUserGroupArgs.builder()
                .description("Example group of users.")
                .organizationId(main.id())
                .name("Example group")
                .build());
    
            var projectAdmin = new OrganizationUserGroupMember("projectAdmin", OrganizationUserGroupMemberArgs.builder()
                .groupId(example.groupId())
                .organizationId(main.id())
                .userId("u123a456b7890c")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aiven:OrganizationUserGroup
        properties:
          description: Example group of users.
          organizationId: ${main.id}
          name: Example group
      projectAdmin:
        type: aiven:OrganizationUserGroupMember
        name: project_admin
        properties:
          groupId: ${example.groupId}
          organizationId: ${main.id}
          userId: u123a456b7890c
    

    Create OrganizationUserGroupMember Resource

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

    Constructor syntax

    new OrganizationUserGroupMember(name: string, args: OrganizationUserGroupMemberArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationUserGroupMember(resource_name: str,
                                    args: OrganizationUserGroupMemberArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationUserGroupMember(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    group_id: Optional[str] = None,
                                    organization_id: Optional[str] = None,
                                    user_id: Optional[str] = None,
                                    timeouts: Optional[OrganizationUserGroupMemberTimeoutsArgs] = None)
    func NewOrganizationUserGroupMember(ctx *Context, name string, args OrganizationUserGroupMemberArgs, opts ...ResourceOption) (*OrganizationUserGroupMember, error)
    public OrganizationUserGroupMember(string name, OrganizationUserGroupMemberArgs args, CustomResourceOptions? opts = null)
    public OrganizationUserGroupMember(String name, OrganizationUserGroupMemberArgs args)
    public OrganizationUserGroupMember(String name, OrganizationUserGroupMemberArgs args, CustomResourceOptions options)
    
    type: aiven:OrganizationUserGroupMember
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OrganizationUserGroupMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OrganizationUserGroupMemberArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OrganizationUserGroupMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationUserGroupMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationUserGroupMemberArgs
    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 organizationUserGroupMemberResource = new Aiven.OrganizationUserGroupMember("organizationUserGroupMemberResource", new()
    {
        GroupId = "string",
        OrganizationId = "string",
        UserId = "string",
        Timeouts = new Aiven.Inputs.OrganizationUserGroupMemberTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := aiven.NewOrganizationUserGroupMember(ctx, "organizationUserGroupMemberResource", &aiven.OrganizationUserGroupMemberArgs{
    	GroupId:        pulumi.String("string"),
    	OrganizationId: pulumi.String("string"),
    	UserId:         pulumi.String("string"),
    	Timeouts: &aiven.OrganizationUserGroupMemberTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var organizationUserGroupMemberResource = new OrganizationUserGroupMember("organizationUserGroupMemberResource", OrganizationUserGroupMemberArgs.builder()
        .groupId("string")
        .organizationId("string")
        .userId("string")
        .timeouts(OrganizationUserGroupMemberTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    organization_user_group_member_resource = aiven.OrganizationUserGroupMember("organizationUserGroupMemberResource",
        group_id="string",
        organization_id="string",
        user_id="string",
        timeouts=aiven.OrganizationUserGroupMemberTimeoutsArgs(
            create="string",
            delete="string",
            read="string",
            update="string",
        ))
    
    const organizationUserGroupMemberResource = new aiven.OrganizationUserGroupMember("organizationUserGroupMemberResource", {
        groupId: "string",
        organizationId: "string",
        userId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: aiven:OrganizationUserGroupMember
    properties:
        groupId: string
        organizationId: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
        userId: string
    

    OrganizationUserGroupMember Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The OrganizationUserGroupMember resource accepts the following input properties:

    GroupId string
    The ID of the user group.
    OrganizationId string
    The ID of the organization.
    UserId string
    The ID of the organization user or application user.
    Timeouts OrganizationUserGroupMemberTimeouts
    GroupId string
    The ID of the user group.
    OrganizationId string
    The ID of the organization.
    UserId string
    The ID of the organization user or application user.
    Timeouts OrganizationUserGroupMemberTimeoutsArgs
    groupId String
    The ID of the user group.
    organizationId String
    The ID of the organization.
    userId String
    The ID of the organization user or application user.
    timeouts OrganizationUserGroupMemberTimeouts
    groupId string
    The ID of the user group.
    organizationId string
    The ID of the organization.
    userId string
    The ID of the organization user or application user.
    timeouts OrganizationUserGroupMemberTimeouts
    group_id str
    The ID of the user group.
    organization_id str
    The ID of the organization.
    user_id str
    The ID of the organization user or application user.
    timeouts OrganizationUserGroupMemberTimeoutsArgs
    groupId String
    The ID of the user group.
    organizationId String
    The ID of the organization.
    userId String
    The ID of the organization user or application user.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastActivityTime string
    Last activity time of the user group member.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastActivityTime string
    Last activity time of the user group member.
    id String
    The provider-assigned unique ID for this managed resource.
    lastActivityTime String
    Last activity time of the user group member.
    id string
    The provider-assigned unique ID for this managed resource.
    lastActivityTime string
    Last activity time of the user group member.
    id str
    The provider-assigned unique ID for this managed resource.
    last_activity_time str
    Last activity time of the user group member.
    id String
    The provider-assigned unique ID for this managed resource.
    lastActivityTime String
    Last activity time of the user group member.

    Look up Existing OrganizationUserGroupMember Resource

    Get an existing OrganizationUserGroupMember 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?: OrganizationUserGroupMemberState, opts?: CustomResourceOptions): OrganizationUserGroupMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group_id: Optional[str] = None,
            last_activity_time: Optional[str] = None,
            organization_id: Optional[str] = None,
            timeouts: Optional[OrganizationUserGroupMemberTimeoutsArgs] = None,
            user_id: Optional[str] = None) -> OrganizationUserGroupMember
    func GetOrganizationUserGroupMember(ctx *Context, name string, id IDInput, state *OrganizationUserGroupMemberState, opts ...ResourceOption) (*OrganizationUserGroupMember, error)
    public static OrganizationUserGroupMember Get(string name, Input<string> id, OrganizationUserGroupMemberState? state, CustomResourceOptions? opts = null)
    public static OrganizationUserGroupMember get(String name, Output<String> id, OrganizationUserGroupMemberState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    GroupId string
    The ID of the user group.
    LastActivityTime string
    Last activity time of the user group member.
    OrganizationId string
    The ID of the organization.
    Timeouts OrganizationUserGroupMemberTimeouts
    UserId string
    The ID of the organization user or application user.
    GroupId string
    The ID of the user group.
    LastActivityTime string
    Last activity time of the user group member.
    OrganizationId string
    The ID of the organization.
    Timeouts OrganizationUserGroupMemberTimeoutsArgs
    UserId string
    The ID of the organization user or application user.
    groupId String
    The ID of the user group.
    lastActivityTime String
    Last activity time of the user group member.
    organizationId String
    The ID of the organization.
    timeouts OrganizationUserGroupMemberTimeouts
    userId String
    The ID of the organization user or application user.
    groupId string
    The ID of the user group.
    lastActivityTime string
    Last activity time of the user group member.
    organizationId string
    The ID of the organization.
    timeouts OrganizationUserGroupMemberTimeouts
    userId string
    The ID of the organization user or application user.
    group_id str
    The ID of the user group.
    last_activity_time str
    Last activity time of the user group member.
    organization_id str
    The ID of the organization.
    timeouts OrganizationUserGroupMemberTimeoutsArgs
    user_id str
    The ID of the organization user or application user.
    groupId String
    The ID of the user group.
    lastActivityTime String
    Last activity time of the user group member.
    organizationId String
    The ID of the organization.
    timeouts Property Map
    userId String
    The ID of the organization user or application user.

    Supporting Types

    OrganizationUserGroupMemberTimeouts, OrganizationUserGroupMemberTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    $ pulumi import aiven:index/organizationUserGroupMember:OrganizationUserGroupMember project_admin ORGANIZATION_ID/USER_GROUP_ID/USER_ID
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi