1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. Servergroup
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

edgecenter.Servergroup

Explore with Pulumi AI

Represent server group resource

Example Usage

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

const _default = new edgecenter.Servergroup("default", {
    policy: "affinity",
    projectId: 1,
    regionId: 1,
});
Copy
import pulumi
import pulumi_edgecenter as edgecenter

default = edgecenter.Servergroup("default",
    policy="affinity",
    project_id=1,
    region_id=1)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := edgecenter.NewServergroup(ctx, "default", &edgecenter.ServergroupArgs{
			Policy:    pulumi.String("affinity"),
			ProjectId: pulumi.Float64(1),
			RegionId:  pulumi.Float64(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var @default = new Edgecenter.Servergroup("default", new()
    {
        Policy = "affinity",
        ProjectId = 1,
        RegionId = 1,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.Servergroup;
import com.pulumi.edgecenter.ServergroupArgs;
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 default_ = new Servergroup("default", ServergroupArgs.builder()
            .policy("affinity")
            .projectId(1)
            .regionId(1)
            .build());

    }
}
Copy
resources:
  default:
    type: edgecenter:Servergroup
    properties:
      policy: affinity
      projectId: 1
      regionId: 1
Copy

Create Servergroup Resource

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

Constructor syntax

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

@overload
def Servergroup(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                policy: Optional[str] = None,
                name: Optional[str] = None,
                project_id: Optional[float] = None,
                project_name: Optional[str] = None,
                region_id: Optional[float] = None,
                region_name: Optional[str] = None,
                servergroup_id: Optional[str] = None)
func NewServergroup(ctx *Context, name string, args ServergroupArgs, opts ...ResourceOption) (*Servergroup, error)
public Servergroup(string name, ServergroupArgs args, CustomResourceOptions? opts = null)
public Servergroup(String name, ServergroupArgs args)
public Servergroup(String name, ServergroupArgs args, CustomResourceOptions options)
type: edgecenter:Servergroup
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. ServergroupArgs
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. ServergroupArgs
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. ServergroupArgs
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. ServergroupArgs
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. ServergroupArgs
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 servergroupResource = new Edgecenter.Servergroup("servergroupResource", new()
{
    Policy = "string",
    Name = "string",
    ProjectId = 0,
    ProjectName = "string",
    RegionId = 0,
    RegionName = "string",
    ServergroupId = "string",
});
Copy
example, err := edgecenter.NewServergroup(ctx, "servergroupResource", &edgecenter.ServergroupArgs{
Policy: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
ServergroupId: pulumi.String("string"),
})
Copy
var servergroupResource = new Servergroup("servergroupResource", ServergroupArgs.builder()
    .policy("string")
    .name("string")
    .projectId(0)
    .projectName("string")
    .regionId(0)
    .regionName("string")
    .servergroupId("string")
    .build());
Copy
servergroup_resource = edgecenter.Servergroup("servergroupResource",
    policy="string",
    name="string",
    project_id=0,
    project_name="string",
    region_id=0,
    region_name="string",
    servergroup_id="string")
Copy
const servergroupResource = new edgecenter.Servergroup("servergroupResource", {
    policy: "string",
    name: "string",
    projectId: 0,
    projectName: "string",
    regionId: 0,
    regionName: "string",
    servergroupId: "string",
});
Copy
type: edgecenter:Servergroup
properties:
    name: string
    policy: string
    projectId: 0
    projectName: string
    regionId: 0
    regionName: string
    servergroupId: string
Copy

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

Policy This property is required. string
Server group policy. Available value is 'affinity', 'anti-affinity'
Name string
Displayed server group name
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServergroupId string
The ID of this resource.
Policy This property is required. string
Server group policy. Available value is 'affinity', 'anti-affinity'
Name string
Displayed server group name
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServergroupId string
The ID of this resource.
policy This property is required. String
Server group policy. Available value is 'affinity', 'anti-affinity'
name String
Displayed server group name
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId String
The ID of this resource.
policy This property is required. string
Server group policy. Available value is 'affinity', 'anti-affinity'
name string
Displayed server group name
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId string
The ID of this resource.
policy This property is required. str
Server group policy. Available value is 'affinity', 'anti-affinity'
name str
Displayed server group name
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroup_id str
The ID of this resource.
policy This property is required. String
Server group policy. Available value is 'affinity', 'anti-affinity'
name String
Displayed server group name
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId String
The ID of this resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Instances List<ServergroupInstance>
Instances in this server group
Id string
The provider-assigned unique ID for this managed resource.
Instances []ServergroupInstance
Instances in this server group
id String
The provider-assigned unique ID for this managed resource.
instances List<ServergroupInstance>
Instances in this server group
id string
The provider-assigned unique ID for this managed resource.
instances ServergroupInstance[]
Instances in this server group
id str
The provider-assigned unique ID for this managed resource.
instances Sequence[ServergroupInstance]
Instances in this server group
id String
The provider-assigned unique ID for this managed resource.
instances List<Property Map>
Instances in this server group

Look up Existing Servergroup Resource

Get an existing Servergroup 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?: ServergroupState, opts?: CustomResourceOptions): Servergroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        instances: Optional[Sequence[ServergroupInstanceArgs]] = None,
        name: Optional[str] = None,
        policy: Optional[str] = None,
        project_id: Optional[float] = None,
        project_name: Optional[str] = None,
        region_id: Optional[float] = None,
        region_name: Optional[str] = None,
        servergroup_id: Optional[str] = None) -> Servergroup
func GetServergroup(ctx *Context, name string, id IDInput, state *ServergroupState, opts ...ResourceOption) (*Servergroup, error)
public static Servergroup Get(string name, Input<string> id, ServergroupState? state, CustomResourceOptions? opts = null)
public static Servergroup get(String name, Output<String> id, ServergroupState state, CustomResourceOptions options)
resources:  _:    type: edgecenter:Servergroup    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:
Instances List<ServergroupInstance>
Instances in this server group
Name string
Displayed server group name
Policy string
Server group policy. Available value is 'affinity', 'anti-affinity'
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServergroupId string
The ID of this resource.
Instances []ServergroupInstanceArgs
Instances in this server group
Name string
Displayed server group name
Policy string
Server group policy. Available value is 'affinity', 'anti-affinity'
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ServergroupId string
The ID of this resource.
instances List<ServergroupInstance>
Instances in this server group
name String
Displayed server group name
policy String
Server group policy. Available value is 'affinity', 'anti-affinity'
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId String
The ID of this resource.
instances ServergroupInstance[]
Instances in this server group
name string
Displayed server group name
policy string
Server group policy. Available value is 'affinity', 'anti-affinity'
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId string
The ID of this resource.
instances Sequence[ServergroupInstanceArgs]
Instances in this server group
name str
Displayed server group name
policy str
Server group policy. Available value is 'affinity', 'anti-affinity'
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroup_id str
The ID of this resource.
instances List<Property Map>
Instances in this server group
name String
Displayed server group name
policy String
Server group policy. Available value is 'affinity', 'anti-affinity'
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
servergroupId String
The ID of this resource.

Supporting Types

ServergroupInstance
, ServergroupInstanceArgs

InstanceId This property is required. string
InstanceName This property is required. string
InstanceId This property is required. string
InstanceName This property is required. string
instanceId This property is required. String
instanceName This property is required. String
instanceId This property is required. string
instanceName This property is required. string
instance_id This property is required. str
instance_name This property is required. str
instanceId This property is required. String
instanceName This property is required. String

Import

import using <project_id>:<region_id>:<servergroup_id> format

$ pulumi import edgecenter:index/servergroup:Servergroup servergroup1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
Copy

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

Package Details

Repository
edgecenter edge-center/terraform-provider-edgecenter
License
Notes
This Pulumi package is based on the edgecenter Terraform Provider.