Viewing docs for discord 2.5.1
published on Thursday, Mar 19, 2026 by lucky3028
published on Thursday, Mar 19, 2026 by lucky3028
Viewing docs for discord 2.5.1
published on Thursday, Mar 19, 2026 by lucky3028
published on Thursday, Mar 19, 2026 by lucky3028
Fetches a server’s information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as discord from "@pulumi/discord";
const discordApi = discord.getServer({
serverId: "81384788765712384",
});
export const discordApiRegion = discordApi.then(discordApi => discordApi.region);
import pulumi
import pulumi_discord as discord
discord_api = discord.get_server(server_id="81384788765712384")
pulumi.export("discordApiRegion", discord_api.region)
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 {
discordApi, err := discord.LookupServer(ctx, &discord.LookupServerArgs{
ServerId: pulumi.StringRef("81384788765712384"),
}, nil)
if err != nil {
return err
}
ctx.Export("discordApiRegion", discordApi.Region)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Discord = Pulumi.Discord;
return await Deployment.RunAsync(() =>
{
var discordApi = Discord.GetServer.Invoke(new()
{
ServerId = "81384788765712384",
});
return new Dictionary<string, object?>
{
["discordApiRegion"] = discordApi.Apply(getServerResult => getServerResult.Region),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.discord.DiscordFunctions;
import com.pulumi.discord.inputs.GetServerArgs;
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 discordApi = DiscordFunctions.getServer(GetServerArgs.builder()
.serverId("81384788765712384")
.build());
ctx.export("discordApiRegion", discordApi.region());
}
}
variables:
discordApi:
fn::invoke:
function: discord:getServer
arguments:
serverId: '81384788765712384'
outputs:
discordApiRegion: ${discordApi.region}
Using getServer
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServer(args: GetServerArgs, opts?: InvokeOptions): Promise<GetServerResult>
function getServerOutput(args: GetServerOutputArgs, opts?: InvokeOptions): Output<GetServerResult>def get_server(name: Optional[str] = None,
server_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServerResult
def get_server_output(name: Optional[pulumi.Input[str]] = None,
server_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServerResult]func LookupServer(ctx *Context, args *LookupServerArgs, opts ...InvokeOption) (*LookupServerResult, error)
func LookupServerOutput(ctx *Context, args *LookupServerOutputArgs, opts ...InvokeOption) LookupServerResultOutput> Note: This function is named LookupServer in the Go SDK.
public static class GetServer
{
public static Task<GetServerResult> InvokeAsync(GetServerArgs args, InvokeOptions? opts = null)
public static Output<GetServerResult> Invoke(GetServerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
public static Output<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
fn::invoke:
function: discord:index/getServer:getServer
arguments:
# arguments dictionaryThe following arguments are supported:
getServer Result
The following output properties are available:
- Afk
Channel doubleId - The AFK channel ID.
- Afk
Timeout double - The AFK timeout of the server.
- Default
Message doubleNotifications - The default message notification level of the server.
- Explicit
Content doubleFilter - The explicit content filter level of the server.
- Icon
Hash string - The hash of the server icon.
- Id string
- The ID of the server.
- Owner
Id string - The ID of the owner.
- Region string
- The region of the server.
- Roles
List<Get
Server Role> - List of roles in the server.
- Splash
Hash string - The hash of the server splash.
- Verification
Level double - The required verification level of the server.
- Name string
- The server name to search for.
- Server
Id string - The server ID to search for.
- Afk
Channel float64Id - The AFK channel ID.
- Afk
Timeout float64 - The AFK timeout of the server.
- Default
Message float64Notifications - The default message notification level of the server.
- Explicit
Content float64Filter - The explicit content filter level of the server.
- Icon
Hash string - The hash of the server icon.
- Id string
- The ID of the server.
- Owner
Id string - The ID of the owner.
- Region string
- The region of the server.
- Roles
[]Get
Server Role - List of roles in the server.
- Splash
Hash string - The hash of the server splash.
- Verification
Level float64 - The required verification level of the server.
- Name string
- The server name to search for.
- Server
Id string - The server ID to search for.
- afk
Channel DoubleId - The AFK channel ID.
- afk
Timeout Double - The AFK timeout of the server.
- default
Message DoubleNotifications - The default message notification level of the server.
- explicit
Content DoubleFilter - The explicit content filter level of the server.
- icon
Hash String - The hash of the server icon.
- id String
- The ID of the server.
- owner
Id String - The ID of the owner.
- region String
- The region of the server.
- roles
List<Get
Server Role> - List of roles in the server.
- splash
Hash String - The hash of the server splash.
- verification
Level Double - The required verification level of the server.
- name String
- The server name to search for.
- server
Id String - The server ID to search for.
- afk
Channel numberId - The AFK channel ID.
- afk
Timeout number - The AFK timeout of the server.
- default
Message numberNotifications - The default message notification level of the server.
- explicit
Content numberFilter - The explicit content filter level of the server.
- icon
Hash string - The hash of the server icon.
- id string
- The ID of the server.
- owner
Id string - The ID of the owner.
- region string
- The region of the server.
- roles
Get
Server Role[] - List of roles in the server.
- splash
Hash string - The hash of the server splash.
- verification
Level number - The required verification level of the server.
- name string
- The server name to search for.
- server
Id string - The server ID to search for.
- afk_
channel_ floatid - The AFK channel ID.
- afk_
timeout float - The AFK timeout of the server.
- default_
message_ floatnotifications - The default message notification level of the server.
- explicit_
content_ floatfilter - The explicit content filter level of the server.
- icon_
hash str - The hash of the server icon.
- id str
- The ID of the server.
- owner_
id str - The ID of the owner.
- region str
- The region of the server.
- roles
Sequence[Get
Server Role] - List of roles in the server.
- splash_
hash str - The hash of the server splash.
- verification_
level float - The required verification level of the server.
- name str
- The server name to search for.
- server_
id str - The server ID to search for.
- afk
Channel NumberId - The AFK channel ID.
- afk
Timeout Number - The AFK timeout of the server.
- default
Message NumberNotifications - The default message notification level of the server.
- explicit
Content NumberFilter - The explicit content filter level of the server.
- icon
Hash String - The hash of the server icon.
- id String
- The ID of the server.
- owner
Id String - The ID of the owner.
- region String
- The region of the server.
- roles List<Property Map>
- List of roles in the server.
- splash
Hash String - The hash of the server splash.
- verification
Level Number - The required verification level of the server.
- name String
- The server name to search for.
- server
Id String - The server ID to search for.
Supporting Types
GetServerRole
- Color double
- Hoist bool
- Id string
- Managed bool
- Mentionable bool
- Name string
- Permissions double
- Position double
- Color float64
- Hoist bool
- Id string
- Managed bool
- Mentionable bool
- Name string
- Permissions float64
- Position float64
- color Double
- hoist Boolean
- id String
- managed Boolean
- mentionable Boolean
- name String
- permissions Double
- position Double
- color number
- hoist boolean
- id string
- managed boolean
- mentionable boolean
- name string
- permissions number
- position number
- color float
- hoist bool
- id str
- managed bool
- mentionable bool
- name str
- permissions float
- position float
- color Number
- hoist Boolean
- id String
- managed Boolean
- mentionable Boolean
- name String
- permissions Number
- position Number
Package Details
- Repository
- discord lucky3028/terraform-provider-discord
- License
- Notes
- This Pulumi package is based on the
discordTerraform Provider.
Viewing docs for discord 2.5.1
published on Thursday, Mar 19, 2026 by lucky3028
published on Thursday, Mar 19, 2026 by lucky3028
