1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. maxcompute
  5. TenantRoleUserAttachment
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi
alicloud logo
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi

    Provides a Max Compute Tenant Role User Attachment resource.

    For information about Max Compute Tenant Role User Attachment and how to use it, see What is Tenant Role User Attachment.

    NOTE: Available since v1.270.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default0 = new alicloud.maxcompute.TenantRoleUserAttachment("default0", {
        accountId: "p4_200053869413670560",
        tenantRole: "admin",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default0 = alicloud.maxcompute.TenantRoleUserAttachment("default0",
        account_id="p4_200053869413670560",
        tenant_role="admin")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/maxcompute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := maxcompute.NewTenantRoleUserAttachment(ctx, "default0", &maxcompute.TenantRoleUserAttachmentArgs{
    			AccountId:  pulumi.String("p4_200053869413670560"),
    			TenantRole: pulumi.String("admin"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var default0 = new AliCloud.MaxCompute.TenantRoleUserAttachment("default0", new()
        {
            AccountId = "p4_200053869413670560",
            TenantRole = "admin",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.maxcompute.TenantRoleUserAttachment;
    import com.pulumi.alicloud.maxcompute.TenantRoleUserAttachmentArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default0 = new TenantRoleUserAttachment("default0", TenantRoleUserAttachmentArgs.builder()
                .accountId("p4_200053869413670560")
                .tenantRole("admin")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default0:
        type: alicloud:maxcompute:TenantRoleUserAttachment
        properties:
          accountId: p4_200053869413670560
          tenantRole: admin
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create TenantRoleUserAttachment Resource

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

    Constructor syntax

    new TenantRoleUserAttachment(name: string, args?: TenantRoleUserAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def TenantRoleUserAttachment(resource_name: str,
                                 args: Optional[TenantRoleUserAttachmentArgs] = None,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def TenantRoleUserAttachment(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 account_id: Optional[str] = None,
                                 tenant_role: Optional[str] = None)
    func NewTenantRoleUserAttachment(ctx *Context, name string, args *TenantRoleUserAttachmentArgs, opts ...ResourceOption) (*TenantRoleUserAttachment, error)
    public TenantRoleUserAttachment(string name, TenantRoleUserAttachmentArgs? args = null, CustomResourceOptions? opts = null)
    public TenantRoleUserAttachment(String name, TenantRoleUserAttachmentArgs args)
    public TenantRoleUserAttachment(String name, TenantRoleUserAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:maxcompute:TenantRoleUserAttachment
    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 TenantRoleUserAttachmentArgs
    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 TenantRoleUserAttachmentArgs
    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 TenantRoleUserAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TenantRoleUserAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TenantRoleUserAttachmentArgs
    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 tenantRoleUserAttachmentResource = new AliCloud.MaxCompute.TenantRoleUserAttachment("tenantRoleUserAttachmentResource", new()
    {
        AccountId = "string",
        TenantRole = "string",
    });
    
    example, err := maxcompute.NewTenantRoleUserAttachment(ctx, "tenantRoleUserAttachmentResource", &maxcompute.TenantRoleUserAttachmentArgs{
    	AccountId:  pulumi.String("string"),
    	TenantRole: pulumi.String("string"),
    })
    
    var tenantRoleUserAttachmentResource = new TenantRoleUserAttachment("tenantRoleUserAttachmentResource", TenantRoleUserAttachmentArgs.builder()
        .accountId("string")
        .tenantRole("string")
        .build());
    
    tenant_role_user_attachment_resource = alicloud.maxcompute.TenantRoleUserAttachment("tenantRoleUserAttachmentResource",
        account_id="string",
        tenant_role="string")
    
    const tenantRoleUserAttachmentResource = new alicloud.maxcompute.TenantRoleUserAttachment("tenantRoleUserAttachmentResource", {
        accountId: "string",
        tenantRole: "string",
    });
    
    type: alicloud:maxcompute:TenantRoleUserAttachment
    properties:
        accountId: string
        tenantRole: string
    

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

    AccountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    TenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    AccountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    TenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId String

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole String
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    account_id str

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenant_role str
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId String

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole String
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TenantRoleUserAttachment 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 TenantRoleUserAttachment Resource

    Get an existing TenantRoleUserAttachment 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?: TenantRoleUserAttachmentState, opts?: CustomResourceOptions): TenantRoleUserAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            tenant_role: Optional[str] = None) -> TenantRoleUserAttachment
    func GetTenantRoleUserAttachment(ctx *Context, name string, id IDInput, state *TenantRoleUserAttachmentState, opts ...ResourceOption) (*TenantRoleUserAttachment, error)
    public static TenantRoleUserAttachment Get(string name, Input<string> id, TenantRoleUserAttachmentState? state, CustomResourceOptions? opts = null)
    public static TenantRoleUserAttachment get(String name, Output<String> id, TenantRoleUserAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:maxcompute:TenantRoleUserAttachment    get:      id: ${id}
    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:
    AccountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    TenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    AccountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    TenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId String

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole String
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId string

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole string
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    account_id str

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenant_role str
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.
    accountId String

    Account UID

    1. If the user is a primary account, the AccountId format is UID. Example: 200231703336555555

    2. If the user is a RAM user, the AccountId format is p4_UID. Example: p4_200531704446555555

    3. If the user is a RAM role, the AccountId format is v4_UID. Example: v4_300007628597555555

    tenantRole String
    Tenant role. By default, admin and super_administrator are available. You can add more roles in the console.

    Import

    Max Compute Tenant Role User Attachment can be imported using the id, e.g.

    $ pulumi import alicloud:maxcompute/tenantRoleUserAttachment:TenantRoleUserAttachment example <account_id>:<tenant_role>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate