1. Packages
  2. Minio Provider
  3. API Docs
  4. IamGroupUserAttachment
MinIO v0.16.1 published on Thursday, Oct 10, 2024 by Pulumi

minio.IamGroupUserAttachment

Explore with Pulumi AI

minio logo
MinIO v0.16.1 published on Thursday, Oct 10, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as minio from "@pulumi/minio";
    
    const developer = new minio.IamGroup("developer", {name: "developer"});
    const userOne = new minio.IamUser("user_one", {name: "test-user"});
    const developerIamGroupUserAttachment = new minio.IamGroupUserAttachment("developer", {
        groupName: group.name,
        userName: userOne.name,
    });
    export const minioName = developerIamGroupUserAttachment.id;
    export const minioUsers = developerIamGroupUserAttachment.groupName;
    export const minioGroup = developerIamGroupUserAttachment.userName;
    
    import pulumi
    import pulumi_minio as minio
    
    developer = minio.IamGroup("developer", name="developer")
    user_one = minio.IamUser("user_one", name="test-user")
    developer_iam_group_user_attachment = minio.IamGroupUserAttachment("developer",
        group_name=group["name"],
        user_name=user_one.name)
    pulumi.export("minioName", developer_iam_group_user_attachment.id)
    pulumi.export("minioUsers", developer_iam_group_user_attachment.group_name)
    pulumi.export("minioGroup", developer_iam_group_user_attachment.user_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-minio/sdk/go/minio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := minio.NewIamGroup(ctx, "developer", &minio.IamGroupArgs{
    			Name: pulumi.String("developer"),
    		})
    		if err != nil {
    			return err
    		}
    		userOne, err := minio.NewIamUser(ctx, "user_one", &minio.IamUserArgs{
    			Name: pulumi.String("test-user"),
    		})
    		if err != nil {
    			return err
    		}
    		developerIamGroupUserAttachment, err := minio.NewIamGroupUserAttachment(ctx, "developer", &minio.IamGroupUserAttachmentArgs{
    			GroupName: pulumi.Any(group.Name),
    			UserName:  userOne.Name,
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("minioName", developerIamGroupUserAttachment.ID())
    		ctx.Export("minioUsers", developerIamGroupUserAttachment.GroupName)
    		ctx.Export("minioGroup", developerIamGroupUserAttachment.UserName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Minio = Pulumi.Minio;
    
    return await Deployment.RunAsync(() => 
    {
        var developer = new Minio.IamGroup("developer", new()
        {
            Name = "developer",
        });
    
        var userOne = new Minio.IamUser("user_one", new()
        {
            Name = "test-user",
        });
    
        var developerIamGroupUserAttachment = new Minio.IamGroupUserAttachment("developer", new()
        {
            GroupName = @group.Name,
            UserName = userOne.Name,
        });
    
        return new Dictionary<string, object?>
        {
            ["minioName"] = developerIamGroupUserAttachment.Id,
            ["minioUsers"] = developerIamGroupUserAttachment.GroupName,
            ["minioGroup"] = developerIamGroupUserAttachment.UserName,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.minio.IamGroup;
    import com.pulumi.minio.IamGroupArgs;
    import com.pulumi.minio.IamUser;
    import com.pulumi.minio.IamUserArgs;
    import com.pulumi.minio.IamGroupUserAttachment;
    import com.pulumi.minio.IamGroupUserAttachmentArgs;
    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 developer = new IamGroup("developer", IamGroupArgs.builder()
                .name("developer")
                .build());
    
            var userOne = new IamUser("userOne", IamUserArgs.builder()
                .name("test-user")
                .build());
    
            var developerIamGroupUserAttachment = new IamGroupUserAttachment("developerIamGroupUserAttachment", IamGroupUserAttachmentArgs.builder()
                .groupName(group.name())
                .userName(userOne.name())
                .build());
    
            ctx.export("minioName", developerIamGroupUserAttachment.id());
            ctx.export("minioUsers", developerIamGroupUserAttachment.groupName());
            ctx.export("minioGroup", developerIamGroupUserAttachment.userName());
        }
    }
    
    resources:
      developer:
        type: minio:IamGroup
        properties:
          name: developer
      userOne:
        type: minio:IamUser
        name: user_one
        properties:
          name: test-user
      developerIamGroupUserAttachment:
        type: minio:IamGroupUserAttachment
        name: developer
        properties:
          groupName: ${group.name}
          userName: ${userOne.name}
    outputs:
      minioName: ${developerIamGroupUserAttachment.id}
      minioUsers: ${developerIamGroupUserAttachment.groupName}
      minioGroup: ${developerIamGroupUserAttachment.userName}
    

    Create IamGroupUserAttachment Resource

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

    Constructor syntax

    new IamGroupUserAttachment(name: string, args: IamGroupUserAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def IamGroupUserAttachment(resource_name: str,
                               args: IamGroupUserAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamGroupUserAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               group_name: Optional[str] = None,
                               user_name: Optional[str] = None)
    func NewIamGroupUserAttachment(ctx *Context, name string, args IamGroupUserAttachmentArgs, opts ...ResourceOption) (*IamGroupUserAttachment, error)
    public IamGroupUserAttachment(string name, IamGroupUserAttachmentArgs args, CustomResourceOptions? opts = null)
    public IamGroupUserAttachment(String name, IamGroupUserAttachmentArgs args)
    public IamGroupUserAttachment(String name, IamGroupUserAttachmentArgs args, CustomResourceOptions options)
    
    type: minio:IamGroupUserAttachment
    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 IamGroupUserAttachmentArgs
    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 IamGroupUserAttachmentArgs
    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 IamGroupUserAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamGroupUserAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamGroupUserAttachmentArgs
    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 iamGroupUserAttachmentResource = new Minio.IamGroupUserAttachment("iamGroupUserAttachmentResource", new()
    {
        GroupName = "string",
        UserName = "string",
    });
    
    example, err := minio.NewIamGroupUserAttachment(ctx, "iamGroupUserAttachmentResource", &minio.IamGroupUserAttachmentArgs{
    	GroupName: pulumi.String("string"),
    	UserName:  pulumi.String("string"),
    })
    
    var iamGroupUserAttachmentResource = new IamGroupUserAttachment("iamGroupUserAttachmentResource", IamGroupUserAttachmentArgs.builder()
        .groupName("string")
        .userName("string")
        .build());
    
    iam_group_user_attachment_resource = minio.IamGroupUserAttachment("iamGroupUserAttachmentResource",
        group_name="string",
        user_name="string")
    
    const iamGroupUserAttachmentResource = new minio.IamGroupUserAttachment("iamGroupUserAttachmentResource", {
        groupName: "string",
        userName: "string",
    });
    
    type: minio:IamGroupUserAttachment
    properties:
        groupName: string
        userName: string
    

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

    GroupName string
    UserName string
    GroupName string
    UserName string
    groupName String
    userName String
    groupName string
    userName string
    groupName String
    userName String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IamGroupUserAttachment Resource

    Get an existing IamGroupUserAttachment 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?: IamGroupUserAttachmentState, opts?: CustomResourceOptions): IamGroupUserAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group_name: Optional[str] = None,
            user_name: Optional[str] = None) -> IamGroupUserAttachment
    func GetIamGroupUserAttachment(ctx *Context, name string, id IDInput, state *IamGroupUserAttachmentState, opts ...ResourceOption) (*IamGroupUserAttachment, error)
    public static IamGroupUserAttachment Get(string name, Input<string> id, IamGroupUserAttachmentState? state, CustomResourceOptions? opts = null)
    public static IamGroupUserAttachment get(String name, Output<String> id, IamGroupUserAttachmentState 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:
    GroupName string
    UserName string
    GroupName string
    UserName string
    groupName String
    userName String
    groupName string
    userName string
    groupName String
    userName String

    Package Details

    Repository
    MinIO pulumi/pulumi-minio
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the minio Terraform Provider.
    minio logo
    MinIO v0.16.1 published on Thursday, Oct 10, 2024 by Pulumi