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

discord.Server

Explore with Pulumi AI

A resource to create a server.

Example Usage

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

const myServer = new discord.Server("myServer", {region: "us-west"});
Copy
import pulumi
import pulumi_discord as discord

my_server = discord.Server("myServer", region="us-west")
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.NewServer(ctx, "myServer", &discord.ServerArgs{
			Region: pulumi.String("us-west"),
		})
		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 myServer = new Discord.Server("myServer", new()
    {
        Region = "us-west",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.discord.Server;
import com.pulumi.discord.ServerArgs;
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 myServer = new Server("myServer", ServerArgs.builder()
            .region("us-west")
            .build());

    }
}
Copy
resources:
  myServer:
    type: discord:Server
    properties:
      region: us-west
Copy

Create Server Resource

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

Constructor syntax

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

@overload
def Server(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           afk_channel_id: Optional[str] = None,
           afk_timeout: Optional[float] = None,
           default_message_notifications: Optional[float] = None,
           explicit_content_filter: Optional[float] = None,
           icon_data_uri: Optional[str] = None,
           icon_url: Optional[str] = None,
           name: Optional[str] = None,
           owner_id: Optional[str] = None,
           region: Optional[str] = None,
           splash_data_uri: Optional[str] = None,
           splash_url: Optional[str] = None,
           verification_level: Optional[float] = None)
func NewServer(ctx *Context, name string, args *ServerArgs, opts ...ResourceOption) (*Server, error)
public Server(string name, ServerArgs? args = null, CustomResourceOptions? opts = null)
public Server(String name, ServerArgs args)
public Server(String name, ServerArgs args, CustomResourceOptions options)
type: discord:Server
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 ServerArgs
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 ServerArgs
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 ServerArgs
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 ServerArgs
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. ServerArgs
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 serverResource = new Discord.Server("serverResource", new()
{
    AfkChannelId = "string",
    AfkTimeout = 0,
    DefaultMessageNotifications = 0,
    ExplicitContentFilter = 0,
    IconDataUri = "string",
    IconUrl = "string",
    Name = "string",
    OwnerId = "string",
    Region = "string",
    SplashDataUri = "string",
    SplashUrl = "string",
    VerificationLevel = 0,
});
Copy
example, err := discord.NewServer(ctx, "serverResource", &discord.ServerArgs{
AfkChannelId: pulumi.String("string"),
AfkTimeout: pulumi.Float64(0),
DefaultMessageNotifications: pulumi.Float64(0),
ExplicitContentFilter: pulumi.Float64(0),
IconDataUri: pulumi.String("string"),
IconUrl: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerId: pulumi.String("string"),
Region: pulumi.String("string"),
SplashDataUri: pulumi.String("string"),
SplashUrl: pulumi.String("string"),
VerificationLevel: pulumi.Float64(0),
})
Copy
var serverResource = new Server("serverResource", ServerArgs.builder()
    .afkChannelId("string")
    .afkTimeout(0)
    .defaultMessageNotifications(0)
    .explicitContentFilter(0)
    .iconDataUri("string")
    .iconUrl("string")
    .name("string")
    .ownerId("string")
    .region("string")
    .splashDataUri("string")
    .splashUrl("string")
    .verificationLevel(0)
    .build());
Copy
server_resource = discord.Server("serverResource",
    afk_channel_id="string",
    afk_timeout=0,
    default_message_notifications=0,
    explicit_content_filter=0,
    icon_data_uri="string",
    icon_url="string",
    name="string",
    owner_id="string",
    region="string",
    splash_data_uri="string",
    splash_url="string",
    verification_level=0)
Copy
const serverResource = new discord.Server("serverResource", {
    afkChannelId: "string",
    afkTimeout: 0,
    defaultMessageNotifications: 0,
    explicitContentFilter: 0,
    iconDataUri: "string",
    iconUrl: "string",
    name: "string",
    ownerId: "string",
    region: "string",
    splashDataUri: "string",
    splashUrl: "string",
    verificationLevel: 0,
});
Copy
type: discord:Server
properties:
    afkChannelId: string
    afkTimeout: 0
    defaultMessageNotifications: 0
    explicitContentFilter: 0
    iconDataUri: string
    iconUrl: string
    name: string
    ownerId: string
    region: string
    splashDataUri: string
    splashUrl: string
    verificationLevel: 0
Copy

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

AfkChannelId string
ID of the channel AFK users will be moved to.
AfkTimeout double
How many seconds before moving an AFK user.
DefaultMessageNotifications double
Default message notification settings. (0 = all messages, 1 = mentions)
ExplicitContentFilter double
Explicit content filter level of the server.
IconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
IconUrl string
Remote URL to set the icon of the server to.
Name string
Name of the server.
OwnerId string
Owner ID of the server. Setting this will transfer ownership.
Region string
Region of the server.
SplashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
SplashUrl string
Remote URL to set the splash image of the server to.
VerificationLevel double
Verification level of the server.
AfkChannelId string
ID of the channel AFK users will be moved to.
AfkTimeout float64
How many seconds before moving an AFK user.
DefaultMessageNotifications float64
Default message notification settings. (0 = all messages, 1 = mentions)
ExplicitContentFilter float64
Explicit content filter level of the server.
IconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
IconUrl string
Remote URL to set the icon of the server to.
Name string
Name of the server.
OwnerId string
Owner ID of the server. Setting this will transfer ownership.
Region string
Region of the server.
SplashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
SplashUrl string
Remote URL to set the splash image of the server to.
VerificationLevel float64
Verification level of the server.
afkChannelId String
ID of the channel AFK users will be moved to.
afkTimeout Double
How many seconds before moving an AFK user.
defaultMessageNotifications Double
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter Double
Explicit content filter level of the server.
iconDataUri String
Data URI of an image to set the server icon to. Overrides icon_url.
iconUrl String
Remote URL to set the icon of the server to.
name String
Name of the server.
ownerId String
Owner ID of the server. Setting this will transfer ownership.
region String
Region of the server.
splashDataUri String
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashUrl String
Remote URL to set the splash image of the server to.
verificationLevel Double
Verification level of the server.
afkChannelId string
ID of the channel AFK users will be moved to.
afkTimeout number
How many seconds before moving an AFK user.
defaultMessageNotifications number
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter number
Explicit content filter level of the server.
iconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
iconUrl string
Remote URL to set the icon of the server to.
name string
Name of the server.
ownerId string
Owner ID of the server. Setting this will transfer ownership.
region string
Region of the server.
splashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashUrl string
Remote URL to set the splash image of the server to.
verificationLevel number
Verification level of the server.
afk_channel_id str
ID of the channel AFK users will be moved to.
afk_timeout float
How many seconds before moving an AFK user.
default_message_notifications float
Default message notification settings. (0 = all messages, 1 = mentions)
explicit_content_filter float
Explicit content filter level of the server.
icon_data_uri str
Data URI of an image to set the server icon to. Overrides icon_url.
icon_url str
Remote URL to set the icon of the server to.
name str
Name of the server.
owner_id str
Owner ID of the server. Setting this will transfer ownership.
region str
Region of the server.
splash_data_uri str
Data URI of an image to set the splash image of the server to. Overrides splash_url
splash_url str
Remote URL to set the splash image of the server to.
verification_level float
Verification level of the server.
afkChannelId String
ID of the channel AFK users will be moved to.
afkTimeout Number
How many seconds before moving an AFK user.
defaultMessageNotifications Number
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter Number
Explicit content filter level of the server.
iconDataUri String
Data URI of an image to set the server icon to. Overrides icon_url.
iconUrl String
Remote URL to set the icon of the server to.
name String
Name of the server.
ownerId String
Owner ID of the server. Setting this will transfer ownership.
region String
Region of the server.
splashDataUri String
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashUrl String
Remote URL to set the splash image of the server to.
verificationLevel Number
Verification level of the server.

Outputs

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

IconHash string
Hash of the icon.
Id string
The provider-assigned unique ID for this managed resource.
Roles List<ServerRole>
List of roles in the server.
ServerId string
The ID of the server to manage.
SplashHash string
Hash of the splash.
IconHash string
Hash of the icon.
Id string
The provider-assigned unique ID for this managed resource.
Roles []ServerRole
List of roles in the server.
ServerId string
The ID of the server to manage.
SplashHash string
Hash of the splash.
iconHash String
Hash of the icon.
id String
The provider-assigned unique ID for this managed resource.
roles List<ServerRole>
List of roles in the server.
serverId String
The ID of the server to manage.
splashHash String
Hash of the splash.
iconHash string
Hash of the icon.
id string
The provider-assigned unique ID for this managed resource.
roles ServerRole[]
List of roles in the server.
serverId string
The ID of the server to manage.
splashHash string
Hash of the splash.
icon_hash str
Hash of the icon.
id str
The provider-assigned unique ID for this managed resource.
roles Sequence[ServerRole]
List of roles in the server.
server_id str
The ID of the server to manage.
splash_hash str
Hash of the splash.
iconHash String
Hash of the icon.
id String
The provider-assigned unique ID for this managed resource.
roles List<Property Map>
List of roles in the server.
serverId String
The ID of the server to manage.
splashHash String
Hash of the splash.

Look up Existing Server Resource

Get an existing Server 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?: ServerState, opts?: CustomResourceOptions): Server
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        afk_channel_id: Optional[str] = None,
        afk_timeout: Optional[float] = None,
        default_message_notifications: Optional[float] = None,
        explicit_content_filter: Optional[float] = None,
        icon_data_uri: Optional[str] = None,
        icon_hash: Optional[str] = None,
        icon_url: Optional[str] = None,
        name: Optional[str] = None,
        owner_id: Optional[str] = None,
        region: Optional[str] = None,
        roles: Optional[Sequence[ServerRoleArgs]] = None,
        server_id: Optional[str] = None,
        splash_data_uri: Optional[str] = None,
        splash_hash: Optional[str] = None,
        splash_url: Optional[str] = None,
        verification_level: Optional[float] = None) -> Server
func GetServer(ctx *Context, name string, id IDInput, state *ServerState, opts ...ResourceOption) (*Server, error)
public static Server Get(string name, Input<string> id, ServerState? state, CustomResourceOptions? opts = null)
public static Server get(String name, Output<String> id, ServerState state, CustomResourceOptions options)
resources:  _:    type: discord:Server    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:
AfkChannelId string
ID of the channel AFK users will be moved to.
AfkTimeout double
How many seconds before moving an AFK user.
DefaultMessageNotifications double
Default message notification settings. (0 = all messages, 1 = mentions)
ExplicitContentFilter double
Explicit content filter level of the server.
IconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
IconHash string
Hash of the icon.
IconUrl string
Remote URL to set the icon of the server to.
Name string
Name of the server.
OwnerId string
Owner ID of the server. Setting this will transfer ownership.
Region string
Region of the server.
Roles List<ServerRole>
List of roles in the server.
ServerId string
The ID of the server to manage.
SplashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
SplashHash string
Hash of the splash.
SplashUrl string
Remote URL to set the splash image of the server to.
VerificationLevel double
Verification level of the server.
AfkChannelId string
ID of the channel AFK users will be moved to.
AfkTimeout float64
How many seconds before moving an AFK user.
DefaultMessageNotifications float64
Default message notification settings. (0 = all messages, 1 = mentions)
ExplicitContentFilter float64
Explicit content filter level of the server.
IconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
IconHash string
Hash of the icon.
IconUrl string
Remote URL to set the icon of the server to.
Name string
Name of the server.
OwnerId string
Owner ID of the server. Setting this will transfer ownership.
Region string
Region of the server.
Roles []ServerRoleArgs
List of roles in the server.
ServerId string
The ID of the server to manage.
SplashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
SplashHash string
Hash of the splash.
SplashUrl string
Remote URL to set the splash image of the server to.
VerificationLevel float64
Verification level of the server.
afkChannelId String
ID of the channel AFK users will be moved to.
afkTimeout Double
How many seconds before moving an AFK user.
defaultMessageNotifications Double
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter Double
Explicit content filter level of the server.
iconDataUri String
Data URI of an image to set the server icon to. Overrides icon_url.
iconHash String
Hash of the icon.
iconUrl String
Remote URL to set the icon of the server to.
name String
Name of the server.
ownerId String
Owner ID of the server. Setting this will transfer ownership.
region String
Region of the server.
roles List<ServerRole>
List of roles in the server.
serverId String
The ID of the server to manage.
splashDataUri String
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashHash String
Hash of the splash.
splashUrl String
Remote URL to set the splash image of the server to.
verificationLevel Double
Verification level of the server.
afkChannelId string
ID of the channel AFK users will be moved to.
afkTimeout number
How many seconds before moving an AFK user.
defaultMessageNotifications number
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter number
Explicit content filter level of the server.
iconDataUri string
Data URI of an image to set the server icon to. Overrides icon_url.
iconHash string
Hash of the icon.
iconUrl string
Remote URL to set the icon of the server to.
name string
Name of the server.
ownerId string
Owner ID of the server. Setting this will transfer ownership.
region string
Region of the server.
roles ServerRole[]
List of roles in the server.
serverId string
The ID of the server to manage.
splashDataUri string
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashHash string
Hash of the splash.
splashUrl string
Remote URL to set the splash image of the server to.
verificationLevel number
Verification level of the server.
afk_channel_id str
ID of the channel AFK users will be moved to.
afk_timeout float
How many seconds before moving an AFK user.
default_message_notifications float
Default message notification settings. (0 = all messages, 1 = mentions)
explicit_content_filter float
Explicit content filter level of the server.
icon_data_uri str
Data URI of an image to set the server icon to. Overrides icon_url.
icon_hash str
Hash of the icon.
icon_url str
Remote URL to set the icon of the server to.
name str
Name of the server.
owner_id str
Owner ID of the server. Setting this will transfer ownership.
region str
Region of the server.
roles Sequence[ServerRoleArgs]
List of roles in the server.
server_id str
The ID of the server to manage.
splash_data_uri str
Data URI of an image to set the splash image of the server to. Overrides splash_url
splash_hash str
Hash of the splash.
splash_url str
Remote URL to set the splash image of the server to.
verification_level float
Verification level of the server.
afkChannelId String
ID of the channel AFK users will be moved to.
afkTimeout Number
How many seconds before moving an AFK user.
defaultMessageNotifications Number
Default message notification settings. (0 = all messages, 1 = mentions)
explicitContentFilter Number
Explicit content filter level of the server.
iconDataUri String
Data URI of an image to set the server icon to. Overrides icon_url.
iconHash String
Hash of the icon.
iconUrl String
Remote URL to set the icon of the server to.
name String
Name of the server.
ownerId String
Owner ID of the server. Setting this will transfer ownership.
region String
Region of the server.
roles List<Property Map>
List of roles in the server.
serverId String
The ID of the server to manage.
splashDataUri String
Data URI of an image to set the splash image of the server to. Overrides splash_url
splashHash String
Hash of the splash.
splashUrl String
Remote URL to set the splash image of the server to.
verificationLevel Number
Verification level of the server.

Supporting Types

ServerRole
, ServerRoleArgs

Color This property is required. double
Hoist This property is required. bool
Id This property is required. string
Managed This property is required. bool
Mentionable This property is required. bool
Name This property is required. string
Permissions This property is required. double
Position This property is required. double
Color This property is required. float64
Hoist This property is required. bool
Id This property is required. string
Managed This property is required. bool
Mentionable This property is required. bool
Name This property is required. string
Permissions This property is required. float64
Position This property is required. float64
color This property is required. Double
hoist This property is required. Boolean
id This property is required. String
managed This property is required. Boolean
mentionable This property is required. Boolean
name This property is required. String
permissions This property is required. Double
position This property is required. Double
color This property is required. number
hoist This property is required. boolean
id This property is required. string
managed This property is required. boolean
mentionable This property is required. boolean
name This property is required. string
permissions This property is required. number
position This property is required. number
color This property is required. float
hoist This property is required. bool
id This property is required. str
managed This property is required. bool
mentionable This property is required. bool
name This property is required. str
permissions This property is required. float
position This property is required. float
color This property is required. Number
hoist This property is required. Boolean
id This property is required. String
managed This property is required. Boolean
mentionable This property is required. Boolean
name This property is required. String
permissions This property is required. Number
position This property is required. Number

Import

$ pulumi import discord:index/server:Server example "<server 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.