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

minio.IamServiceAccount

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 test = new minio.IamUser("test", {
        name: "test",
        forceDestroy: true,
        tags: {
            "tag-key": "tag-value",
        },
    });
    const testServiceAccount = new minio.IamServiceAccount("test_service_account", {targetUser: test.name});
    export const minioUser = testServiceAccount.accessKey;
    export const minioPassword = testServiceAccount.secretKey;
    
    import pulumi
    import pulumi_minio as minio
    
    test = minio.IamUser("test",
        name="test",
        force_destroy=True,
        tags={
            "tag-key": "tag-value",
        })
    test_service_account = minio.IamServiceAccount("test_service_account", target_user=test.name)
    pulumi.export("minioUser", test_service_account.access_key)
    pulumi.export("minioPassword", test_service_account.secret_key)
    
    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 {
    		test, err := minio.NewIamUser(ctx, "test", &minio.IamUserArgs{
    			Name:         pulumi.String("test"),
    			ForceDestroy: pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"tag-key": pulumi.String("tag-value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		testServiceAccount, err := minio.NewIamServiceAccount(ctx, "test_service_account", &minio.IamServiceAccountArgs{
    			TargetUser: test.Name,
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("minioUser", testServiceAccount.AccessKey)
    		ctx.Export("minioPassword", testServiceAccount.SecretKey)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Minio = Pulumi.Minio;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Minio.IamUser("test", new()
        {
            Name = "test",
            ForceDestroy = true,
            Tags = 
            {
                { "tag-key", "tag-value" },
            },
        });
    
        var testServiceAccount = new Minio.IamServiceAccount("test_service_account", new()
        {
            TargetUser = test.Name,
        });
    
        return new Dictionary<string, object?>
        {
            ["minioUser"] = testServiceAccount.AccessKey,
            ["minioPassword"] = testServiceAccount.SecretKey,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.minio.IamUser;
    import com.pulumi.minio.IamUserArgs;
    import com.pulumi.minio.IamServiceAccount;
    import com.pulumi.minio.IamServiceAccountArgs;
    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 test = new IamUser("test", IamUserArgs.builder()
                .name("test")
                .forceDestroy(true)
                .tags(Map.of("tag-key", "tag-value"))
                .build());
    
            var testServiceAccount = new IamServiceAccount("testServiceAccount", IamServiceAccountArgs.builder()
                .targetUser(test.name())
                .build());
    
            ctx.export("minioUser", testServiceAccount.accessKey());
            ctx.export("minioPassword", testServiceAccount.secretKey());
        }
    }
    
    resources:
      test:
        type: minio:IamUser
        properties:
          name: test
          forceDestroy: true
          tags:
            tag-key: tag-value
      testServiceAccount:
        type: minio:IamServiceAccount
        name: test_service_account
        properties:
          targetUser: ${test.name}
    outputs:
      minioUser: ${testServiceAccount.accessKey}
      minioPassword: ${testServiceAccount.secretKey}
    

    Create IamServiceAccount Resource

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

    Constructor syntax

    new IamServiceAccount(name: string, args: IamServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def IamServiceAccount(resource_name: str,
                          args: IamServiceAccountArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamServiceAccount(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          target_user: Optional[str] = None,
                          disable_user: Optional[bool] = None,
                          policy: Optional[str] = None,
                          update_secret: Optional[bool] = None)
    func NewIamServiceAccount(ctx *Context, name string, args IamServiceAccountArgs, opts ...ResourceOption) (*IamServiceAccount, error)
    public IamServiceAccount(string name, IamServiceAccountArgs args, CustomResourceOptions? opts = null)
    public IamServiceAccount(String name, IamServiceAccountArgs args)
    public IamServiceAccount(String name, IamServiceAccountArgs args, CustomResourceOptions options)
    
    type: minio:IamServiceAccount
    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 IamServiceAccountArgs
    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 IamServiceAccountArgs
    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 IamServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamServiceAccountArgs
    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 iamServiceAccountResource = new Minio.IamServiceAccount("iamServiceAccountResource", new()
    {
        TargetUser = "string",
        DisableUser = false,
        Policy = "string",
        UpdateSecret = false,
    });
    
    example, err := minio.NewIamServiceAccount(ctx, "iamServiceAccountResource", &minio.IamServiceAccountArgs{
    	TargetUser:   pulumi.String("string"),
    	DisableUser:  pulumi.Bool(false),
    	Policy:       pulumi.String("string"),
    	UpdateSecret: pulumi.Bool(false),
    })
    
    var iamServiceAccountResource = new IamServiceAccount("iamServiceAccountResource", IamServiceAccountArgs.builder()
        .targetUser("string")
        .disableUser(false)
        .policy("string")
        .updateSecret(false)
        .build());
    
    iam_service_account_resource = minio.IamServiceAccount("iamServiceAccountResource",
        target_user="string",
        disable_user=False,
        policy="string",
        update_secret=False)
    
    const iamServiceAccountResource = new minio.IamServiceAccount("iamServiceAccountResource", {
        targetUser: "string",
        disableUser: false,
        policy: "string",
        updateSecret: false,
    });
    
    type: minio:IamServiceAccount
    properties:
        disableUser: false
        policy: string
        targetUser: string
        updateSecret: false
    

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

    TargetUser string
    DisableUser bool
    Disable service account
    Policy string
    policy of service account
    UpdateSecret bool
    rotate secret key
    TargetUser string
    DisableUser bool
    Disable service account
    Policy string
    policy of service account
    UpdateSecret bool
    rotate secret key
    targetUser String
    disableUser Boolean
    Disable service account
    policy String
    policy of service account
    updateSecret Boolean
    rotate secret key
    targetUser string
    disableUser boolean
    Disable service account
    policy string
    policy of service account
    updateSecret boolean
    rotate secret key
    target_user str
    disable_user bool
    Disable service account
    policy str
    policy of service account
    update_secret bool
    rotate secret key
    targetUser String
    disableUser Boolean
    Disable service account
    policy String
    policy of service account
    updateSecret Boolean
    rotate secret key

    Outputs

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

    AccessKey string
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretKey string
    Status string
    AccessKey string
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretKey string
    Status string
    accessKey String
    id String
    The provider-assigned unique ID for this managed resource.
    secretKey String
    status String
    accessKey string
    id string
    The provider-assigned unique ID for this managed resource.
    secretKey string
    status string
    access_key str
    id str
    The provider-assigned unique ID for this managed resource.
    secret_key str
    status str
    accessKey String
    id String
    The provider-assigned unique ID for this managed resource.
    secretKey String
    status String

    Look up Existing IamServiceAccount Resource

    Get an existing IamServiceAccount 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?: IamServiceAccountState, opts?: CustomResourceOptions): IamServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_key: Optional[str] = None,
            disable_user: Optional[bool] = None,
            policy: Optional[str] = None,
            secret_key: Optional[str] = None,
            status: Optional[str] = None,
            target_user: Optional[str] = None,
            update_secret: Optional[bool] = None) -> IamServiceAccount
    func GetIamServiceAccount(ctx *Context, name string, id IDInput, state *IamServiceAccountState, opts ...ResourceOption) (*IamServiceAccount, error)
    public static IamServiceAccount Get(string name, Input<string> id, IamServiceAccountState? state, CustomResourceOptions? opts = null)
    public static IamServiceAccount get(String name, Output<String> id, IamServiceAccountState 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:
    AccessKey string
    DisableUser bool
    Disable service account
    Policy string
    policy of service account
    SecretKey string
    Status string
    TargetUser string
    UpdateSecret bool
    rotate secret key
    AccessKey string
    DisableUser bool
    Disable service account
    Policy string
    policy of service account
    SecretKey string
    Status string
    TargetUser string
    UpdateSecret bool
    rotate secret key
    accessKey String
    disableUser Boolean
    Disable service account
    policy String
    policy of service account
    secretKey String
    status String
    targetUser String
    updateSecret Boolean
    rotate secret key
    accessKey string
    disableUser boolean
    Disable service account
    policy string
    policy of service account
    secretKey string
    status string
    targetUser string
    updateSecret boolean
    rotate secret key
    access_key str
    disable_user bool
    Disable service account
    policy str
    policy of service account
    secret_key str
    status str
    target_user str
    update_secret bool
    rotate secret key
    accessKey String
    disableUser Boolean
    Disable service account
    policy String
    policy of service account
    secretKey String
    status String
    targetUser String
    updateSecret Boolean
    rotate secret key

    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