1. Packages
  2. Packages
  3. Discord Provider
  4. API Docs
  5. RoleConnectionMetadata
Viewing docs for discord 2.7.0
published on Monday, May 18, 2026 by lucky3028
Viewing docs for discord 2.7.0
published on Monday, May 18, 2026 by lucky3028

    A resource to manage application role connection metadata. This defines the criteria that can be used for linked roles in servers where the application is installed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as discord from "@pulumi/discord";
    
    const example = new discord.RoleConnectionMetadata("example", {
        applicationId: "123456789012345678",
        metadatas: [
            {
                key: "verified",
                name: "Verified",
                type: 7,
                description: "Has verified their account",
            },
            {
                key: "member_since",
                name: "Member Since",
                type: 6,
                description: "Date the user became a member",
            },
        ],
    });
    
    import pulumi
    import pulumi_discord as discord
    
    example = discord.RoleConnectionMetadata("example",
        application_id="123456789012345678",
        metadatas=[
            {
                "key": "verified",
                "name": "Verified",
                "type": 7,
                "description": "Has verified their account",
            },
            {
                "key": "member_since",
                "name": "Member Since",
                "type": 6,
                "description": "Date the user became a member",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/discord/v2/discord"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := discord.NewRoleConnectionMetadata(ctx, "example", &discord.RoleConnectionMetadataArgs{
    			ApplicationId: pulumi.String("123456789012345678"),
    			Metadatas: discord.RoleConnectionMetadataMetadataArray{
    				&discord.RoleConnectionMetadataMetadataArgs{
    					Key:         pulumi.String("verified"),
    					Name:        pulumi.String("Verified"),
    					Type:        pulumi.Float64(7),
    					Description: pulumi.String("Has verified their account"),
    				},
    				&discord.RoleConnectionMetadataMetadataArgs{
    					Key:         pulumi.String("member_since"),
    					Name:        pulumi.String("Member Since"),
    					Type:        pulumi.Float64(6),
    					Description: pulumi.String("Date the user became a member"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Discord = Pulumi.Discord;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Discord.RoleConnectionMetadata("example", new()
        {
            ApplicationId = "123456789012345678",
            Metadatas = new[]
            {
                new Discord.Inputs.RoleConnectionMetadataMetadataArgs
                {
                    Key = "verified",
                    Name = "Verified",
                    Type = 7,
                    Description = "Has verified their account",
                },
                new Discord.Inputs.RoleConnectionMetadataMetadataArgs
                {
                    Key = "member_since",
                    Name = "Member Since",
                    Type = 6,
                    Description = "Date the user became a member",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.discord.RoleConnectionMetadata;
    import com.pulumi.discord.RoleConnectionMetadataArgs;
    import com.pulumi.discord.inputs.RoleConnectionMetadataMetadataArgs;
    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 RoleConnectionMetadata("example", RoleConnectionMetadataArgs.builder()
                .applicationId("123456789012345678")
                .metadatas(            
                    RoleConnectionMetadataMetadataArgs.builder()
                        .key("verified")
                        .name("Verified")
                        .type(7.0)
                        .description("Has verified their account")
                        .build(),
                    RoleConnectionMetadataMetadataArgs.builder()
                        .key("member_since")
                        .name("Member Since")
                        .type(6.0)
                        .description("Date the user became a member")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: discord:RoleConnectionMetadata
        properties:
          applicationId: '123456789012345678'
          metadatas:
            - key: verified
              name: Verified
              type: 7
              description: Has verified their account
            - key: member_since
              name: Member Since
              type: 6
              description: Date the user became a member
    
    Example coming soon!
    

    Create RoleConnectionMetadata Resource

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

    Constructor syntax

    new RoleConnectionMetadata(name: string, args: RoleConnectionMetadataArgs, opts?: CustomResourceOptions);
    @overload
    def RoleConnectionMetadata(resource_name: str,
                               args: RoleConnectionMetadataArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def RoleConnectionMetadata(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               application_id: Optional[str] = None,
                               metadatas: Optional[Sequence[RoleConnectionMetadataMetadataArgs]] = None,
                               role_connection_metadata_id: Optional[str] = None)
    func NewRoleConnectionMetadata(ctx *Context, name string, args RoleConnectionMetadataArgs, opts ...ResourceOption) (*RoleConnectionMetadata, error)
    public RoleConnectionMetadata(string name, RoleConnectionMetadataArgs args, CustomResourceOptions? opts = null)
    public RoleConnectionMetadata(String name, RoleConnectionMetadataArgs args)
    public RoleConnectionMetadata(String name, RoleConnectionMetadataArgs args, CustomResourceOptions options)
    
    type: discord:RoleConnectionMetadata
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "discord_roleconnectionmetadata" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args RoleConnectionMetadataArgs
    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 RoleConnectionMetadataArgs
    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 RoleConnectionMetadataArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleConnectionMetadataArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleConnectionMetadataArgs
    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 roleConnectionMetadataResource = new Discord.RoleConnectionMetadata("roleConnectionMetadataResource", new()
    {
        ApplicationId = "string",
        Metadatas = new[]
        {
            new Discord.Inputs.RoleConnectionMetadataMetadataArgs
            {
                Description = "string",
                Key = "string",
                Name = "string",
                Type = 0,
            },
        },
        RoleConnectionMetadataId = "string",
    });
    
    example, err := discord.NewRoleConnectionMetadata(ctx, "roleConnectionMetadataResource", &discord.RoleConnectionMetadataArgs{
    	ApplicationId: pulumi.String("string"),
    	Metadatas: discord.RoleConnectionMetadataMetadataArray{
    		&discord.RoleConnectionMetadataMetadataArgs{
    			Description: pulumi.String("string"),
    			Key:         pulumi.String("string"),
    			Name:        pulumi.String("string"),
    			Type:        pulumi.Float64(0),
    		},
    	},
    	RoleConnectionMetadataId: pulumi.String("string"),
    })
    
    resource "discord_roleconnectionmetadata" "roleConnectionMetadataResource" {
      application_id = "string"
      metadatas {
        description = "string"
        key         = "string"
        name        = "string"
        type        = 0
      }
      role_connection_metadata_id = "string"
    }
    
    var roleConnectionMetadataResource = new RoleConnectionMetadata("roleConnectionMetadataResource", RoleConnectionMetadataArgs.builder()
        .applicationId("string")
        .metadatas(RoleConnectionMetadataMetadataArgs.builder()
            .description("string")
            .key("string")
            .name("string")
            .type(0.0)
            .build())
        .roleConnectionMetadataId("string")
        .build());
    
    role_connection_metadata_resource = discord.RoleConnectionMetadata("roleConnectionMetadataResource",
        application_id="string",
        metadatas=[{
            "description": "string",
            "key": "string",
            "name": "string",
            "type": float(0),
        }],
        role_connection_metadata_id="string")
    
    const roleConnectionMetadataResource = new discord.RoleConnectionMetadata("roleConnectionMetadataResource", {
        applicationId: "string",
        metadatas: [{
            description: "string",
            key: "string",
            name: "string",
            type: 0,
        }],
        roleConnectionMetadataId: "string",
    });
    
    type: discord:RoleConnectionMetadata
    properties:
        applicationId: string
        metadatas:
            - description: string
              key: string
              name: string
              type: 0
        roleConnectionMetadataId: string
    

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

    ApplicationId string
    The ID of the application to configure role connection metadata for.
    Metadatas List<RoleConnectionMetadataMetadata>
    List of role connection metadata records. An application can have a maximum of 5.
    RoleConnectionMetadataId string
    The ID of this resource.
    ApplicationId string
    The ID of the application to configure role connection metadata for.
    Metadatas []RoleConnectionMetadataMetadataArgs
    List of role connection metadata records. An application can have a maximum of 5.
    RoleConnectionMetadataId string
    The ID of this resource.
    application_id string
    The ID of the application to configure role connection metadata for.
    metadatas list(object)
    List of role connection metadata records. An application can have a maximum of 5.
    role_connection_metadata_id string
    The ID of this resource.
    applicationId String
    The ID of the application to configure role connection metadata for.
    metadatas List<RoleConnectionMetadataMetadata>
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId String
    The ID of this resource.
    applicationId string
    The ID of the application to configure role connection metadata for.
    metadatas RoleConnectionMetadataMetadata[]
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId string
    The ID of this resource.
    application_id str
    The ID of the application to configure role connection metadata for.
    metadatas Sequence[RoleConnectionMetadataMetadataArgs]
    List of role connection metadata records. An application can have a maximum of 5.
    role_connection_metadata_id str
    The ID of this resource.
    applicationId String
    The ID of the application to configure role connection metadata for.
    metadatas List<Property Map>
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId String
    The ID of this resource.

    Outputs

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

    Get an existing RoleConnectionMetadata 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?: RoleConnectionMetadataState, opts?: CustomResourceOptions): RoleConnectionMetadata
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            metadatas: Optional[Sequence[RoleConnectionMetadataMetadataArgs]] = None,
            role_connection_metadata_id: Optional[str] = None) -> RoleConnectionMetadata
    func GetRoleConnectionMetadata(ctx *Context, name string, id IDInput, state *RoleConnectionMetadataState, opts ...ResourceOption) (*RoleConnectionMetadata, error)
    public static RoleConnectionMetadata Get(string name, Input<string> id, RoleConnectionMetadataState? state, CustomResourceOptions? opts = null)
    public static RoleConnectionMetadata get(String name, Output<String> id, RoleConnectionMetadataState state, CustomResourceOptions options)
    resources:  _:    type: discord:RoleConnectionMetadata    get:      id: ${id}
    import {
      to = discord_roleconnectionmetadata.example
      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:
    ApplicationId string
    The ID of the application to configure role connection metadata for.
    Metadatas List<RoleConnectionMetadataMetadata>
    List of role connection metadata records. An application can have a maximum of 5.
    RoleConnectionMetadataId string
    The ID of this resource.
    ApplicationId string
    The ID of the application to configure role connection metadata for.
    Metadatas []RoleConnectionMetadataMetadataArgs
    List of role connection metadata records. An application can have a maximum of 5.
    RoleConnectionMetadataId string
    The ID of this resource.
    application_id string
    The ID of the application to configure role connection metadata for.
    metadatas list(object)
    List of role connection metadata records. An application can have a maximum of 5.
    role_connection_metadata_id string
    The ID of this resource.
    applicationId String
    The ID of the application to configure role connection metadata for.
    metadatas List<RoleConnectionMetadataMetadata>
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId String
    The ID of this resource.
    applicationId string
    The ID of the application to configure role connection metadata for.
    metadatas RoleConnectionMetadataMetadata[]
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId string
    The ID of this resource.
    application_id str
    The ID of the application to configure role connection metadata for.
    metadatas Sequence[RoleConnectionMetadataMetadataArgs]
    List of role connection metadata records. An application can have a maximum of 5.
    role_connection_metadata_id str
    The ID of this resource.
    applicationId String
    The ID of the application to configure role connection metadata for.
    metadatas List<Property Map>
    List of role connection metadata records. An application can have a maximum of 5.
    roleConnectionMetadataId String
    The ID of this resource.

    Supporting Types

    RoleConnectionMetadataMetadata, RoleConnectionMetadataMetadataArgs

    Description string
    Description of the metadata field (1-200 characters).
    Key string
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    Name string
    Name of the metadata field (1-100 characters).
    Type double
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    Description string
    Description of the metadata field (1-200 characters).
    Key string
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    Name string
    Name of the metadata field (1-100 characters).
    Type float64
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    description string
    Description of the metadata field (1-200 characters).
    key string
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    name string
    Name of the metadata field (1-100 characters).
    type number
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    description String
    Description of the metadata field (1-200 characters).
    key String
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    name String
    Name of the metadata field (1-100 characters).
    type Double
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    description string
    Description of the metadata field (1-200 characters).
    key string
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    name string
    Name of the metadata field (1-100 characters).
    type number
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    description str
    Description of the metadata field (1-200 characters).
    key str
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    name str
    Name of the metadata field (1-100 characters).
    type float
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.
    description String
    Description of the metadata field (1-200 characters).
    key String
    Dictionary key for the metadata field (must be a-z, 0-9, or _ characters; 1-50 characters).
    name String
    Name of the metadata field (1-100 characters).
    type Number
    Type of metadata value. 1=integerlessthanorequal, 2=integergreaterthanorequal, 3=integerequal, 4=integernotequal, 5=datetimelessthanorequal, 6=datetimegreaterthanorequal, 7=booleanequal, 8=booleannotequal.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import discord:index/roleConnectionMetadata:RoleConnectionMetadata example "<application_id>"
    

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

    Package Details

    Repository
    discord lucky3028/terraform-provider-discord
    License
    Notes
    This Pulumi package is based on the discord Terraform Provider.
    Viewing docs for discord 2.7.0
    published on Monday, May 18, 2026 by lucky3028
      Try Pulumi Cloud free. Your team will thank you.