volcengine.alb.ServerGroupServer
Explore with Pulumi AI
Provides a resource to manage alb server group server
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Alb.ServerGroupServer("foo", new()
{
Description = "test add server group server ecs1",
InstanceId = "i-ycony2kef4ygp2f8cgmk",
Ip = "172.16.0.3",
Port = 5679,
ServerGroupId = "rsp-1g7317vrcx3pc2zbhq4c3i6a2",
Type = "ecs",
Weight = 30,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/alb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.NewServerGroupServer(ctx, "foo", &alb.ServerGroupServerArgs{
Description: pulumi.String("test add server group server ecs1"),
InstanceId: pulumi.String("i-ycony2kef4ygp2f8cgmk"),
Ip: pulumi.String("172.16.0.3"),
Port: pulumi.Int(5679),
ServerGroupId: pulumi.String("rsp-1g7317vrcx3pc2zbhq4c3i6a2"),
Type: pulumi.String("ecs"),
Weight: pulumi.Int(30),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.alb.ServerGroupServer;
import com.pulumi.volcengine.alb.ServerGroupServerArgs;
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 foo = new ServerGroupServer("foo", ServerGroupServerArgs.builder()
.description("test add server group server ecs1")
.instanceId("i-ycony2kef4ygp2f8cgmk")
.ip("172.16.0.3")
.port(5679)
.serverGroupId("rsp-1g7317vrcx3pc2zbhq4c3i6a2")
.type("ecs")
.weight(30)
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.alb.ServerGroupServer("foo",
description="test add server group server ecs1",
instance_id="i-ycony2kef4ygp2f8cgmk",
ip="172.16.0.3",
port=5679,
server_group_id="rsp-1g7317vrcx3pc2zbhq4c3i6a2",
type="ecs",
weight=30)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.alb.ServerGroupServer("foo", {
description: "test add server group server ecs1",
instanceId: "i-ycony2kef4ygp2f8cgmk",
ip: "172.16.0.3",
port: 5679,
serverGroupId: "rsp-1g7317vrcx3pc2zbhq4c3i6a2",
type: "ecs",
weight: 30,
});
resources:
foo:
type: volcengine:alb:ServerGroupServer
properties:
description: test add server group server ecs1
instanceId: i-ycony2kef4ygp2f8cgmk
ip: 172.16.0.3
port: 5679
serverGroupId: rsp-1g7317vrcx3pc2zbhq4c3i6a2
type: ecs
weight: 30
Create ServerGroupServer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerGroupServer(name: string, args: ServerGroupServerArgs, opts?: CustomResourceOptions);
@overload
def ServerGroupServer(resource_name: str,
args: ServerGroupServerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerGroupServer(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
ip: Optional[str] = None,
port: Optional[int] = None,
server_group_id: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
weight: Optional[int] = None)
func NewServerGroupServer(ctx *Context, name string, args ServerGroupServerArgs, opts ...ResourceOption) (*ServerGroupServer, error)
public ServerGroupServer(string name, ServerGroupServerArgs args, CustomResourceOptions? opts = null)
public ServerGroupServer(String name, ServerGroupServerArgs args)
public ServerGroupServer(String name, ServerGroupServerArgs args, CustomResourceOptions options)
type: volcengine:alb:ServerGroupServer
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 ServerGroupServerArgs
- 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 ServerGroupServerArgs
- 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 ServerGroupServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerGroupServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerGroupServerArgs
- 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 serverGroupServerResource = new Volcengine.Alb.ServerGroupServer("serverGroupServerResource", new()
{
InstanceId = "string",
Ip = "string",
Port = 0,
ServerGroupId = "string",
Type = "string",
Description = "string",
Weight = 0,
});
example, err := alb.NewServerGroupServer(ctx, "serverGroupServerResource", &alb.ServerGroupServerArgs{
InstanceId: pulumi.String("string"),
Ip: pulumi.String("string"),
Port: pulumi.Int(0),
ServerGroupId: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Weight: pulumi.Int(0),
})
var serverGroupServerResource = new ServerGroupServer("serverGroupServerResource", ServerGroupServerArgs.builder()
.instanceId("string")
.ip("string")
.port(0)
.serverGroupId("string")
.type("string")
.description("string")
.weight(0)
.build());
server_group_server_resource = volcengine.alb.ServerGroupServer("serverGroupServerResource",
instance_id="string",
ip="string",
port=0,
server_group_id="string",
type="string",
description="string",
weight=0)
const serverGroupServerResource = new volcengine.alb.ServerGroupServer("serverGroupServerResource", {
instanceId: "string",
ip: "string",
port: 0,
serverGroupId: "string",
type: "string",
description: "string",
weight: 0,
});
type: volcengine:alb:ServerGroupServer
properties:
description: string
instanceId: string
ip: string
port: 0
serverGroupId: string
type: string
weight: 0
ServerGroupServer 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 ServerGroupServer resource accepts the following input properties:
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Group stringId - The ID of the ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs
,eni
. - Description string
- The description of the instance.
- Weight int
- The weight of the instance, range in 0~100.
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Group stringId - The ID of the ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs
,eni
. - Description string
- The description of the instance.
- Weight int
- The weight of the instance, range in 0~100.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Integer
- The port receiving request.
- server
Group StringId - The ID of the ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs
,eni
. - description String
- The description of the instance.
- weight Integer
- The weight of the instance, range in 0~100.
- instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- ip string
- The private ip of the instance.
- port number
- The port receiving request.
- server
Group stringId - The ID of the ServerGroup.
- type string
- The type of instance. Optional choice contains
ecs
,eni
. - description string
- The description of the instance.
- weight number
- The weight of the instance, range in 0~100.
- instance_
id str - The ID of ecs instance or the network card bound to ecs instance.
- ip str
- The private ip of the instance.
- port int
- The port receiving request.
- server_
group_ strid - The ID of the ServerGroup.
- type str
- The type of instance. Optional choice contains
ecs
,eni
. - description str
- The description of the instance.
- weight int
- The weight of the instance, range in 0~100.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Number
- The port receiving request.
- server
Group StringId - The ID of the ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs
,eni
. - description String
- The description of the instance.
- weight Number
- The weight of the instance, range in 0~100.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerGroupServer resource produces the following output properties:
Look up Existing ServerGroupServer Resource
Get an existing ServerGroupServer 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?: ServerGroupServerState, opts?: CustomResourceOptions): ServerGroupServer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
instance_id: Optional[str] = None,
ip: Optional[str] = None,
port: Optional[int] = None,
server_group_id: Optional[str] = None,
server_id: Optional[str] = None,
type: Optional[str] = None,
weight: Optional[int] = None) -> ServerGroupServer
func GetServerGroupServer(ctx *Context, name string, id IDInput, state *ServerGroupServerState, opts ...ResourceOption) (*ServerGroupServer, error)
public static ServerGroupServer Get(string name, Input<string> id, ServerGroupServerState? state, CustomResourceOptions? opts = null)
public static ServerGroupServer get(String name, Output<String> id, ServerGroupServerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Description string
- The description of the instance.
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Group stringId - The ID of the ServerGroup.
- Server
Id string - The server id of instance in ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs
,eni
. - Weight int
- The weight of the instance, range in 0~100.
- Description string
- The description of the instance.
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Group stringId - The ID of the ServerGroup.
- Server
Id string - The server id of instance in ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs
,eni
. - Weight int
- The weight of the instance, range in 0~100.
- description String
- The description of the instance.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Integer
- The port receiving request.
- server
Group StringId - The ID of the ServerGroup.
- server
Id String - The server id of instance in ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs
,eni
. - weight Integer
- The weight of the instance, range in 0~100.
- description string
- The description of the instance.
- instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- ip string
- The private ip of the instance.
- port number
- The port receiving request.
- server
Group stringId - The ID of the ServerGroup.
- server
Id string - The server id of instance in ServerGroup.
- type string
- The type of instance. Optional choice contains
ecs
,eni
. - weight number
- The weight of the instance, range in 0~100.
- description str
- The description of the instance.
- instance_
id str - The ID of ecs instance or the network card bound to ecs instance.
- ip str
- The private ip of the instance.
- port int
- The port receiving request.
- server_
group_ strid - The ID of the ServerGroup.
- server_
id str - The server id of instance in ServerGroup.
- type str
- The type of instance. Optional choice contains
ecs
,eni
. - weight int
- The weight of the instance, range in 0~100.
- description String
- The description of the instance.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Number
- The port receiving request.
- server
Group StringId - The ID of the ServerGroup.
- server
Id String - The server id of instance in ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs
,eni
. - weight Number
- The weight of the instance, range in 0~100.
Import
AlbServerGroupServer can be imported using the server_group_id:server_id, e.g.
$ pulumi import volcengine:alb/serverGroupServer:ServerGroupServer default rsp-274xltv2*****8tlv3q3s:rs-3ciynux6i1x4w****rszh49sj
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.