1. Packages
  2. Volcengine
  3. API Docs
  4. alb
  5. ServerGroupServer
Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine

volcengine.alb.ServerGroupServer

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine

    Provides a resource to manage alb server group server

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = 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.

    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

    The ServerGroupServer resource accepts the following input properties:

    InstanceId 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.
    ServerGroupId string
    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.
    InstanceId 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.
    ServerGroupId string
    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.
    instanceId 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.
    serverGroupId String
    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.
    instanceId 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.
    serverGroupId string
    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_id str
    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.
    instanceId 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.
    serverGroupId String
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId string
    The server id of instance in ServerGroup.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId string
    The server id of instance in ServerGroup.
    id String
    The provider-assigned unique ID for this managed resource.
    serverId String
    The server id of instance in ServerGroup.
    id string
    The provider-assigned unique ID for this managed resource.
    serverId string
    The server id of instance in ServerGroup.
    id str
    The provider-assigned unique ID for this managed resource.
    server_id str
    The server id of instance in ServerGroup.
    id String
    The provider-assigned unique ID for this managed resource.
    serverId String
    The server id of instance in ServerGroup.

    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.
    The following state arguments are supported:
    Description string
    The description of the instance.
    InstanceId 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.
    ServerGroupId string
    The ID of the ServerGroup.
    ServerId 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.
    InstanceId 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.
    ServerGroupId string
    The ID of the ServerGroup.
    ServerId 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.
    instanceId 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.
    serverGroupId String
    The ID of the ServerGroup.
    serverId 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.
    instanceId 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.
    serverGroupId string
    The ID of the ServerGroup.
    serverId 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_id str
    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.
    instanceId 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.
    serverGroupId String
    The ID of the ServerGroup.
    serverId 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.
    volcengine logo
    Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine