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,
});
import pulumi
import pulumi_edgecenter as edgecenter
default = edgecenter.Servergroup("default",
policy="affinity",
project_id=1,
region_id=1)
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
})
}
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,
});
});
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());
}
}
resources:
default:
type: edgecenter:Servergroup
properties:
policy: affinity
projectId: 1
regionId: 1
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 string
- The unique name of the resource.
- args ServergroupArgs
- 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 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 string
- The unique name of the resource.
- args ServergroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServergroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var servergroupResource = new Servergroup("servergroupResource", ServergroupArgs.builder()
.policy("string")
.name("string")
.projectId(0)
.projectName("string")
.regionId(0)
.regionName("string")
.servergroupId("string")
.build());
servergroup_resource = edgecenter.Servergroup("servergroupResource",
policy="string",
name="string",
project_id=0,
project_name="string",
region_id=0,
region_name="string",
servergroup_id="string")
const servergroupResource = new edgecenter.Servergroup("servergroupResource", {
policy: "string",
name: "string",
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
servergroupId: "string",
});
type: edgecenter:Servergroup
properties:
name: string
policy: string
projectId: 0
projectName: string
regionId: 0
regionName: string
servergroupId: string
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 string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- Name string
- Displayed server group name
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Servergroup
Id string - The ID of this resource.
- Policy string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- Name string
- Displayed server group name
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Servergroup
Id string - The ID of this resource.
- policy String
- Server group policy. Available value is 'affinity', 'anti-affinity'
- name String
- Displayed server group name
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id String - The ID of this resource.
- policy string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- name string
- Displayed server group name
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id string - The ID of this resource.
- policy 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 String
- Server group policy. Available value is 'affinity', 'anti-affinity'
- name String
- Displayed server group name
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id 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<Servergroup
Instance> - Instances in this server group
- Id string
- The provider-assigned unique ID for this managed resource.
- Instances
[]Servergroup
Instance - Instances in this server group
- id String
- The provider-assigned unique ID for this managed resource.
- instances
List<Servergroup
Instance> - Instances in this server group
- id string
- The provider-assigned unique ID for this managed resource.
- instances
Servergroup
Instance[] - Instances in this server group
- id str
- The provider-assigned unique ID for this managed resource.
- instances
Sequence[Servergroup
Instance] - 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
- 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.
- Instances
List<Servergroup
Instance> - Instances in this server group
- Name string
- Displayed server group name
- Policy string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Servergroup
Id string - The ID of this resource.
- Instances
[]Servergroup
Instance Args - Instances in this server group
- Name string
- Displayed server group name
- Policy string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Servergroup
Id string - The ID of this resource.
- instances
List<Servergroup
Instance> - Instances in this server group
- name String
- Displayed server group name
- policy String
- Server group policy. Available value is 'affinity', 'anti-affinity'
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id String - The ID of this resource.
- instances
Servergroup
Instance[] - Instances in this server group
- name string
- Displayed server group name
- policy string
- Server group policy. Available value is 'affinity', 'anti-affinity'
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id string - The ID of this resource.
- instances
Sequence[Servergroup
Instance Args] - 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'
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- servergroup
Id String - The ID of this resource.
Supporting Types
ServergroupInstance, ServergroupInstanceArgs
- Instance
Id string - Instance
Name string
- Instance
Id string - Instance
Name string
- instance
Id String - instance
Name String
- instance
Id string - instance
Name string
- instance_
id str - instance_
name str
- instance
Id String - instance
Name 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
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.