1. Packages
  2. Discord Provider
  3. API Docs
  4. CategoryChannel
discord 2.0.0 published on Friday, Mar 7, 2025 by lucky3028

discord.CategoryChannel

Explore with Pulumi AI

A resource to create a category channel.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as discord from "@pulumi/discord";

const chatting = new discord.CategoryChannel("chatting", {
    serverId: _var.server_id,
    position: 0,
});
Copy
import pulumi
import pulumi_discord as discord

chatting = discord.CategoryChannel("chatting",
    server_id=var["server_id"],
    position=0)
Copy
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.NewCategoryChannel(ctx, "chatting", &discord.CategoryChannelArgs{
			ServerId: pulumi.Any(_var.Server_id),
			Position: pulumi.Float64(0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Discord = Pulumi.Discord;

return await Deployment.RunAsync(() => 
{
    var chatting = new Discord.CategoryChannel("chatting", new()
    {
        ServerId = @var.Server_id,
        Position = 0,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.discord.CategoryChannel;
import com.pulumi.discord.CategoryChannelArgs;
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 chatting = new CategoryChannel("chatting", CategoryChannelArgs.builder()
            .serverId(var_.server_id())
            .position(0)
            .build());

    }
}
Copy
resources:
  chatting:
    type: discord:CategoryChannel
    properties:
      serverId: ${var.server_id}
      position: 0
Copy

Create CategoryChannel Resource

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

Constructor syntax

new CategoryChannel(name: string, args: CategoryChannelArgs, opts?: CustomResourceOptions);
@overload
def CategoryChannel(resource_name: str,
                    args: CategoryChannelArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def CategoryChannel(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    server_id: Optional[str] = None,
                    name: Optional[str] = None,
                    position: Optional[float] = None,
                    type: Optional[str] = None)
func NewCategoryChannel(ctx *Context, name string, args CategoryChannelArgs, opts ...ResourceOption) (*CategoryChannel, error)
public CategoryChannel(string name, CategoryChannelArgs args, CustomResourceOptions? opts = null)
public CategoryChannel(String name, CategoryChannelArgs args)
public CategoryChannel(String name, CategoryChannelArgs args, CustomResourceOptions options)
type: discord:CategoryChannel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CategoryChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CategoryChannelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CategoryChannelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CategoryChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CategoryChannelArgs
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 categoryChannelResource = new Discord.CategoryChannel("categoryChannelResource", new()
{
    ServerId = "string",
    Name = "string",
    Position = 0,
    Type = "string",
});
Copy
example, err := discord.NewCategoryChannel(ctx, "categoryChannelResource", &discord.CategoryChannelArgs{
ServerId: pulumi.String("string"),
Name: pulumi.String("string"),
Position: pulumi.Float64(0),
Type: pulumi.String("string"),
})
Copy
var categoryChannelResource = new CategoryChannel("categoryChannelResource", CategoryChannelArgs.builder()
    .serverId("string")
    .name("string")
    .position(0)
    .type("string")
    .build());
Copy
category_channel_resource = discord.CategoryChannel("categoryChannelResource",
    server_id="string",
    name="string",
    position=0,
    type="string")
Copy
const categoryChannelResource = new discord.CategoryChannel("categoryChannelResource", {
    serverId: "string",
    name: "string",
    position: 0,
    type: "string",
});
Copy
type: discord:CategoryChannel
properties:
    name: string
    position: 0
    serverId: string
    type: string
Copy

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

ServerId This property is required. string
ID of server this channel is in.
Name string
Name of the channel.
Position double
Position of the channel, 0-indexed.
Type string
The type of the channel. This is only for internal use and should never be provided.
ServerId This property is required. string
ID of server this channel is in.
Name string
Name of the channel.
Position float64
Position of the channel, 0-indexed.
Type string
The type of the channel. This is only for internal use and should never be provided.
serverId This property is required. String
ID of server this channel is in.
name String
Name of the channel.
position Double
Position of the channel, 0-indexed.
type String
The type of the channel. This is only for internal use and should never be provided.
serverId This property is required. string
ID of server this channel is in.
name string
Name of the channel.
position number
Position of the channel, 0-indexed.
type string
The type of the channel. This is only for internal use and should never be provided.
server_id This property is required. str
ID of server this channel is in.
name str
Name of the channel.
position float
Position of the channel, 0-indexed.
type str
The type of the channel. This is only for internal use and should never be provided.
serverId This property is required. String
ID of server this channel is in.
name String
Name of the channel.
position Number
Position of the channel, 0-indexed.
type String
The type of the channel. This is only for internal use and should never be provided.

Outputs

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

ChannelId string
The ID of the channel.
Id string
The provider-assigned unique ID for this managed resource.
ChannelId string
The ID of the channel.
Id string
The provider-assigned unique ID for this managed resource.
channelId String
The ID of the channel.
id String
The provider-assigned unique ID for this managed resource.
channelId string
The ID of the channel.
id string
The provider-assigned unique ID for this managed resource.
channel_id str
The ID of the channel.
id str
The provider-assigned unique ID for this managed resource.
channelId String
The ID of the channel.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing CategoryChannel Resource

Get an existing CategoryChannel 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?: CategoryChannelState, opts?: CustomResourceOptions): CategoryChannel
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        channel_id: Optional[str] = None,
        name: Optional[str] = None,
        position: Optional[float] = None,
        server_id: Optional[str] = None,
        type: Optional[str] = None) -> CategoryChannel
func GetCategoryChannel(ctx *Context, name string, id IDInput, state *CategoryChannelState, opts ...ResourceOption) (*CategoryChannel, error)
public static CategoryChannel Get(string name, Input<string> id, CategoryChannelState? state, CustomResourceOptions? opts = null)
public static CategoryChannel get(String name, Output<String> id, CategoryChannelState state, CustomResourceOptions options)
resources:  _:    type: discord:CategoryChannel    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ChannelId string
The ID of the channel.
Name string
Name of the channel.
Position double
Position of the channel, 0-indexed.
ServerId string
ID of server this channel is in.
Type string
The type of the channel. This is only for internal use and should never be provided.
ChannelId string
The ID of the channel.
Name string
Name of the channel.
Position float64
Position of the channel, 0-indexed.
ServerId string
ID of server this channel is in.
Type string
The type of the channel. This is only for internal use and should never be provided.
channelId String
The ID of the channel.
name String
Name of the channel.
position Double
Position of the channel, 0-indexed.
serverId String
ID of server this channel is in.
type String
The type of the channel. This is only for internal use and should never be provided.
channelId string
The ID of the channel.
name string
Name of the channel.
position number
Position of the channel, 0-indexed.
serverId string
ID of server this channel is in.
type string
The type of the channel. This is only for internal use and should never be provided.
channel_id str
The ID of the channel.
name str
Name of the channel.
position float
Position of the channel, 0-indexed.
server_id str
ID of server this channel is in.
type str
The type of the channel. This is only for internal use and should never be provided.
channelId String
The ID of the channel.
name String
Name of the channel.
position Number
Position of the channel, 0-indexed.
serverId String
ID of server this channel is in.
type String
The type of the channel. This is only for internal use and should never be provided.

Import

$ pulumi import discord:index/categoryChannel:CategoryChannel example "<channel id>"
Copy

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.