Provides a resource to manage alb server group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooServerGroup = new volcengine.alb.ServerGroup("fooServerGroup", {
vpcId: fooVpc.id,
serverGroupName: "acc-test-server-group",
description: "acc-test",
serverGroupType: "instance",
scheduler: "wlc",
protocol: "HTTP",
ipAddressType: "IPv4",
projectName: "default",
healthCheck: {
enabled: "on",
interval: 3,
timeout: 3,
method: "GET",
domain: "www.test.com",
uri: "/health",
httpCode: "http_2xx,http_3xx",
protocol: "HTTP",
port: 80,
httpVersion: "HTTP1.1",
},
stickySessionConfig: {
stickySessionEnabled: "on",
stickySessionType: "insert",
cookieTimeout: 1100,
},
tags: [{
key: "key1",
value: "value2",
}],
});
import pulumi
import pulumi_volcengine as volcengine
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_server_group = volcengine.alb.ServerGroup("fooServerGroup",
vpc_id=foo_vpc.id,
server_group_name="acc-test-server-group",
description="acc-test",
server_group_type="instance",
scheduler="wlc",
protocol="HTTP",
ip_address_type="IPv4",
project_name="default",
health_check=volcengine.alb.ServerGroupHealthCheckArgs(
enabled="on",
interval=3,
timeout=3,
method="GET",
domain="www.test.com",
uri="/health",
http_code="http_2xx,http_3xx",
protocol="HTTP",
port=80,
http_version="HTTP1.1",
),
sticky_session_config=volcengine.alb.ServerGroupStickySessionConfigArgs(
sticky_session_enabled="on",
sticky_session_type="insert",
cookie_timeout=1100,
),
tags=[volcengine.alb.ServerGroupTagArgs(
key="key1",
value="value2",
)])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/alb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
_, err = alb.NewServerGroup(ctx, "fooServerGroup", &alb.ServerGroupArgs{
VpcId: fooVpc.ID(),
ServerGroupName: pulumi.String("acc-test-server-group"),
Description: pulumi.String("acc-test"),
ServerGroupType: pulumi.String("instance"),
Scheduler: pulumi.String("wlc"),
Protocol: pulumi.String("HTTP"),
IpAddressType: pulumi.String("IPv4"),
ProjectName: pulumi.String("default"),
HealthCheck: &alb.ServerGroupHealthCheckArgs{
Enabled: pulumi.String("on"),
Interval: pulumi.Int(3),
Timeout: pulumi.Int(3),
Method: pulumi.String("GET"),
Domain: pulumi.String("www.test.com"),
Uri: pulumi.String("/health"),
HttpCode: pulumi.String("http_2xx,http_3xx"),
Protocol: pulumi.String("HTTP"),
Port: pulumi.Int(80),
HttpVersion: pulumi.String("HTTP1.1"),
},
StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
StickySessionEnabled: pulumi.String("on"),
StickySessionType: pulumi.String("insert"),
CookieTimeout: pulumi.Int(1100),
},
Tags: alb.ServerGroupTagArray{
&alb.ServerGroupTagArgs{
Key: pulumi.String("key1"),
Value: pulumi.String("value2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooServerGroup = new Volcengine.Alb.ServerGroup("fooServerGroup", new()
{
VpcId = fooVpc.Id,
ServerGroupName = "acc-test-server-group",
Description = "acc-test",
ServerGroupType = "instance",
Scheduler = "wlc",
Protocol = "HTTP",
IpAddressType = "IPv4",
ProjectName = "default",
HealthCheck = new Volcengine.Alb.Inputs.ServerGroupHealthCheckArgs
{
Enabled = "on",
Interval = 3,
Timeout = 3,
Method = "GET",
Domain = "www.test.com",
Uri = "/health",
HttpCode = "http_2xx,http_3xx",
Protocol = "HTTP",
Port = 80,
HttpVersion = "HTTP1.1",
},
StickySessionConfig = new Volcengine.Alb.Inputs.ServerGroupStickySessionConfigArgs
{
StickySessionEnabled = "on",
StickySessionType = "insert",
CookieTimeout = 1100,
},
Tags = new[]
{
new Volcengine.Alb.Inputs.ServerGroupTagArgs
{
Key = "key1",
Value = "value2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.alb.ServerGroup;
import com.pulumi.volcengine.alb.ServerGroupArgs;
import com.pulumi.volcengine.alb.inputs.ServerGroupHealthCheckArgs;
import com.pulumi.volcengine.alb.inputs.ServerGroupStickySessionConfigArgs;
import com.pulumi.volcengine.alb.inputs.ServerGroupTagArgs;
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 fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooServerGroup = new ServerGroup("fooServerGroup", ServerGroupArgs.builder()
.vpcId(fooVpc.id())
.serverGroupName("acc-test-server-group")
.description("acc-test")
.serverGroupType("instance")
.scheduler("wlc")
.protocol("HTTP")
.ipAddressType("IPv4")
.projectName("default")
.healthCheck(ServerGroupHealthCheckArgs.builder()
.enabled("on")
.interval(3)
.timeout(3)
.method("GET")
.domain("www.test.com")
.uri("/health")
.httpCode("http_2xx,http_3xx")
.protocol("HTTP")
.port(80)
.httpVersion("HTTP1.1")
.build())
.stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
.stickySessionEnabled("on")
.stickySessionType("insert")
.cookieTimeout(1100)
.build())
.tags(ServerGroupTagArgs.builder()
.key("key1")
.value("value2")
.build())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooServerGroup:
type: volcengine:alb:ServerGroup
properties:
vpcId: ${fooVpc.id}
serverGroupName: acc-test-server-group
description: acc-test
serverGroupType: instance
scheduler: wlc
protocol: HTTP
ipAddressType: IPv4
projectName: default
healthCheck:
enabled: on
interval: 3
timeout: 3
method: GET
domain: www.test.com
uri: /health
httpCode: http_2xx,http_3xx
protocol: HTTP
port: 80
httpVersion: HTTP1.1
stickySessionConfig:
stickySessionEnabled: on
stickySessionType: insert
cookieTimeout: 1100
tags:
- key: key1
value: value2
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,
vpc_id: Optional[str] = None,
cross_zone_enabled: Optional[str] = None,
description: Optional[str] = None,
health_check: Optional[ServerGroupHealthCheckArgs] = None,
ip_address_type: Optional[str] = None,
project_name: Optional[str] = None,
protocol: Optional[str] = None,
scheduler: Optional[str] = None,
server_group_name: Optional[str] = None,
server_group_type: Optional[str] = None,
sticky_session_config: Optional[ServerGroupStickySessionConfigArgs] = None,
tags: Optional[Sequence[ServerGroupTagArgs]] = 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: volcengine:alb: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 Volcengine.Alb.ServerGroup("serverGroupResource", new()
{
VpcId = "string",
CrossZoneEnabled = "string",
Description = "string",
HealthCheck = new Volcengine.Alb.Inputs.ServerGroupHealthCheckArgs
{
Domain = "string",
Enabled = "string",
HealthyThreshold = 0,
HttpCode = "string",
HttpVersion = "string",
Interval = 0,
Method = "string",
Port = 0,
Protocol = "string",
Timeout = 0,
UnhealthyThreshold = 0,
Uri = "string",
},
IpAddressType = "string",
ProjectName = "string",
Protocol = "string",
Scheduler = "string",
ServerGroupName = "string",
ServerGroupType = "string",
StickySessionConfig = new Volcengine.Alb.Inputs.ServerGroupStickySessionConfigArgs
{
Cookie = "string",
CookieTimeout = 0,
StickySessionEnabled = "string",
StickySessionType = "string",
},
Tags = new[]
{
new Volcengine.Alb.Inputs.ServerGroupTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := alb.NewServerGroup(ctx, "serverGroupResource", &alb.ServerGroupArgs{
VpcId: pulumi.String("string"),
CrossZoneEnabled: pulumi.String("string"),
Description: pulumi.String("string"),
HealthCheck: &alb.ServerGroupHealthCheckArgs{
Domain: pulumi.String("string"),
Enabled: pulumi.String("string"),
HealthyThreshold: pulumi.Int(0),
HttpCode: pulumi.String("string"),
HttpVersion: pulumi.String("string"),
Interval: pulumi.Int(0),
Method: pulumi.String("string"),
Port: pulumi.Int(0),
Protocol: pulumi.String("string"),
Timeout: pulumi.Int(0),
UnhealthyThreshold: pulumi.Int(0),
Uri: pulumi.String("string"),
},
IpAddressType: pulumi.String("string"),
ProjectName: pulumi.String("string"),
Protocol: pulumi.String("string"),
Scheduler: pulumi.String("string"),
ServerGroupName: pulumi.String("string"),
ServerGroupType: pulumi.String("string"),
StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
Cookie: pulumi.String("string"),
CookieTimeout: pulumi.Int(0),
StickySessionEnabled: pulumi.String("string"),
StickySessionType: pulumi.String("string"),
},
Tags: alb.ServerGroupTagArray{
&alb.ServerGroupTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var serverGroupResource = new com.pulumi.volcengine.alb.ServerGroup("serverGroupResource", com.pulumi.volcengine.alb.ServerGroupArgs.builder()
.vpcId("string")
.crossZoneEnabled("string")
.description("string")
.healthCheck(ServerGroupHealthCheckArgs.builder()
.domain("string")
.enabled("string")
.healthyThreshold(0)
.httpCode("string")
.httpVersion("string")
.interval(0)
.method("string")
.port(0)
.protocol("string")
.timeout(0)
.unhealthyThreshold(0)
.uri("string")
.build())
.ipAddressType("string")
.projectName("string")
.protocol("string")
.scheduler("string")
.serverGroupName("string")
.serverGroupType("string")
.stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
.cookie("string")
.cookieTimeout(0)
.stickySessionEnabled("string")
.stickySessionType("string")
.build())
.tags(ServerGroupTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
server_group_resource = volcengine.alb.ServerGroup("serverGroupResource",
vpc_id="string",
cross_zone_enabled="string",
description="string",
health_check={
"domain": "string",
"enabled": "string",
"healthy_threshold": 0,
"http_code": "string",
"http_version": "string",
"interval": 0,
"method": "string",
"port": 0,
"protocol": "string",
"timeout": 0,
"unhealthy_threshold": 0,
"uri": "string",
},
ip_address_type="string",
project_name="string",
protocol="string",
scheduler="string",
server_group_name="string",
server_group_type="string",
sticky_session_config={
"cookie": "string",
"cookie_timeout": 0,
"sticky_session_enabled": "string",
"sticky_session_type": "string",
},
tags=[{
"key": "string",
"value": "string",
}])
const serverGroupResource = new volcengine.alb.ServerGroup("serverGroupResource", {
vpcId: "string",
crossZoneEnabled: "string",
description: "string",
healthCheck: {
domain: "string",
enabled: "string",
healthyThreshold: 0,
httpCode: "string",
httpVersion: "string",
interval: 0,
method: "string",
port: 0,
protocol: "string",
timeout: 0,
unhealthyThreshold: 0,
uri: "string",
},
ipAddressType: "string",
projectName: "string",
protocol: "string",
scheduler: "string",
serverGroupName: "string",
serverGroupType: "string",
stickySessionConfig: {
cookie: "string",
cookieTimeout: 0,
stickySessionEnabled: "string",
stickySessionType: "string",
},
tags: [{
key: "string",
value: "string",
}],
});
type: volcengine:alb:ServerGroup
properties:
crossZoneEnabled: string
description: string
healthCheck:
domain: string
enabled: string
healthyThreshold: 0
httpCode: string
httpVersion: string
interval: 0
method: string
port: 0
protocol: string
timeout: 0
unhealthyThreshold: 0
uri: string
ipAddressType: string
projectName: string
protocol: string
scheduler: string
serverGroupName: string
serverGroupType: string
stickySessionConfig:
cookie: string
cookieTimeout: 0
stickySessionEnabled: string
stickySessionType: string
tags:
- key: string
value: string
vpcId: 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:
- Vpc
Id string - The vpc id of the Alb server group.
- Cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - Description string
- The description of the Alb server group.
- Health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - Ip
Address stringType - The ip address type of the server group.
- Project
Name string - The project name of the Alb server group.
- Protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - Scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - Server
Group stringName - The name of the Alb server group.
- Server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - Sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
List<Server
Group Tag> - Tags.
- Vpc
Id string - The vpc id of the Alb server group.
- Cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - Description string
- The description of the Alb server group.
- Health
Check ServerGroup Health Check Args - The health check config of the Alb server group. The enable status of health check function defaults to
on. - Ip
Address stringType - The ip address type of the server group.
- Project
Name string - The project name of the Alb server group.
- Protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - Scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - Server
Group stringName - The name of the Alb server group.
- Server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - Sticky
Session ServerConfig Group Sticky Session Config Args - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
[]Server
Group Tag Args - Tags.
- vpc
Id String - The vpc id of the Alb server group.
- cross
Zone StringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description String
- The description of the Alb server group.
- health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address StringType - The ip address type of the server group.
- project
Name String - The project name of the Alb server group.
- protocol String
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler String
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Group StringName - The name of the Alb server group.
- server
Group StringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
List<Server
Group Tag> - Tags.
- vpc
Id string - The vpc id of the Alb server group.
- cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description string
- The description of the Alb server group.
- health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address stringType - The ip address type of the server group.
- project
Name string - The project name of the Alb server group.
- protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Group stringName - The name of the Alb server group.
- server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
Server
Group Tag[] - Tags.
- vpc_
id str - The vpc id of the Alb server group.
- cross_
zone_ strenabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description str
- The description of the Alb server group.
- health_
check ServerGroup Health Check Args - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip_
address_ strtype - The ip address type of the server group.
- project_
name str - The project name of the Alb server group.
- protocol str
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler str
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server_
group_ strname - The name of the Alb server group.
- server_
group_ strtype - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - sticky_
session_ Serverconfig Group Sticky Session Config Args - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
Sequence[Server
Group Tag Args] - Tags.
- vpc
Id String - The vpc id of the Alb server group.
- cross
Zone StringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description String
- The description of the Alb server group.
- health
Check Property Map - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address StringType - The ip address type of the server group.
- project
Name String - The project name of the Alb server group.
- protocol String
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler String
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Group StringName - The name of the Alb server group.
- server
Group StringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - sticky
Session Property MapConfig - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. - List<Property Map>
- Tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerGroup resource produces the following output properties:
- Create
Time string - The create time of the Alb server group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Listeners List<string>
- The listener information of the Alb server group.
- Server
Count int - The server count of the Alb server group.
- Status string
- The status of the Alb server group.
- Update
Time string - The update time of the Alb server group.
- Create
Time string - The create time of the Alb server group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Listeners []string
- The listener information of the Alb server group.
- Server
Count int - The server count of the Alb server group.
- Status string
- The status of the Alb server group.
- Update
Time string - The update time of the Alb server group.
- create
Time String - The create time of the Alb server group.
- id String
- The provider-assigned unique ID for this managed resource.
- listeners List<String>
- The listener information of the Alb server group.
- server
Count Integer - The server count of the Alb server group.
- status String
- The status of the Alb server group.
- update
Time String - The update time of the Alb server group.
- create
Time string - The create time of the Alb server group.
- id string
- The provider-assigned unique ID for this managed resource.
- listeners string[]
- The listener information of the Alb server group.
- server
Count number - The server count of the Alb server group.
- status string
- The status of the Alb server group.
- update
Time string - The update time of the Alb server group.
- create_
time str - The create time of the Alb server group.
- id str
- The provider-assigned unique ID for this managed resource.
- listeners Sequence[str]
- The listener information of the Alb server group.
- server_
count int - The server count of the Alb server group.
- status str
- The status of the Alb server group.
- update_
time str - The update time of the Alb server group.
- create
Time String - The create time of the Alb server group.
- id String
- The provider-assigned unique ID for this managed resource.
- listeners List<String>
- The listener information of the Alb server group.
- server
Count Number - The server count of the Alb server group.
- status String
- The status of the Alb server group.
- update
Time String - The update time of the Alb 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,
create_time: Optional[str] = None,
cross_zone_enabled: Optional[str] = None,
description: Optional[str] = None,
health_check: Optional[ServerGroupHealthCheckArgs] = None,
ip_address_type: Optional[str] = None,
listeners: Optional[Sequence[str]] = None,
project_name: Optional[str] = None,
protocol: Optional[str] = None,
scheduler: Optional[str] = None,
server_count: Optional[int] = None,
server_group_name: Optional[str] = None,
server_group_type: Optional[str] = None,
status: Optional[str] = None,
sticky_session_config: Optional[ServerGroupStickySessionConfigArgs] = None,
tags: Optional[Sequence[ServerGroupTagArgs]] = None,
update_time: Optional[str] = None,
vpc_id: Optional[str] = None) -> ServerGroupfunc 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: volcengine:alb: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.
- Create
Time string - The create time of the Alb server group.
- Cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - Description string
- The description of the Alb server group.
- Health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - Ip
Address stringType - The ip address type of the server group.
- Listeners List<string>
- The listener information of the Alb server group.
- Project
Name string - The project name of the Alb server group.
- Protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - Scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - Server
Count int - The server count of the Alb server group.
- Server
Group stringName - The name of the Alb server group.
- Server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - Status string
- The status of the Alb server group.
- Sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
List<Server
Group Tag> - Tags.
- Update
Time string - The update time of the Alb server group.
- Vpc
Id string - The vpc id of the Alb server group.
- Create
Time string - The create time of the Alb server group.
- Cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - Description string
- The description of the Alb server group.
- Health
Check ServerGroup Health Check Args - The health check config of the Alb server group. The enable status of health check function defaults to
on. - Ip
Address stringType - The ip address type of the server group.
- Listeners []string
- The listener information of the Alb server group.
- Project
Name string - The project name of the Alb server group.
- Protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - Scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - Server
Count int - The server count of the Alb server group.
- Server
Group stringName - The name of the Alb server group.
- Server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - Status string
- The status of the Alb server group.
- Sticky
Session ServerConfig Group Sticky Session Config Args - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
[]Server
Group Tag Args - Tags.
- Update
Time string - The update time of the Alb server group.
- Vpc
Id string - The vpc id of the Alb server group.
- create
Time String - The create time of the Alb server group.
- cross
Zone StringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description String
- The description of the Alb server group.
- health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address StringType - The ip address type of the server group.
- listeners List<String>
- The listener information of the Alb server group.
- project
Name String - The project name of the Alb server group.
- protocol String
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler String
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Count Integer - The server count of the Alb server group.
- server
Group StringName - The name of the Alb server group.
- server
Group StringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - status String
- The status of the Alb server group.
- sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
List<Server
Group Tag> - Tags.
- update
Time String - The update time of the Alb server group.
- vpc
Id String - The vpc id of the Alb server group.
- create
Time string - The create time of the Alb server group.
- cross
Zone stringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description string
- The description of the Alb server group.
- health
Check ServerGroup Health Check - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address stringType - The ip address type of the server group.
- listeners string[]
- The listener information of the Alb server group.
- project
Name string - The project name of the Alb server group.
- protocol string
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler string
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Count number - The server count of the Alb server group.
- server
Group stringName - The name of the Alb server group.
- server
Group stringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - status string
- The status of the Alb server group.
- sticky
Session ServerConfig Group Sticky Session Config - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
Server
Group Tag[] - Tags.
- update
Time string - The update time of the Alb server group.
- vpc
Id string - The vpc id of the Alb server group.
- create_
time str - The create time of the Alb server group.
- cross_
zone_ strenabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description str
- The description of the Alb server group.
- health_
check ServerGroup Health Check Args - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip_
address_ strtype - The ip address type of the server group.
- listeners Sequence[str]
- The listener information of the Alb server group.
- project_
name str - The project name of the Alb server group.
- protocol str
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler str
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server_
count int - The server count of the Alb server group.
- server_
group_ strname - The name of the Alb server group.
- server_
group_ strtype - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - status str
- The status of the Alb server group.
- sticky_
session_ Serverconfig Group Sticky Session Config Args - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. -
Sequence[Server
Group Tag Args] - Tags.
- update_
time str - The update time of the Alb server group.
- vpc_
id str - The vpc id of the Alb server group.
- create
Time String - The create time of the Alb server group.
- cross
Zone StringEnabled - Whether to enable cross-zone load balancing for the server group. Valid values:
on,off. - description String
- The description of the Alb server group.
- health
Check Property Map - The health check config of the Alb server group. The enable status of health check function defaults to
on. - ip
Address StringType - The ip address type of the server group.
- listeners List<String>
- The listener information of the Alb server group.
- project
Name String - The project name of the Alb server group.
- protocol String
- The backend protocol of the Alb server group. Valid values:
HTTP,HTTPS,gRPC. Default isHTTP. - scheduler String
- The scheduling algorithm of the Alb server group. Valid values:
wrr,wlc,sh. - server
Count Number - The server count of the Alb server group.
- server
Group StringName - The name of the Alb server group.
- server
Group StringType - The type of the Alb server group. Valid values:
instance,ip. Default isinstance. - status String
- The status of the Alb server group.
- sticky
Session Property MapConfig - The sticky session config of the Alb server group. The enable status of sticky session function defaults to
off. - List<Property Map>
- Tags.
- update
Time String - The update time of the Alb server group.
- vpc
Id String - The vpc id of the Alb server group.
Supporting Types
ServerGroupHealthCheck, ServerGroupHealthCheckArgs
- Domain string
- The domain of health check.
- Enabled string
- The enable status of health check function. Valid values:
on,off. Default ison. - Healthy
Threshold int - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- Http
Code string - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - Http
Version string - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - Interval int
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- Method string
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - Port int
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- Protocol string
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - Timeout int
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- Unhealthy
Threshold int - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- Uri string
- The uri of health check.
- Domain string
- The domain of health check.
- Enabled string
- The enable status of health check function. Valid values:
on,off. Default ison. - Healthy
Threshold int - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- Http
Code string - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - Http
Version string - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - Interval int
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- Method string
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - Port int
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- Protocol string
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - Timeout int
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- Unhealthy
Threshold int - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- Uri string
- The uri of health check.
- domain String
- The domain of health check.
- enabled String
- The enable status of health check function. Valid values:
on,off. Default ison. - healthy
Threshold Integer - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- http
Code String - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - http
Version String - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - interval Integer
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- method String
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - port Integer
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- protocol String
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - timeout Integer
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- unhealthy
Threshold Integer - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- uri String
- The uri of health check.
- domain string
- The domain of health check.
- enabled string
- The enable status of health check function. Valid values:
on,off. Default ison. - healthy
Threshold number - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- http
Code string - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - http
Version string - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - interval number
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- method string
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - port number
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- protocol string
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - timeout number
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- unhealthy
Threshold number - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- uri string
- The uri of health check.
- domain str
- The domain of health check.
- enabled str
- The enable status of health check function. Valid values:
on,off. Default ison. - healthy_
threshold int - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- http_
code str - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - http_
version str - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - interval int
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- method str
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - port int
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- protocol str
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - timeout int
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- unhealthy_
threshold int - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- uri str
- The uri of health check.
- domain String
- The domain of health check.
- enabled String
- The enable status of health check function. Valid values:
on,off. Default ison. - healthy
Threshold Number - The healthy threshold of health check. Valid value range in 2~10. Default is 3.
- http
Code String - The normal http status code of health check, the value can be
http_2xx,http_3xx,http_4xxorhttp_5xx. Default ishttp_2xx,http_3xx. - http
Version String - The http version of health check. Valid values:
HTTP1.0,HTTP1.1. Default isHTTP1.0. - interval Number
- The interval executing health check. Unit: second. Valid value range in 1~300. Default is 2.
- method String
- The method of health check. Valid values:
GETorHEAD. Default isHEAD. - port Number
- The port of health check. When the value is 0, it means use the backend server port for health check. Valid value range in 0~65535.
- protocol String
- The protocol of health check. Valid values:
HTTP,TCP. Default isHTTP. - timeout Number
- The response timeout of health check. Unit: second. Valid value range in 1~60. Default is 2.
- unhealthy
Threshold Number - The unhealthy threshold of health check. Valid value range in 2~10. Default is 3.
- uri String
- The uri of health check.
ServerGroupStickySessionConfig, ServerGroupStickySessionConfigArgs
- string
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - int
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - Sticky
Session stringEnabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - Sticky
Session stringType - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
- string
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - int
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - Sticky
Session stringEnabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - Sticky
Session stringType - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
- String
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - Integer
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - sticky
Session StringEnabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - sticky
Session StringType - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
- string
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - number
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - sticky
Session stringEnabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - sticky
Session stringType - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
- str
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - int
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - sticky_
session_ strenabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - sticky_
session_ strtype - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
- String
- The cookie name of the sticky session. This field is required when the value of the
sticky_session_typeisserver. - Number
- The cookie timeout of the sticky session. Unit: second. Valid value range in 1~86400. Default is 1000. This field is required when the value of the
sticky_session_typeisinsert. - sticky
Session StringEnabled - The enable status of sticky session. Valid values:
on,off. Default isoff. - sticky
Session StringType - The cookie handle type of the sticky session. Valid values:
insert,server. Default isinsert. This field is required when the value of thesticky_session_enabledison.
ServerGroupTag, ServerGroupTagArgs
Import
AlbServerGroup can be imported using the id, e.g.
$ pulumi import volcengine:alb/serverGroup:ServerGroup default resource_id
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
volcengineTerraform Provider.
