alicloud.slb.BackendServer
Explore with Pulumi AI
Add a group of backend servers (ECS or ENI instance) to the Server Load Balancer or remove them from it.
NOTE: Available in 1.53.0+
Create BackendServer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BackendServer(name: string, args: BackendServerArgs, opts?: CustomResourceOptions);
@overload
def BackendServer(resource_name: str,
args: BackendServerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BackendServer(resource_name: str,
opts: Optional[ResourceOptions] = None,
load_balancer_id: Optional[str] = None,
backend_servers: Optional[Sequence[BackendServerBackendServerArgs]] = None,
delete_protection_validation: Optional[bool] = None)
func NewBackendServer(ctx *Context, name string, args BackendServerArgs, opts ...ResourceOption) (*BackendServer, error)
public BackendServer(string name, BackendServerArgs args, CustomResourceOptions? opts = null)
public BackendServer(String name, BackendServerArgs args)
public BackendServer(String name, BackendServerArgs args, CustomResourceOptions options)
type: alicloud:slb:BackendServer
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 BackendServerArgs
- 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 BackendServerArgs
- 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 BackendServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackendServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackendServerArgs
- 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 backendServerResource = new AliCloud.Slb.BackendServer("backendServerResource", new()
{
LoadBalancerId = "string",
BackendServers = new[]
{
new AliCloud.Slb.Inputs.BackendServerBackendServerArgs
{
ServerId = "string",
Weight = 0,
ServerIp = "string",
Type = "string",
},
},
DeleteProtectionValidation = false,
});
example, err := slb.NewBackendServer(ctx, "backendServerResource", &slb.BackendServerArgs{
LoadBalancerId: pulumi.String("string"),
BackendServers: slb.BackendServerBackendServerArray{
&slb.BackendServerBackendServerArgs{
ServerId: pulumi.String("string"),
Weight: pulumi.Int(0),
ServerIp: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
DeleteProtectionValidation: pulumi.Bool(false),
})
var backendServerResource = new BackendServer("backendServerResource", BackendServerArgs.builder()
.loadBalancerId("string")
.backendServers(BackendServerBackendServerArgs.builder()
.serverId("string")
.weight(0)
.serverIp("string")
.type("string")
.build())
.deleteProtectionValidation(false)
.build());
backend_server_resource = alicloud.slb.BackendServer("backendServerResource",
load_balancer_id="string",
backend_servers=[alicloud.slb.BackendServerBackendServerArgs(
server_id="string",
weight=0,
server_ip="string",
type="string",
)],
delete_protection_validation=False)
const backendServerResource = new alicloud.slb.BackendServer("backendServerResource", {
loadBalancerId: "string",
backendServers: [{
serverId: "string",
weight: 0,
serverIp: "string",
type: "string",
}],
deleteProtectionValidation: false,
});
type: alicloud:slb:BackendServer
properties:
backendServers:
- serverId: string
serverIp: string
type: string
weight: 0
deleteProtectionValidation: false
loadBalancerId: string
BackendServer 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 BackendServer resource accepts the following input properties:
- Load
Balancer stringId - ID of the load balancer.
- Backend
Servers List<Pulumi.Ali Cloud. Slb. Inputs. Backend Server Backend Server> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Load
Balancer stringId - ID of the load balancer.
- Backend
Servers []BackendServer Backend Server Args - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer StringId - ID of the load balancer.
- backend
Servers List<BackendServer Backend Server> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer stringId - ID of the load balancer.
- backend
Servers BackendServer Backend Server[] - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection booleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load_
balancer_ strid - ID of the load balancer.
- backend_
servers Sequence[BackendServer Backend Server Args] - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete_
protection_ boolvalidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer StringId - ID of the load balancer.
- backend
Servers List<Property Map> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the BackendServer resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BackendServer Resource
Get an existing BackendServer 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?: BackendServerState, opts?: CustomResourceOptions): BackendServer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend_servers: Optional[Sequence[BackendServerBackendServerArgs]] = None,
delete_protection_validation: Optional[bool] = None,
load_balancer_id: Optional[str] = None) -> BackendServer
func GetBackendServer(ctx *Context, name string, id IDInput, state *BackendServerState, opts ...ResourceOption) (*BackendServer, error)
public static BackendServer Get(string name, Input<string> id, BackendServerState? state, CustomResourceOptions? opts = null)
public static BackendServer get(String name, Output<String> id, BackendServerState 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.
- Backend
Servers List<Pulumi.Ali Cloud. Slb. Inputs. Backend Server Backend Server> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Load
Balancer stringId - ID of the load balancer.
- Backend
Servers []BackendServer Backend Server Args - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Load
Balancer stringId - ID of the load balancer.
- backend
Servers List<BackendServer Backend Server> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer StringId - ID of the load balancer.
- backend
Servers BackendServer Backend Server[] - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection booleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer stringId - ID of the load balancer.
- backend_
servers Sequence[BackendServer Backend Server Args] - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete_
protection_ boolvalidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load_
balancer_ strid - ID of the load balancer.
- backend
Servers List<Property Map> - A list of instances to added backend server in the SLB. It contains three sub-fields as
Block server
follows. - delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- load
Balancer StringId - ID of the load balancer.
Supporting Types
BackendServerBackendServer, BackendServerBackendServerArgs
Import
Load balancer backend server can be imported using the load balancer id.
$ pulumi import alicloud:slb/backendServer:BackendServer example <load_balancer_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.