1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. slb
  5. BackendServer
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.slb.BackendServer

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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=[{
            "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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BackendServer resource accepts the following input properties:

    LoadBalancerId string
    ID of the load balancer.
    BackendServers List<Pulumi.AliCloud.Slb.Inputs.BackendServerBackendServer>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    LoadBalancerId string
    ID of the load balancer.
    BackendServers []BackendServerBackendServerArgs
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId String
    ID of the load balancer.
    backendServers List<BackendServerBackendServer>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId string
    ID of the load balancer.
    backendServers BackendServerBackendServer[]
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation boolean
    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_id str
    ID of the load balancer.
    backend_servers Sequence[BackendServerBackendServerArgs]
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    delete_protection_validation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId String
    ID of the load balancer.
    backendServers List<Property Map>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation Boolean
    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.
    The following state arguments are supported:
    BackendServers List<Pulumi.AliCloud.Slb.Inputs.BackendServerBackendServer>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    LoadBalancerId string
    ID of the load balancer.
    BackendServers []BackendServerBackendServerArgs
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    LoadBalancerId string
    ID of the load balancer.
    backendServers List<BackendServerBackendServer>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId String
    ID of the load balancer.
    backendServers BackendServerBackendServer[]
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId string
    ID of the load balancer.
    backend_servers Sequence[BackendServerBackendServerArgs]
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    delete_protection_validation bool
    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_id str
    ID of the load balancer.
    backendServers List<Property Map>
    A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
    loadBalancerId String
    ID of the load balancer.

    Supporting Types

    BackendServerBackendServer, BackendServerBackendServerArgs

    ServerId string
    Weight int
    ServerIp string
    Type string
    ServerId string
    Weight int
    ServerIp string
    Type string
    serverId String
    weight Integer
    serverIp String
    type String
    serverId string
    weight number
    serverIp string
    type string
    serverId String
    weight Number
    serverIp String
    type String

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi