Module slb
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
- Acl
- Attachment
- BackendServer
- CaCertificate
- DomainExtension
- Listener
- LoadBalancer
- MasterSlaveServerGroup
- Rule
- ServerCertificate
- ServerGroup
Functions
- getAcls
- getAttachments
- getBackendServers
- getCaCertificates
- getDomainExtensions
- getListeners
- getLoadBalancers
- getMasterSlaveServerGroups
- getRules
- getServerCertificates
- getServerGroups
- getZones
Others
- AclArgs
- AclState
- AttachmentArgs
- AttachmentState
- BackendServerArgs
- BackendServerState
- CaCertificateArgs
- CaCertificateState
- DomainExtensionArgs
- DomainExtensionState
- GetAclsArgs
- GetAclsResult
- GetAttachmentsArgs
- GetAttachmentsResult
- GetBackendServersArgs
- GetBackendServersResult
- GetCaCertificatesArgs
- GetCaCertificatesResult
- GetDomainExtensionsArgs
- GetDomainExtensionsResult
- GetListenersArgs
- GetListenersResult
- GetLoadBalancersArgs
- GetLoadBalancersResult
- GetMasterSlaveServerGroupsArgs
- GetMasterSlaveServerGroupsResult
- GetRulesArgs
- GetRulesResult
- GetServerCertificatesArgs
- GetServerCertificatesResult
- GetServerGroupsArgs
- GetServerGroupsResult
- GetZonesArgs
- GetZonesResult
- ListenerArgs
- ListenerState
- LoadBalancerArgs
- LoadBalancerState
- MasterSlaveServerGroupArgs
- MasterSlaveServerGroupState
- RuleArgs
- RuleState
- ServerCertificateArgs
- ServerCertificateState
- ServerGroupArgs
- ServerGroupState
Resources
Resource Acl
class Acl extends CustomResourceconstructor
new Acl(name: string, args?: AclArgs, opts?: pulumi.CustomResourceOptions)Create a Acl resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AclState, opts?: pulumi.CustomResourceOptions): AclGet an existing Acl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AclReturns true if the given object is an instance of Acl. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property entryLists
public entryLists: pulumi.Output<AclEntryList[] | undefined>;A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ipVersion
public ipVersion: pulumi.Output<string | undefined>;The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: “ipv4”.
property name
public name: pulumi.Output<string>;Name of the access control list.
property resourceGroupId
public resourceGroupId: pulumi.Output<string>;Resource group ID.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Attachment
class Attachment extends CustomResourceconstructor
new Attachment(name: string, args: AttachmentArgs, opts?: pulumi.CustomResourceOptions)Create a Attachment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AttachmentState, opts?: pulumi.CustomResourceOptions): AttachmentGet an existing Attachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AttachmentReturns true if the given object is an instance of Attachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property backendServers
public backendServers: pulumi.Output<string>;The backend servers of the load balancer.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceIds
public instanceIds: pulumi.Output<string[]>;A list of instance ids to added backend server in the SLB.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;ID of the load balancer.
property serverType
public serverType: pulumi.Output<string | undefined>;Type of the instances. Valid value ecs, eni. Default to ecs.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property weight
public weight: pulumi.Output<number | undefined>;Weight of the instances. Valid value range: [0-100]. Default to 100.
Resource BackendServer
class BackendServer extends CustomResourceAdd 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+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "slbbackendservertest";
const defaultZones = pulumi.output(alicloud.getZones({
availableDiskCategory: "cloudEfficiency",
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultInstanceTypes = defaultZones.apply(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones[0].id,
cpuCoreCount: 1,
memorySize: 2,
}, { async: true }));
const defaultImages = pulumi.output(alicloud.ecs.getImages({
mostRecent: true,
nameRegex: "^ubuntu_18.*64",
owners: "system",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/16",
vpcId: defaultNetwork.id,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
vpcId: defaultNetwork.id,
});
const defaultInstance: alicloud.ecs.Instance[] = [];
for (let i = 0; i < 2; i++) {
defaultInstance.push(new alicloud.ecs.Instance(`default-${i}`, {
availabilityZone: defaultZones.zones[0].id,
imageId: defaultImages.images[0].id,
instanceChargeType: "PostPaid",
instanceName: name,
instanceType: defaultInstanceTypes.instanceTypes[0].id,
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 10,
securityGroups: defaultSecurityGroup.id,
systemDiskCategory: "cloudEfficiency",
vswitchId: defaultSwitch.id,
}));
}
const defaultLoadBalancer = new alicloud.slb.LoadBalancer("default", {
vswitchId: defaultSwitch.id,
});
const defaultBackendServer = new alicloud.slb.BackendServer("default", {
backendServers: [
{
serverId: defaultInstance[0].id,
weight: 100,
},
{
serverId: defaultInstance[1].id,
weight: 100,
},
],
loadBalancerId: defaultLoadBalancer.id,
});Block servers
The servers mapping supports the following:
serverId- (Required) A list backend server ID (ECS instance ID).weight- (Optional) Weight of the backend server. Valid value range: [0-100].type- (Optional) Type of the backend server. Valid value ecs, eni. Default to eni.
constructor
new BackendServer(name: string, args: BackendServerArgs, opts?: pulumi.CustomResourceOptions)Create a BackendServer resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackendServerState, opts?: pulumi.CustomResourceOptions): BackendServerGet an existing BackendServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is BackendServerReturns true if the given object is an instance of BackendServer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property backendServers
public backendServers: pulumi.Output<BackendServerBackendServer[] | undefined>;A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;ID of the load balancer.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource CaCertificate
class CaCertificate extends CustomResourceA Load Balancer CA Certificate is used by the listener of the protocol https.
For information about slb and how to use it, see What is Server Load Balancer.
For information about CA Certificate and how to use it, see Configure CA Certificate.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// create a CA certificate
const foo = new alicloud.slb.CaCertificate("foo", {
caCertificate: `-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----`,
});constructor
new CaCertificate(name: string, args: CaCertificateArgs, opts?: pulumi.CustomResourceOptions)Create a CaCertificate resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CaCertificateState, opts?: pulumi.CustomResourceOptions): CaCertificateGet an existing CaCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is CaCertificateReturns true if the given object is an instance of CaCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property caCertificate
public caCertificate: pulumi.Output<string>;the content of the CA certificate.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;Name of the CA Certificate.
property resourceGroupId
public resourceGroupId: pulumi.Output<string>;The Id of resource group which the slbCa certificate belongs.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource DomainExtension
class DomainExtension extends CustomResourceHTTPS listeners of guaranteed-performance SLB support configuring multiple certificates, allowing you to forward requests with different domain names to different backend servers. Please refer to the documentation for details.
NOTE: Available in 1.60.0+
NOTE: The instance with shared loadBalancerSpec doesn’t support domainExtension.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const instance = new alicloud.slb.LoadBalancer("instance", {
internet: true,
internetChargeType: "PayByTraffic",
});
const foo = new alicloud.slb.ServerCertificate("foo", {
privateKey: `-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAyjCheapjf7qDI3R9w/Gj0XFDgNLPK2aWIRvM25BdY/IB2KAf
xQ7zOxu3X1bMo2zMCzsSrwIVrxx0qRM/7e4AfkHcKwDIjCcBprQp164dhFol4GpT
HtcuGv0+Ue6vpuE9cxQE3/pG5x1n5EhheFu2+lAaGh/vUrUPeQp6szX/9qfzn+/k
tF8wsRV8PBiFc2ZNMRXupRyc2qtOn95r86w/uK6TuerU1L64E2P5+tYLBWT+39Ai
diUIenjURThFEn8Srvw8v/iLEMaKwiWNkOfWQH96166gzddOI8PT5cJy5an2c90T
DgzegVo8RPK70bU9KjH7gH79YIwXVmTdIVGAUQIDAQABAoIBAE1J4a/8biR5S3/W
G+03BYQeY8tuyjqw8FqfoeOcf9agwAvqybouSNQjeCk9qOQfxq/UWQQFK/zQR9gJ
v7pX7GBXFK5rkj3g+0SaQhRsPmRFgY0Tl8qGPt2aSKRRNVv5ZeADmwlzRn86QmiF
Mp0rkfqFfDTYWEepZszCML0ouzuxsW/9tq7rvtSjsgATNt31B3vFa3D3JBi31jUh
5nfR9A3bATze7mQw3byEDiVl5ASRDgYyur403P1fDnMy9DBHZ8NaPOsFF6OBpJal
BJsG5z00hll5PFN2jfmBQKlvAeU7wfwqdaSnGHOfqf2DeTTaFjIQ4gUhRn/m6pLo
6kXttLECgYEA9sng0Qz/TcPFfM4tQ1gyvB1cKnnGIwg1FP8sfUjbbEgjaHhA224S
k3BxtX2Kq6fhTXuwusAFc6OVMAZ76FgrQ5K4Ci7+DTsrF28z4b8td+p+lO/DxgP9
lTgN+ddsiTOV4fUef9Z3yY0Zr0CnBUMbQYRaV2UIbCdiB0G4V/bt9TsCgYEA0bya
Oo9wGI0RJV0bYP7qwO74Ra1/i1viWbRlS7jU37Q+AZstrlKcQ5CTPzOjKFKMiUzl
4miWacZ0/q2n+Mvd7NbXGXTLijahnyOYKaHJYyh4oBymfkgAifRstE0Ki9gdvArb
/I+emC0GvLSyfGN8UUeDJs4NmqdEXGqjo2JOV+MCgYALFv1MR5o9Y1u/hQBRs2fs
PiGDIx+9OUQxYloccyaxEfjNXAIGGkcpavchIbgWiJ++PJ2vdquIC8TLeK8evL+M
9M3iX0Q5UfxYvD2HmnCvn9D6Xl/cyRcfGnq+TGjrLW9BzSMGuZt+aiHKV0xqFx7l
bc4leTvMqGRmURS4lzcQOwKBgQCDzA/i4sYfN25h21tcHXSpnsG3D2rJyQi5NCo/
ZjunA92/JqOTGuiFcLGHEszhhtY3ZXJET1LNz18vtzKJnpqrvOnYXlOVW/U+SqDQ
8JDb1c/PVZGuY1KrXkR9HLiW3kz5IJ3S3PFdUVYdeTN8BQxXCyg4V12nJJtJs912
y0zN3wKBgGDS6YttCN6aI4EOABYE8fI1EYQ7vhfiYsaWGWSR1l6bQey7KR6M1ACz
ZzMASNyytVt12yXE4/Emv6/pYqigbDLfL1zQJSLJ3EHJYTh2RxjR+AaGDudYFG/T
liQ9YXhV5Iu2x1pNwrtFnssDdaaGpfA7l3xC00BL7Z+SAJyI4QKA
-----END RSA PRIVATE KEY-----`,
serverCertificate: `-----BEGIN CERTIFICATE-----
MIIDdjCCAl4CCQCcm+erkcKN7DANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJj
bjELMAkGA1UECAwCYmoxEDAOBgNVBAcMB2JlaWppbmcxDzANBgNVBAoMBmFsaXl1
bjELMAkGA1UECwwCc2MxFTATBgNVBAMMDHd3dy50ZXN0LmNvbTEaMBgGCSqGSIb3
DQEJARYLMTIzQDEyMy5jb20wHhcNMTkwNDI2MDM0ODAxWhcNMjQwNDI1MDM0ODAx
WjB9MQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxEDAOBgNVBAcMB2JlaWppbmcx
DzANBgNVBAoMBmFsaXl1bjELMAkGA1UECwwCc2MxFTATBgNVBAMMDHd3dy50ZXN0
LmNvbTEaMBgGCSqGSIb3DQEJARYLMTIzQDEyMy5jb20wggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDKMKF5qmN/uoMjdH3D8aPRcUOA0s8rZpYhG8zbkF1j
8gHYoB/FDvM7G7dfVsyjbMwLOxKvAhWvHHSpEz/t7gB+QdwrAMiMJwGmtCnXrh2E
WiXgalMe1y4a/T5R7q+m4T1zFATf+kbnHWfkSGF4W7b6UBoaH+9StQ95CnqzNf/2
p/Of7+S0XzCxFXw8GIVzZk0xFe6lHJzaq06f3mvzrD+4rpO56tTUvrgTY/n61gsF
ZP7f0CJ2JQh6eNRFOEUSfxKu/Dy/+IsQxorCJY2Q59ZAf3rXrqDN104jw9PlwnLl
qfZz3RMODN6BWjxE8rvRtT0qMfuAfv1gjBdWZN0hUYBRAgMBAAEwDQYJKoZIhvcN
AQELBQADggEBAABzo82TxGp5poVkd5pLWj5ACgcBv8Cs6oH9D+4Jz9BmyuBUsQXh
2aG0hQAe1mU61C9konsl/GTW8umJQ4M4lYEztXXwMf5PlBMGwebM0ZbSGg6jKtZg
WCgJ3eP/FMmyXGL5Jji5+e09eObhUDVle4tdi0On97zBoz85W02rgWFAqZJwiEAP
t+c7jX7uOSBq2/38iGStlrX5yB1at/gJXXiA5CL5OtlR3Okvb0/QH37efO1Nu39m
lFi0ODPAVyXjVypAiLguDxPn6AtDTdk9Iw9B19OD4NrzNRWgSSX5vuxo/VcRcgWk
3gEe9Ca0ZKN20q9XgthAiFFjl1S9ZgdA6Zc=
-----END CERTIFICATE-----`,
});
const https = new alicloud.slb.Listener("https", {
backendPort: 80,
bandwidth: 10,
cookie: "testslblistenercookie",
cookieTimeout: 86400,
frontendPort: 443,
healthCheck: "on",
healthCheckConnectPort: 20,
healthCheckHttpCode: "http_2xx,http_3xx",
healthCheckInterval: 5,
healthCheckTimeout: 8,
healthCheckUri: "/cons",
healthyThreshold: 8,
loadBalancerId: instance.id,
protocol: "https",
sslCertificateId: foo.id,
stickySession: "on",
stickySessionType: "insert",
unhealthyThreshold: 8,
});
const example1 = new alicloud.slb.DomainExtension("example1", {
domain: "www.test.com",
frontendPort: https.frontendPort,
loadBalancerId: instance.id,
serverCertificateId: foo.id,
});constructor
new DomainExtension(name: string, args: DomainExtensionArgs, opts?: pulumi.CustomResourceOptions)Create a DomainExtension resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainExtensionState, opts?: pulumi.CustomResourceOptions): DomainExtensionGet an existing DomainExtension resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DomainExtensionReturns true if the given object is an instance of DomainExtension. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property domain
public domain: pulumi.Output<string>;The domain name,
property frontendPort
public frontendPort: pulumi.Output<number>;The frontend port used by the HTTPS listener of the SLB instance. Valid values: 1–65535.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;The ID of the SLB instance.
property serverCertificateId
public serverCertificateId: pulumi.Output<string>;The ID of the certificate used by the domain name.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Listener
class Listener extends CustomResourceProvides an Application Load Balancer Listener resource.
For information about slb and how to use it, see What is Server Load Balancer.
For information about listener and how to use it, to see the following:
- Configure a HTTP Listener.
- Configure a HTTPS Listener.
- Configure a TCP Listener.
- Configure a UDP Listener.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "testcreatehttplistener";
const ipVersion = config.get("ipVersion") || "ipv4";
const defaultLoadBalancer = new alicloud.slb.LoadBalancer("default", {
internet: true,
internetChargeType: "PayByTraffic",
});
const defaultAcl = new alicloud.slb.Acl("default", {
entryLists: [
{
comment: "first",
entry: "10.10.10.0/24",
},
{
comment: "second",
entry: "168.10.10.0/24",
},
],
ipVersion: ipVersion,
});
const defaultListener = new alicloud.slb.Listener("default", {
aclId: defaultAcl.id,
aclStatus: "on",
aclType: "white",
backendPort: 80,
bandwidth: 10,
cookie: "testslblistenercookie",
cookieTimeout: 86400,
frontendPort: 80,
healthCheck: "on",
healthCheckConnectPort: 20,
healthCheckDomain: "ali.com",
healthCheckHttpCode: "http_2xx,http_3xx",
healthCheckInterval: 5,
healthCheckTimeout: 8,
healthCheckUri: "/cons",
healthyThreshold: 8,
idleTimeout: 30,
loadBalancerId: defaultLoadBalancer.id,
protocol: "http",
requestTimeout: 80,
stickySession: "on",
stickySessionType: "insert",
unhealthyThreshold: 8,
xForwardedFor: {
retriveSlbId: true,
retriveSlbIp: true,
},
});Listener fields and protocol mapping
load balance support 4 protocal to listen on, they are http,https,tcp,udp, the every listener support which portocal following:
| listener parameter | support protocol | value range |
|---|---|---|
| backendPort | http & https & tcp & udp | 1-65535 |
| frontendPort | http & https & tcp & udp | 1-65535 |
| protocol | http & https & tcp & udp | |
| bandwidth | http & https & tcp & udp | -1 / 1-1000 |
| scheduler | http & https & tcp & udp | wrr rr or wlc |
| stickySession | http & https | on or off |
| stickySessionType | http & https | insert or server |
| cookieTimeout | http & https | 1-86400 |
| cookie | http & https | |
| persistenceTimeout | tcp & udp | 0-3600 |
| healthCheck | http & https | on or off |
| healthCheckType | tcp | tcp or http |
| healthCheckDomain | http & https & tcp | |
| healthCheckMethod | http & https & tcp | |
| healthCheckUri | http & https & tcp | |
| healthCheckConnectPort | http & https & tcp & udp | 1-65535 or -520 |
| healthyThreshold | http & https & tcp & udp | 1-10 |
| unhealthyThreshold | http & https & tcp & udp | 1-10 |
| healthCheckTimeout | http & https & tcp & udp | 1-300 |
| healthCheckInterval | http & https & tcp & udp | 1-50 |
| healthCheckHttpCode | http & https & tcp | http_2xx,http_3xx,http_4xx,http_5xx |
| serverCertificateId | https | |
| gzip | http & https | true or false |
| xForwardedFor | http & https | |
| aclStatus | http & https & tcp & udp | on or off |
| aclType | http & https & tcp & udp | white or black |
| aclId | http & https & tcp & udp | the id of resource alicloud_slb_acl |
| establishedTimeout | tcp | 10-900 |
| idleTimeout | http & https | 1-60 |
| requestTimeout | http & https | 1-180 |
| enableHttp2 | https | on or off |
| tlsCipherPolicy | https | tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tlsCipherPolicy12Strict |
| serverGroupId | http & https & tcp & udp | the id of resource alicloud.slb.ServerGroup |
The listener mapping supports the following:
constructor
new Listener(name: string, args: ListenerArgs, opts?: pulumi.CustomResourceOptions)Create a Listener resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ListenerState, opts?: pulumi.CustomResourceOptions): ListenerGet an existing Listener resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ListenerReturns true if the given object is an instance of Listener. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property aclId
public aclId: pulumi.Output<string | undefined>;the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored.
property aclStatus
public aclStatus: pulumi.Output<string | undefined>;Whether to enable “acl(access control list)”, the acl is specified by aclId. Valid values are on and off. Default to off.
property aclType
public aclType: pulumi.Output<string | undefined>;Mode for handling the acl specified by acl_id. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.
property backendPort
public backendPort: pulumi.Output<number | undefined>;Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].
property bandwidth
public bandwidth: pulumi.Output<number | undefined>;Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.
property cookie
public cookie: pulumi.Output<string | undefined>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
public cookieTimeout: pulumi.Output<number | undefined>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property description
public description: pulumi.Output<string | undefined>;The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.
property enableHttp2
public enableHttp2: pulumi.Output<string | undefined>;Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.
property establishedTimeout
public establishedTimeout: pulumi.Output<number | undefined>;Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
property forwardPort
public forwardPort: pulumi.Output<number | undefined>;The port that http redirect to https.
property frontendPort
public frontendPort: pulumi.Output<number>;Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
property gzip
public gzip: pulumi.Output<boolean | undefined>;Whether to enable “Gzip Compression”. If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.
property healthCheck
public healthCheck: pulumi.Output<string | undefined>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.
property healthCheckConnectPort
public healthCheckConnectPort: pulumi.Output<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
public healthCheckDomain: pulumi.Output<string | undefined>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
public healthCheckHttpCode: pulumi.Output<string | undefined>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
public healthCheckInterval: pulumi.Output<number | undefined>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckMethod
public healthCheckMethod: pulumi.Output<string>;The method of health check. Valid values: [“head”, “get”].
property healthCheckTimeout
public healthCheckTimeout: pulumi.Output<number | undefined>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckType
public healthCheckType: pulumi.Output<string | undefined>;Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.
property healthCheckUri
public healthCheckUri: pulumi.Output<string | undefined>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
public healthyThreshold: pulumi.Output<number | undefined>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property idleTimeout
public idleTimeout: pulumi.Output<number | undefined>;Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
property instancePort
public instancePort: pulumi.Output<number | undefined>;property lbPort
public lbPort: pulumi.Output<number | undefined>;property lbProtocol
public lbProtocol: pulumi.Output<string | undefined>;property listenerForward
public listenerForward: pulumi.Output<string>;Whether to enable http redirect to https, Valid values are on and off. Default to off.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;The Load Balancer ID which is used to launch a new listener.
property masterSlaveServerGroupId
public masterSlaveServerGroupId: pulumi.Output<string | undefined>;property persistenceTimeout
public persistenceTimeout: pulumi.Output<number | undefined>;Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
property protocol
public protocol: pulumi.Output<string>;The protocol to listen on. Valid values are [http, https, tcp, udp].
property requestTimeout
public requestTimeout: pulumi.Output<number | undefined>;Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.
property scheduler
public scheduler: pulumi.Output<string | undefined>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”.
property serverCertificateId
public serverCertificateId: pulumi.Output<string>;SLB Server certificate ID. It is required when protocol is https.
property serverGroupId
public serverGroupId: pulumi.Output<string | undefined>;the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.
property sslCertificateId
public sslCertificateId: pulumi.Output<string>;It has been deprecated from 1.59.0 and using serverCertificateId instead.
property stickySession
public stickySession: pulumi.Output<string | undefined>;Whether to enable session persistence, Valid values are on and off. Default to off.
property stickySessionType
public stickySessionType: pulumi.Output<string | undefined>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property tlsCipherPolicy
public tlsCipherPolicy: pulumi.Output<string | undefined>;Https listener TLS cipher policy. Valid values are tlsCipherPolicy10, tlsCipherPolicy11, tlsCipherPolicy12, tlsCipherPolicy12Strict. Default to tlsCipherPolicy10. Currently the tlsCipherPolicy can not be updated when load balancer instance is “Shared-Performance”.
property unhealthyThreshold
public unhealthyThreshold: pulumi.Output<number | undefined>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property xForwardedFor
public xForwardedFor: pulumi.Output<ListenerXForwardedFor>;Whether to set additional HTTP Header field “X-Forwarded-For” (documented below). Available in v1.13.0+.
Resource LoadBalancer
class LoadBalancer extends CustomResourceconstructor
new LoadBalancer(name: string, args?: LoadBalancerArgs, opts?: pulumi.CustomResourceOptions)Create a LoadBalancer resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerState, opts?: pulumi.CustomResourceOptions): LoadBalancerGet an existing LoadBalancer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LoadBalancerReturns true if the given object is an instance of LoadBalancer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property address
public address: pulumi.Output<string>;Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
property addressIpVersion
public addressIpVersion: pulumi.Output<string | undefined>;The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
property addressType
public addressType: pulumi.Output<string>;The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
property bandwidth
public bandwidth: pulumi.Output<number | undefined>;Valid value is between 1 and 1000, If argument “internetChargeType” is “paybytraffic”, then this value will be ignore.
property deleteProtection
public deleteProtection: pulumi.Output<string | undefined>;Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceChargeType
public instanceChargeType: pulumi.Output<string | undefined>;The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
property internet
public internet: pulumi.Output<boolean>;Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
property internetChargeType
public internetChargeType: pulumi.Output<string | undefined>;Valid
values are PayByBandwidth, PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”.
Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.
property masterZoneId
public masterZoneId: pulumi.Output<string>;The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property name
public name: pulumi.Output<string>;property period
public period: pulumi.Output<number | undefined>;The duration that you will buy the resource, in month. It is valid when instanceChargeType is PrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].
property resourceGroupId
public resourceGroupId: pulumi.Output<string>;The Id of resource group which the SLB belongs.
property slaveZoneId
public slaveZoneId: pulumi.Output<string>;The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property specification
public specification: pulumi.Output<string | undefined>;The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A mapping of tags to assign to the resource. The tags can have a maximum of 10 tag for every load balancer instance.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vswitchId
public vswitchId: pulumi.Output<string | undefined>;The VSwitch ID to launch in. If addressType is internet, it will be ignore.
Resource MasterSlaveServerGroup
class MasterSlaveServerGroup extends CustomResourceA master slave server group contains two ECS instances. The master slave server group can help you to define multiple listening dimension.
NOTE: One ECS instance can be added into multiple master slave server groups.
NOTE: One master slave server group can only add two ECS instances, which are master server and slave server.
NOTE: One master slave server group can be attached with tcp/udp listeners in one load balancer.
NOTE: One Classic and Internet load balancer, its master slave server group can add Classic and VPC ECS instances.
NOTE: One Classic and Intranet load balancer, its master slave server group can only add Classic ECS instances.
NOTE: One VPC load balancer, its master slave server group can only add the same VPC ECS instances.
NOTE: Available in 1.54.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccSlbMasterSlaveServerGroupVpc";
const number = config.get("number") || "1";
const defaultZones = pulumi.output(alicloud.getZones({
availableDiskCategory: "cloudEfficiency",
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultInstanceTypes = defaultZones.apply(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones[0].id,
eniAmount: 2,
}, { async: true }));
const image = pulumi.output(alicloud.ecs.getImages({
mostRecent: true,
nameRegex: "^ubuntu_18.*64",
owners: "system",
}, { async: true }));
const mainNetwork = new alicloud.vpc.Network("main", {
cidrBlock: "172.16.0.0/16",
});
const mainSwitch = new alicloud.vpc.Switch("main", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/16",
vpcId: mainNetwork.id,
});
const groupSecurityGroup = new alicloud.ecs.SecurityGroup("group", {
vpcId: mainNetwork.id,
});
const instanceInstance: alicloud.ecs.Instance[] = [];
for (let i = 0; i < 2; i++) {
instanceInstance.push(new alicloud.ecs.Instance(`instance-${i}`, {
availabilityZone: defaultZones.zones[0].id,
imageId: image.images[0].id,
instanceChargeType: "PostPaid",
instanceName: name,
instanceType: defaultInstanceTypes.instanceTypes[0].id,
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 10,
securityGroups: [groupSecurityGroup.id],
systemDiskCategory: "cloudEfficiency",
vswitchId: mainSwitch.id,
}));
}
const instanceLoadBalancer = new alicloud.slb.LoadBalancer("instance", {
specification: "slb.s2.small",
vswitchId: mainSwitch.id,
});
const defaultNetworkInterface: alicloud.vpc.NetworkInterface[] = [];
for (let i = 0; i < number; i++) {
defaultNetworkInterface.push(new alicloud.vpc.NetworkInterface(`default-${i}`, {
securityGroups: [groupSecurityGroup.id],
vswitchId: mainSwitch.id,
}));
}
const defaultNetworkInterfaceAttachment: alicloud.vpc.NetworkInterfaceAttachment[] = [];
for (let i = 0; i < number; i++) {
defaultNetworkInterfaceAttachment.push(new alicloud.vpc.NetworkInterfaceAttachment(`default-${i}`, {
instanceId: instanceInstance[0].id,
networkInterfaceId: pulumi.all(defaultNetworkInterface.map(v => v.id)).apply(id => id.map(v => v)[i]),
}));
}
const groupMasterSlaveServerGroup = new alicloud.slb.MasterSlaveServerGroup("group", {
loadBalancerId: instanceLoadBalancer.id,
servers: [
{
port: 100,
serverId: instanceInstance[0].id,
serverType: "Master",
weight: 100,
},
{
port: 100,
serverId: instanceInstance[1].id,
serverType: "Slave",
weight: 100,
},
],
});
const tcp = new alicloud.slb.Listener("tcp", {
bandwidth: 10,
establishedTimeout: 600,
frontendPort: 22,
healthCheckConnectPort: 20,
healthCheckHttpCode: "http2xx",
healthCheckInterval: 5,
healthCheckTimeout: 8,
healthCheckType: "tcp",
healthCheckUri: "/console",
healthyThreshold: 8,
loadBalancerId: instanceLoadBalancer.id,
masterSlaveServerGroupId: groupMasterSlaveServerGroup.id,
persistenceTimeout: 3600,
protocol: "tcp",
unhealthyThreshold: 8,
});Block servers
The servers mapping supports the following:
serverIds- (Required) A list backend server ID (ECS instance ID).port- (Required) The port used by the backend server. Valid value range: [1-65535].weight- (Optional) Weight of the backend server. Valid value range: [0-100]. Default to 100.type- (Optional, Available in 1.51.0+) Type of the backend server. Valid value ecs, eni. Default to eni.serverType- (Optional) The server type of the backend server. Valid value Master, Slave.isBackup- (Removed from v1.63.0) Determine if the server is executing. Valid value 0, 1.
constructor
new MasterSlaveServerGroup(name: string, args: MasterSlaveServerGroupArgs, opts?: pulumi.CustomResourceOptions)Create a MasterSlaveServerGroup resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MasterSlaveServerGroupState, opts?: pulumi.CustomResourceOptions): MasterSlaveServerGroupGet an existing MasterSlaveServerGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is MasterSlaveServerGroupReturns true if the given object is an instance of MasterSlaveServerGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;The Load Balancer ID which is used to launch a new master slave server group.
property name
public name: pulumi.Output<string>;Name of the master slave server group.
property servers
public servers: pulumi.Output<MasterSlaveServerGroupServer[] | undefined>;A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Rule
class Rule extends CustomResourceA forwarding rule is configured in HTTP/HTTPS listener and it used to listen a list of backend servers which in one specified virtual backend server group.
You can add forwarding rules to a listener to forward requests based on the domain names or the URL in the request.
NOTE: One virtual backend server group can be attached in multiple forwarding rules.
NOTE: At least one “Domain” or “Url” must be specified when creating a new rule.
NOTE: Having the same ‘Domain’ and ‘Url’ rule can not be created repeatedly in the one listener.
NOTE: Rule only be created in the
HTTPorHTTPSlistener.NOTE: Only rule’s virtual server group can be modified.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "slbrulebasicconfig";
const defaultZones = pulumi.output(alicloud.getZones({
availableDiskCategory: "cloudEfficiency",
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultInstanceTypes = defaultZones.apply(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones[0].id,
cpuCoreCount: 1,
memorySize: 2,
}, { async: true }));
const defaultImages = pulumi.output(alicloud.ecs.getImages({
mostRecent: true,
nameRegex: "^ubuntu_18.*64",
owners: "system",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/16",
vpcId: defaultNetwork.id,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
availabilityZone: defaultZones.zones[0].id,
imageId: defaultImages.images[0].id,
instanceChargeType: "PostPaid",
instanceName: name,
instanceType: defaultInstanceTypes.instanceTypes[0].id,
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 10,
securityGroups: defaultSecurityGroup.id,
systemDiskCategory: "cloudEfficiency",
vswitchId: defaultSwitch.id,
});
const defaultLoadBalancer = new alicloud.slb.LoadBalancer("default", {
vswitchId: defaultSwitch.id,
});
const defaultListener = new alicloud.slb.Listener("default", {
backendPort: 22,
bandwidth: 5,
frontendPort: 22,
healthCheckConnectPort: 20,
loadBalancerId: defaultLoadBalancer.id,
protocol: "http",
});
const defaultServerGroup = new alicloud.slb.ServerGroup("default", {
loadBalancerId: defaultLoadBalancer.id,
servers: [{
port: 80,
serverIds: defaultInstance.id,
weight: 100,
}],
});
const defaultRule = new alicloud.slb.Rule("default", {
cookie: "23ffsa",
cookieTimeout: 100,
domain: "*.aliyun.com",
frontendPort: defaultListener.frontendPort,
healthCheck: "on",
healthCheckConnectPort: 80,
healthCheckDomain: "test",
healthCheckHttpCode: "http2xx",
healthCheckInterval: 10,
healthCheckTimeout: 30,
healthCheckUri: "/test",
healthyThreshold: 3,
listenerSync: "off",
loadBalancerId: defaultLoadBalancer.id,
scheduler: "rr",
serverGroupId: defaultServerGroup.id,
stickySession: "on",
stickySessionType: "server",
unhealthyThreshold: 5,
url: "/image",
});constructor
new Rule(name: string, args: RuleArgs, opts?: pulumi.CustomResourceOptions)Create a Rule resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RuleState, opts?: pulumi.CustomResourceOptions): RuleGet an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is RuleReturns true if the given object is an instance of Rule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cookie
public cookie: pulumi.Output<string | undefined>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
public cookieTimeout: pulumi.Output<number | undefined>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property domain
public domain: pulumi.Output<string | undefined>;Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported: - Standard domain name: www.test.com - Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
property frontendPort
public frontendPort: pulumi.Output<number>;The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].
property healthCheck
public healthCheck: pulumi.Output<string | undefined>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.
property healthCheckConnectPort
public healthCheckConnectPort: pulumi.Output<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
public healthCheckDomain: pulumi.Output<string | undefined>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
public healthCheckHttpCode: pulumi.Output<string | undefined>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
public healthCheckInterval: pulumi.Output<number | undefined>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckTimeout
public healthCheckTimeout: pulumi.Output<number | undefined>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckUri
public healthCheckUri: pulumi.Output<string | undefined>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
public healthyThreshold: pulumi.Output<number | undefined>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property listenerSync
public listenerSync: pulumi.Output<string | undefined>;Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;The Load Balancer ID which is used to launch the new forwarding rule.
property name
public name: pulumi.Output<string>;Name of the forwarding rule. Our plugin provides a default name: “tf-slb-rule”.
property scheduler
public scheduler: pulumi.Output<string | undefined>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”. This parameter is required and takes effect only when ListenerSync is set to off.
property serverGroupId
public serverGroupId: pulumi.Output<string>;ID of a virtual server group that will be forwarded.
property stickySession
public stickySession: pulumi.Output<string | undefined>;Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.
property stickySessionType
public stickySessionType: pulumi.Output<string | undefined>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property unhealthyThreshold
public unhealthyThreshold: pulumi.Output<number | undefined>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property url
public url: pulumi.Output<string | undefined>;Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters ‘-’ ‘/’ ‘?’ ‘%’ ‘#’ and ‘&’ are allowed. URLs must be started with the character ‘/’, but cannot be ‘/’ alone.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServerCertificate
class ServerCertificate extends CustomResourceA Load Balancer Server Certificate is an ssl Certificate used by the listener of the protocol https.
For information about slb and how to use it, see What is Server Load Balancer.
For information about Server Certificate and how to use it, see Configure Server Certificate.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// create a server certificate
const foo = new alicloud.slb.ServerCertificate("foo", {
privateKey: `-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0knDrlNdiys******ErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----`,
serverCertificate: `-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgI+OuMs******XTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----`,
});constructor
new ServerCertificate(name: string, args?: ServerCertificateArgs, opts?: pulumi.CustomResourceOptions)Create a ServerCertificate resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerCertificateState, opts?: pulumi.CustomResourceOptions): ServerCertificateGet an existing ServerCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServerCertificateReturns true if the given object is an instance of ServerCertificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property alicloudCertifacteId
public alicloudCertifacteId: pulumi.Output<string | undefined>;property alicloudCertifacteName
public alicloudCertifacteName: pulumi.Output<string | undefined>;property alicloudCertificateId
public alicloudCertificateId: pulumi.Output<string | undefined>;an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateName
public alicloudCertificateName: pulumi.Output<string | undefined>;the name of the certificate specified by alicloudCertificateId.but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateRegionId
public alicloudCertificateRegionId: pulumi.Output<string | undefined>;the region of the certificate specified by alicloudCertificateId. but it is not supported on the international site of alibaba cloud now.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;Name of the Server Certificate.
property privateKey
public privateKey: pulumi.Output<string | undefined>;the content of privat key of the ssl certificate specified by serverCertificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property resourceGroupId
public resourceGroupId: pulumi.Output<string>;The Id of resource group which the slb server certificate belongs.
property serverCertificate
public serverCertificate: pulumi.Output<string | undefined>;the content of the ssl certificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServerGroup
class ServerGroup extends CustomResourceA virtual server group contains several ECS instances. The virtual server group can help you to define multiple listening dimension, and to meet the personalized requirements of domain name and URL forwarding.
NOTE: One ECS instance can be added into multiple virtual server groups.
NOTE: One virtual server group can be attached with multiple listeners in one load balancer.
NOTE: One Classic and Internet load balancer, its virtual server group can add Classic and VPC ECS instances.
NOTE: One Classic and Intranet load balancer, its virtual server group can only add Classic ECS instances.
NOTE: One VPC load balancer, its virtual server group can only add the same VPC ECS instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "slbservergroupvpc";
const defaultZones = pulumi.output(alicloud.getZones({
availableDiskCategory: "cloudEfficiency",
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultInstanceTypes = defaultZones.apply(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones[0].id,
cpuCoreCount: 1,
memorySize: 2,
}, { async: true }));
const defaultImages = pulumi.output(alicloud.ecs.getImages({
mostRecent: true,
nameRegex: "^ubuntu_18.*64",
owners: "system",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/16",
vpcId: defaultNetwork.id,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
vpcId: defaultNetwork.id,
});
const instance: alicloud.ecs.Instance[] = [];
for (let i = 0; i < 2; i++) {
instance.push(new alicloud.ecs.Instance(`instance-${i}`, {
availabilityZone: defaultZones.zones[0].id,
imageId: defaultImages.images[0].id,
instanceChargeType: "PostPaid",
instanceName: name,
instanceType: defaultInstanceTypes.instanceTypes[0].id,
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 10,
securityGroups: defaultSecurityGroup.id,
systemDiskCategory: "cloudEfficiency",
vswitchId: defaultSwitch.id,
}));
}
const defaultLoadBalancer = new alicloud.slb.LoadBalancer("default", {
vswitchId: defaultSwitch.id,
});
const defaultServerGroup = new alicloud.slb.ServerGroup("default", {
loadBalancerId: defaultLoadBalancer.id,
servers: [
{
port: 100,
serverIds: [
instance[0].id,
instance[1].id,
],
weight: 10,
},
{
port: 80,
serverIds: instance.map(v => v.id),
weight: 100,
},
],
});Block servers
The servers mapping supports the following:
serverIds- (Required) A list backend server ID (ECS instance ID).port- (Required) The port used by the backend server. Valid value range: [1-65535].weight- (Optional) Weight of the backend server. Valid value range: [0-100]. Default to 100.type- (Optional, Available in 1.51.0+) Type of the backend server. Valid value ecs, eni. Default to eni.
constructor
new ServerGroup(name: string, args: ServerGroupArgs, opts?: pulumi.CustomResourceOptions)Create a ServerGroup resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerGroupState, opts?: pulumi.CustomResourceOptions): ServerGroupGet an existing ServerGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServerGroupReturns true if the given object is an instance of ServerGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property deleteProtectionValidation
public deleteProtectionValidation: pulumi.Output<boolean | undefined>;Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property loadBalancerId
public loadBalancerId: pulumi.Output<string>;The Load Balancer ID which is used to launch a new virtual server group.
property name
public name: pulumi.Output<string>;Name of the virtual server group. Our plugin provides a default name: “tf-server-group”.
property servers
public servers: pulumi.Output<ServerGroupServer[]>;A list of ECS instances to be added. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getAcls
getAcls(args?: GetAclsArgs, opts?: pulumi.InvokeOptions): Promise<GetAclsResult>This data source provides the acls in the region.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = pulumi.output(alicloud.slb.getAcls({ async: true }));
export const firstSlbAclId = sampleDs.acls[0].id;Entry Block
The entry mapping supports the following:
entry- An IP addresses or CIDR blocks.comment- the comment of the entry.
Listener Block
The Listener mapping supports the following:
loadBalancerId- the id of load balancer instance, the listener belongs to.frontendPort- the listener port.protocol- the listener protocol (such as tcp/udp/http/https, etc).aclType- the type of acl (such as white/black).
Function getAttachments
getAttachments(args: GetAttachmentsArgs, opts?: pulumi.InvokeOptions): Promise<GetAttachmentsResult>This data source provides the server load balancer attachments of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getAttachments({
loadBalancerId: id,
}, { async: true }));
export const firstSlbAttachmentInstanceId = sampleDs.slbAttachments[0].instanceId;Function getBackendServers
getBackendServers(args: GetBackendServersArgs, opts?: pulumi.InvokeOptions): Promise<GetBackendServersResult>This data source provides the server load balancer backend servers related to a server load balancer..
NOTE: Available in 1.53.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.SlbBeckendServers({
loadBalancerId: id,
}, { async: true }));
export const firstSlbBackendServerId = sampleDs.backendServers.0.id;Function getCaCertificates
getCaCertificates(args?: GetCaCertificatesArgs, opts?: pulumi.InvokeOptions): Promise<GetCaCertificatesResult>This data source provides the CA certificate list.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = pulumi.output(alicloud.slb.getCaCertificates({ async: true }));
export const firstSlbCaCertificateId = sampleDs.certificates[0].id;Function getDomainExtensions
getDomainExtensions(args: GetDomainExtensionsArgs, opts?: pulumi.InvokeOptions): Promise<GetDomainExtensionsResult>This data source provides the domain extensions associated with a server load balancer listener.
NOTE: Available in 1.60.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const foo = pulumi.output(alicloud.slb.getDomainExtensions({
frontendPort: Number.parseFloat("fake-port"),
ids: ["fake-de-id"],
loadBalancerId: "fake-lb-id",
}, { async: true }));Function getListeners
getListeners(args: GetListenersArgs, opts?: pulumi.InvokeOptions): Promise<GetListenersResult>This data source provides the listeners related to a server load balancer of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getListeners({
loadBalancerId: id,
}, { async: true }));
export const firstSlbListenerProtocol = sampleDs.slbListeners[0].protocol;Function getLoadBalancers
getLoadBalancers(args?: GetLoadBalancersArgs, opts?: pulumi.InvokeOptions): Promise<GetLoadBalancersResult>This data source provides the server load balancers of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const slbsDs = pulumi.output(alicloud.slb.getLoadBalancers({
nameRegex: "sampleSlb",
}, { async: true }));
export const firstSlbId = slbsDs.slbs[0].id;Function getMasterSlaveServerGroups
getMasterSlaveServerGroups(args: GetMasterSlaveServerGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetMasterSlaveServerGroupsResult>This data source provides the master slave server groups related to a server load balancer.
NOTE: Available in 1.54.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getMasterSlaveServerGroups({
loadBalancerId: id,
}, { async: true }));
export const firstSlbServerGroupId = sampleDs.groups[0].id;Function getRules
getRules(args: GetRulesArgs, opts?: pulumi.InvokeOptions): Promise<GetRulesResult>This data source provides the rules associated with a server load balancer listener.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getRules({
frontendPort: 80,
loadBalancerId: id,
}, { async: true }));
export const firstSlbRuleId = sampleDs.slbRules[0].id;Function getServerCertificates
getServerCertificates(args?: GetServerCertificatesArgs, opts?: pulumi.InvokeOptions): Promise<GetServerCertificatesResult>This data source provides the server certificate list.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = pulumi.output(alicloud.slb.getServerCertificates({ async: true }));
export const firstSlbServerCertificateId = sampleDs.certificates[0].id;Function getServerGroups
getServerGroups(args: GetServerGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetServerGroupsResult>This data source provides the VServer groups related to a server load balancer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getServerGroups({
loadBalancerId: id,
}, { async: true }));
export const firstSlbServerGroupId = sampleDs.slbServerGroups[0].id;Function getZones
getZones(args?: GetZonesArgs, opts?: pulumi.InvokeOptions): Promise<GetZonesResult>This data source provides availability zones for SLB that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const zonesIds = pulumi.output(alicloud.slb.getZones({ async: true }));Others
interface AclArgs
interface AclArgsThe set of arguments for constructing a Acl resource.
property entryLists
entryLists?: pulumi.Input<pulumi.Input<AclEntryList>[]>;A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.
property ipVersion
ipVersion?: pulumi.Input<string>;The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: “ipv4”.
property name
name?: pulumi.Input<string>;Name of the access control list.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;Resource group ID.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface AclState
interface AclStateInput properties used for looking up and filtering Acl resources.
property entryLists
entryLists?: pulumi.Input<pulumi.Input<AclEntryList>[]>;A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.
property ipVersion
ipVersion?: pulumi.Input<string>;The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: “ipv4”.
property name
name?: pulumi.Input<string>;Name of the access control list.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;Resource group ID.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface AttachmentArgs
interface AttachmentArgsThe set of arguments for constructing a Attachment resource.
property backendServers
backendServers?: pulumi.Input<string>;The backend servers of the load balancer.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property instanceIds
instanceIds: pulumi.Input<pulumi.Input<string>[]>;A list of instance ids to added backend server in the SLB.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;ID of the load balancer.
property serverType
serverType?: pulumi.Input<string>;Type of the instances. Valid value ecs, eni. Default to ecs.
property weight
weight?: pulumi.Input<number>;Weight of the instances. Valid value range: [0-100]. Default to 100.
interface AttachmentState
interface AttachmentStateInput properties used for looking up and filtering Attachment resources.
property backendServers
backendServers?: pulumi.Input<string>;The backend servers of the load balancer.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property instanceIds
instanceIds?: pulumi.Input<pulumi.Input<string>[]>;A list of instance ids to added backend server in the SLB.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;ID of the load balancer.
property serverType
serverType?: pulumi.Input<string>;Type of the instances. Valid value ecs, eni. Default to ecs.
property weight
weight?: pulumi.Input<number>;Weight of the instances. Valid value range: [0-100]. Default to 100.
interface BackendServerArgs
interface BackendServerArgsThe set of arguments for constructing a BackendServer resource.
property backendServers
backendServers?: pulumi.Input<pulumi.Input<BackendServerBackendServer>[]>;A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;ID of the load balancer.
interface BackendServerState
interface BackendServerStateInput properties used for looking up and filtering BackendServer resources.
property backendServers
backendServers?: pulumi.Input<pulumi.Input<BackendServerBackendServer>[]>;A list of instances to added backend server in the SLB. It contains three sub-fields as Block server follows.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;ID of the load balancer.
interface CaCertificateArgs
interface CaCertificateArgsThe set of arguments for constructing a CaCertificate resource.
property caCertificate
caCertificate: pulumi.Input<string>;the content of the CA certificate.
property name
name?: pulumi.Input<string>;Name of the CA Certificate.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the slbCa certificate belongs.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface CaCertificateState
interface CaCertificateStateInput properties used for looking up and filtering CaCertificate resources.
property caCertificate
caCertificate?: pulumi.Input<string>;the content of the CA certificate.
property name
name?: pulumi.Input<string>;Name of the CA Certificate.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the slbCa certificate belongs.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface DomainExtensionArgs
interface DomainExtensionArgsThe set of arguments for constructing a DomainExtension resource.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property domain
domain: pulumi.Input<string>;The domain name,
property frontendPort
frontendPort: pulumi.Input<number>;The frontend port used by the HTTPS listener of the SLB instance. Valid values: 1–65535.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;The ID of the SLB instance.
property serverCertificateId
serverCertificateId: pulumi.Input<string>;The ID of the certificate used by the domain name.
interface DomainExtensionState
interface DomainExtensionStateInput properties used for looking up and filtering DomainExtension resources.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property domain
domain?: pulumi.Input<string>;The domain name,
property frontendPort
frontendPort?: pulumi.Input<number>;The frontend port used by the HTTPS listener of the SLB instance. Valid values: 1–65535.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;The ID of the SLB instance.
property serverCertificateId
serverCertificateId?: pulumi.Input<string>;The ID of the certificate used by the domain name.
interface GetAclsArgs
interface GetAclsArgsA collection of arguments for invoking getAcls.
property ids
ids?: string[];A list of acls IDs to filter results.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by acl name.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The Id of resource group which acl belongs.
property tags
tags?: undefined | {[key: string]: any};A mapping of tags to assign to the resource.
interface GetAclsResult
interface GetAclsResultA collection of values returned by getAcls.
property acls
acls: GetAclsAcl[];A list of SLB acls. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB acls IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB acls names.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;Resource group ID.
property tags
tags?: undefined | {[key: string]: any};A mapping of tags to assign to the resource.
interface GetAttachmentsArgs
interface GetAttachmentsArgsA collection of arguments for invoking getAttachments.
property instanceIds
instanceIds?: string[];List of attached ECS instance IDs.
property loadBalancerId
loadBalancerId: string;ID of the SLB with attachments.
property outputFile
outputFile?: undefined | string;interface GetAttachmentsResult
interface GetAttachmentsResultA collection of values returned by getAttachments.
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceIds
instanceIds?: string[];property loadBalancerId
loadBalancerId: string;property outputFile
outputFile?: undefined | string;property slbAttachments
slbAttachments: GetAttachmentsSlbAttachment[];A list of SLB attachments. Each element contains the following attributes:
interface GetBackendServersArgs
interface GetBackendServersArgsA collection of arguments for invoking getBackendServers.
property ids
ids?: string[];List of attached ECS instance IDs.
property loadBalancerId
loadBalancerId: string;ID of the SLB with attachments.
property outputFile
outputFile?: undefined | string;interface GetBackendServersResult
interface GetBackendServersResultA collection of values returned by getBackendServers.
property backendServers
backendServers: GetBackendServersBackendServer[];property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];property loadBalancerId
loadBalancerId: string;property outputFile
outputFile?: undefined | string;interface GetCaCertificatesArgs
interface GetCaCertificatesArgsA collection of arguments for invoking getCaCertificates.
property ids
ids?: string[];A list of ca certificates IDs to filter results.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by ca certificate name.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The Id of resource group which ca certificates belongs.
property tags
tags?: undefined | {[key: string]: any};A mapping of tags to assign to the resource.
interface GetCaCertificatesResult
interface GetCaCertificatesResultA collection of values returned by getCaCertificates.
property certificates
certificates: GetCaCertificatesCertificate[];A list of SLB ca certificates. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB ca certificates IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB ca certificates names.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The resource group Id of CA certificate.
property tags
tags?: undefined | {[key: string]: any};(Available in v1.66.0+) A mapping of tags to assign to the resource.
interface GetDomainExtensionsArgs
interface GetDomainExtensionsArgsA collection of arguments for invoking getDomainExtensions.
property frontendPort
frontendPort: number;The frontend port used by the HTTPS listener of the SLB instance. Valid values: 1–65535.
property ids
ids?: string[];IDs of the SLB domain extensions.
property loadBalancerId
loadBalancerId: string;The ID of the SLB instance.
property outputFile
outputFile?: undefined | string;interface GetDomainExtensionsResult
interface GetDomainExtensionsResultA collection of values returned by getDomainExtensions.
property extensions
extensions: GetDomainExtensionsExtension[];A list of SLB domain extension. Each element contains the following attributes:
property frontendPort
frontendPort: number;property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];property loadBalancerId
loadBalancerId: string;property outputFile
outputFile?: undefined | string;interface GetListenersArgs
interface GetListenersArgsA collection of arguments for invoking getListeners.
property descriptionRegex
descriptionRegex?: undefined | string;A regex string to filter results by SLB listener description.
property frontendPort
frontendPort?: undefined | number;Filter listeners by the specified frontend port.
property loadBalancerId
loadBalancerId: string;ID of the SLB with listeners.
property outputFile
outputFile?: undefined | string;property protocol
protocol?: undefined | string;Filter listeners by the specified protocol. Valid values: http, https, tcp and udp.
interface GetListenersResult
interface GetListenersResultA collection of values returned by getListeners.
property descriptionRegex
descriptionRegex?: undefined | string;property frontendPort
frontendPort?: undefined | number;Frontend port used to receive incoming traffic and distribute it to the backend servers.
property id
id: string;The provider-assigned unique ID for this managed resource.
property loadBalancerId
loadBalancerId: string;property outputFile
outputFile?: undefined | string;property protocol
protocol?: undefined | string;Listener protocol. Possible values: http, https, tcp and udp.
property slbListeners
slbListeners: GetListenersSlbListener[];A list of SLB listeners. Each element contains the following attributes:
interface GetLoadBalancersArgs
interface GetLoadBalancersArgsA collection of arguments for invoking getLoadBalancers.
property address
address?: undefined | string;Service address of the SLBs.
property ids
ids?: string[];A list of SLBs IDs.
property masterAvailabilityZone
masterAvailabilityZone?: undefined | string;Master availability zone of the SLBs.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by SLB name.
property networkType
networkType?: undefined | string;Network type of the SLBs. Valid values: vpc and classic.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The Id of resource group which SLB belongs.
property slaveAvailabilityZone
slaveAvailabilityZone?: undefined | string;Slave availability zone of the SLBs.
property tags
tags?: undefined | {[key: string]: any};A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:
data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
property vpcId
vpcId?: undefined | string;ID of the VPC linked to the SLBs.
property vswitchId
vswitchId?: undefined | string;ID of the VSwitch linked to the SLBs.
interface GetLoadBalancersResult
interface GetLoadBalancersResultA collection of values returned by getLoadBalancers.
property address
address?: undefined | string;Service address of the SLB.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of slb IDs.
property masterAvailabilityZone
masterAvailabilityZone?: undefined | string;Master availability zone of the SLBs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of slb names.
property networkType
networkType?: undefined | string;Network type of the SLB. Possible values: vpc and classic.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;property slaveAvailabilityZone
slaveAvailabilityZone?: undefined | string;Slave availability zone of the SLBs.
property slbs
slbs: GetLoadBalancersSlb[];A list of SLBs. Each element contains the following attributes:
property tags
tags?: undefined | {[key: string]: any};A map of tags assigned to the SLB instance.
property vpcId
vpcId?: undefined | string;ID of the VPC the SLB belongs to.
property vswitchId
vswitchId?: undefined | string;ID of the VSwitch the SLB belongs to.
interface GetMasterSlaveServerGroupsArgs
interface GetMasterSlaveServerGroupsArgsA collection of arguments for invoking getMasterSlaveServerGroups.
property ids
ids?: string[];A list of master slave server group IDs to filter results.
property loadBalancerId
loadBalancerId: string;ID of the SLB.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by master slave server group name.
property outputFile
outputFile?: undefined | string;interface GetMasterSlaveServerGroupsResult
interface GetMasterSlaveServerGroupsResultA collection of values returned by getMasterSlaveServerGroups.
property groups
groups: GetMasterSlaveServerGroupsGroup[];A list of SLB master slave server groups. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB master slave server groups IDs.
property loadBalancerId
loadBalancerId: string;property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB master slave server groups names.
property outputFile
outputFile?: undefined | string;interface GetRulesArgs
interface GetRulesArgsA collection of arguments for invoking getRules.
property frontendPort
frontendPort: number;SLB listener port.
property ids
ids?: string[];A list of rules IDs to filter results.
property loadBalancerId
loadBalancerId: string;ID of the SLB with listener rules.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by rule name.
property outputFile
outputFile?: undefined | string;interface GetRulesResult
interface GetRulesResultA collection of values returned by getRules.
property frontendPort
frontendPort: number;property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB listener rules IDs.
property loadBalancerId
loadBalancerId: string;property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB listener rules names.
property outputFile
outputFile?: undefined | string;property slbRules
slbRules: GetRulesSlbRule[];A list of SLB listener rules. Each element contains the following attributes:
interface GetServerCertificatesArgs
interface GetServerCertificatesArgsA collection of arguments for invoking getServerCertificates.
property ids
ids?: string[];A list of server certificates IDs to filter results.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by server certificate name.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The Id of resource group which the slb server certificates belongs.
property tags
tags?: undefined | {[key: string]: any};A mapping of tags to assign to the resource.
interface GetServerCertificatesResult
interface GetServerCertificatesResultA collection of values returned by getServerCertificates.
property certificates
certificates: GetServerCertificatesCertificate[];A list of SLB server certificates. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB server certificates IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB server certificates names.
property outputFile
outputFile?: undefined | string;property resourceGroupId
resourceGroupId?: undefined | string;The Id of resource group which the slb server certificates belongs.
property tags
tags?: undefined | {[key: string]: any};(Available in v1.66.0+) A mapping of tags to assign to the resource.
interface GetServerGroupsArgs
interface GetServerGroupsArgsA collection of arguments for invoking getServerGroups.
property ids
ids?: string[];A list of VServer group IDs to filter results.
property loadBalancerId
loadBalancerId: string;ID of the SLB.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by VServer group name.
property outputFile
outputFile?: undefined | string;interface GetServerGroupsResult
interface GetServerGroupsResultA collection of values returned by getServerGroups.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of SLB VServer groups IDs.
property loadBalancerId
loadBalancerId: string;property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of SLB VServer groups names.
property outputFile
outputFile?: undefined | string;property slbServerGroups
slbServerGroups: GetServerGroupsSlbServerGroup[];A list of SLB VServer groups. Each element contains the following attributes:
interface GetZonesArgs
interface GetZonesArgsA collection of arguments for invoking getZones.
property availableSlbAddressIpVersion
availableSlbAddressIpVersion?: undefined | string;Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
property availableSlbAddressType
availableSlbAddressType?: undefined | string;Filter the results by a slb instance address type. Can be either Vpc, classicInternet or classicIntranet
property enableDetails
enableDetails?: undefined | false | true;Default to false and only output id in the zones block. Set it to true can output more details.
property outputFile
outputFile?: undefined | string;interface GetZonesResult
interface GetZonesResultA collection of values returned by getZones.
property availableSlbAddressIpVersion
availableSlbAddressIpVersion?: undefined | string;property availableSlbAddressType
availableSlbAddressType?: undefined | string;property enableDetails
enableDetails?: undefined | false | true;property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of zone IDs.
property outputFile
outputFile?: undefined | string;property zones
zones: GetZonesZone[];A list of availability zones. Each element contains the following attributes:
interface ListenerArgs
interface ListenerArgsThe set of arguments for constructing a Listener resource.
property aclId
aclId?: pulumi.Input<string>;the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored.
property aclStatus
aclStatus?: pulumi.Input<string>;Whether to enable “acl(access control list)”, the acl is specified by aclId. Valid values are on and off. Default to off.
property aclType
aclType?: pulumi.Input<string>;Mode for handling the acl specified by acl_id. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.
property backendPort
backendPort?: pulumi.Input<number>;Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].
property bandwidth
bandwidth?: pulumi.Input<number>;Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.
property cookie
cookie?: pulumi.Input<string>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
cookieTimeout?: pulumi.Input<number>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property description
description?: pulumi.Input<string>;The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.
property enableHttp2
enableHttp2?: pulumi.Input<string>;Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.
property establishedTimeout
establishedTimeout?: pulumi.Input<number>;Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
property forwardPort
forwardPort?: pulumi.Input<number>;The port that http redirect to https.
property frontendPort
frontendPort: pulumi.Input<number>;Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
property gzip
gzip?: pulumi.Input<boolean>;Whether to enable “Gzip Compression”. If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.
property healthCheck
healthCheck?: pulumi.Input<string>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.
property healthCheckConnectPort
healthCheckConnectPort?: pulumi.Input<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
healthCheckDomain?: pulumi.Input<string>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
healthCheckHttpCode?: pulumi.Input<string>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
healthCheckInterval?: pulumi.Input<number>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckMethod
healthCheckMethod?: pulumi.Input<string>;The method of health check. Valid values: [“head”, “get”].
property healthCheckTimeout
healthCheckTimeout?: pulumi.Input<number>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckType
healthCheckType?: pulumi.Input<string>;Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.
property healthCheckUri
healthCheckUri?: pulumi.Input<string>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
healthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property idleTimeout
idleTimeout?: pulumi.Input<number>;Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
property instancePort
instancePort?: pulumi.Input<number>;property lbPort
lbPort?: pulumi.Input<number>;property lbProtocol
lbProtocol?: pulumi.Input<string>;property listenerForward
listenerForward?: pulumi.Input<string>;Whether to enable http redirect to https, Valid values are on and off. Default to off.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;The Load Balancer ID which is used to launch a new listener.
property masterSlaveServerGroupId
masterSlaveServerGroupId?: pulumi.Input<string>;property persistenceTimeout
persistenceTimeout?: pulumi.Input<number>;Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
property protocol
protocol: pulumi.Input<string>;The protocol to listen on. Valid values are [http, https, tcp, udp].
property requestTimeout
requestTimeout?: pulumi.Input<number>;Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.
property scheduler
scheduler?: pulumi.Input<string>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”.
property serverCertificateId
serverCertificateId?: pulumi.Input<string>;SLB Server certificate ID. It is required when protocol is https.
property serverGroupId
serverGroupId?: pulumi.Input<string>;the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.
property sslCertificateId
sslCertificateId?: pulumi.Input<string>;It has been deprecated from 1.59.0 and using serverCertificateId instead.
property stickySession
stickySession?: pulumi.Input<string>;Whether to enable session persistence, Valid values are on and off. Default to off.
property stickySessionType
stickySessionType?: pulumi.Input<string>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property tlsCipherPolicy
tlsCipherPolicy?: pulumi.Input<string>;Https listener TLS cipher policy. Valid values are tlsCipherPolicy10, tlsCipherPolicy11, tlsCipherPolicy12, tlsCipherPolicy12Strict. Default to tlsCipherPolicy10. Currently the tlsCipherPolicy can not be updated when load balancer instance is “Shared-Performance”.
property unhealthyThreshold
unhealthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property xForwardedFor
xForwardedFor?: pulumi.Input<ListenerXForwardedFor>;Whether to set additional HTTP Header field “X-Forwarded-For” (documented below). Available in v1.13.0+.
interface ListenerState
interface ListenerStateInput properties used for looking up and filtering Listener resources.
property aclId
aclId?: pulumi.Input<string>;the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored.
property aclStatus
aclStatus?: pulumi.Input<string>;Whether to enable “acl(access control list)”, the acl is specified by aclId. Valid values are on and off. Default to off.
property aclType
aclType?: pulumi.Input<string>;Mode for handling the acl specified by acl_id. If aclStatus is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.
property backendPort
backendPort?: pulumi.Input<number>;Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].
property bandwidth
bandwidth?: pulumi.Input<number>;Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.
property cookie
cookie?: pulumi.Input<string>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
cookieTimeout?: pulumi.Input<number>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property description
description?: pulumi.Input<string>;The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.
property enableHttp2
enableHttp2?: pulumi.Input<string>;Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.
property establishedTimeout
establishedTimeout?: pulumi.Input<number>;Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
property forwardPort
forwardPort?: pulumi.Input<number>;The port that http redirect to https.
property frontendPort
frontendPort?: pulumi.Input<number>;Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
property gzip
gzip?: pulumi.Input<boolean>;Whether to enable “Gzip Compression”. If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.
property healthCheck
healthCheck?: pulumi.Input<string>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.
property healthCheckConnectPort
healthCheckConnectPort?: pulumi.Input<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
healthCheckDomain?: pulumi.Input<string>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
healthCheckHttpCode?: pulumi.Input<string>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
healthCheckInterval?: pulumi.Input<number>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckMethod
healthCheckMethod?: pulumi.Input<string>;The method of health check. Valid values: [“head”, “get”].
property healthCheckTimeout
healthCheckTimeout?: pulumi.Input<number>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckType
healthCheckType?: pulumi.Input<string>;Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.
property healthCheckUri
healthCheckUri?: pulumi.Input<string>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
healthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property idleTimeout
idleTimeout?: pulumi.Input<number>;Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
property instancePort
instancePort?: pulumi.Input<number>;property lbPort
lbPort?: pulumi.Input<number>;property lbProtocol
lbProtocol?: pulumi.Input<string>;property listenerForward
listenerForward?: pulumi.Input<string>;Whether to enable http redirect to https, Valid values are on and off. Default to off.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;The Load Balancer ID which is used to launch a new listener.
property masterSlaveServerGroupId
masterSlaveServerGroupId?: pulumi.Input<string>;property persistenceTimeout
persistenceTimeout?: pulumi.Input<number>;Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
property protocol
protocol?: pulumi.Input<string>;The protocol to listen on. Valid values are [http, https, tcp, udp].
property requestTimeout
requestTimeout?: pulumi.Input<number>;Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.
property scheduler
scheduler?: pulumi.Input<string>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”.
property serverCertificateId
serverCertificateId?: pulumi.Input<string>;SLB Server certificate ID. It is required when protocol is https.
property serverGroupId
serverGroupId?: pulumi.Input<string>;the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.
property sslCertificateId
sslCertificateId?: pulumi.Input<string>;It has been deprecated from 1.59.0 and using serverCertificateId instead.
property stickySession
stickySession?: pulumi.Input<string>;Whether to enable session persistence, Valid values are on and off. Default to off.
property stickySessionType
stickySessionType?: pulumi.Input<string>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property tlsCipherPolicy
tlsCipherPolicy?: pulumi.Input<string>;Https listener TLS cipher policy. Valid values are tlsCipherPolicy10, tlsCipherPolicy11, tlsCipherPolicy12, tlsCipherPolicy12Strict. Default to tlsCipherPolicy10. Currently the tlsCipherPolicy can not be updated when load balancer instance is “Shared-Performance”.
property unhealthyThreshold
unhealthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property xForwardedFor
xForwardedFor?: pulumi.Input<ListenerXForwardedFor>;Whether to set additional HTTP Header field “X-Forwarded-For” (documented below). Available in v1.13.0+.
interface LoadBalancerArgs
interface LoadBalancerArgsThe set of arguments for constructing a LoadBalancer resource.
property address
address?: pulumi.Input<string>;Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
property addressIpVersion
addressIpVersion?: pulumi.Input<string>;The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
property addressType
addressType?: pulumi.Input<string>;The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
property bandwidth
bandwidth?: pulumi.Input<number>;Valid value is between 1 and 1000, If argument “internetChargeType” is “paybytraffic”, then this value will be ignore.
property deleteProtection
deleteProtection?: pulumi.Input<string>;Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
property instanceChargeType
instanceChargeType?: pulumi.Input<string>;The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
property internet
internet?: pulumi.Input<boolean>;Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
property internetChargeType
internetChargeType?: pulumi.Input<string>;Valid
values are PayByBandwidth, PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”.
Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.
property masterZoneId
masterZoneId?: pulumi.Input<string>;The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property name
name?: pulumi.Input<string>;property period
period?: pulumi.Input<number>;The duration that you will buy the resource, in month. It is valid when instanceChargeType is PrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the SLB belongs.
property slaveZoneId
slaveZoneId?: pulumi.Input<string>;The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property specification
specification?: pulumi.Input<string>;The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource. The tags can have a maximum of 10 tag for every load balancer instance.
property vswitchId
vswitchId?: pulumi.Input<string>;The VSwitch ID to launch in. If addressType is internet, it will be ignore.
interface LoadBalancerState
interface LoadBalancerStateInput properties used for looking up and filtering LoadBalancer resources.
property address
address?: pulumi.Input<string>;Specify the IP address of the private network for the SLB instance, which must be in the destination CIDR block of the correspond ing switch.
property addressIpVersion
addressIpVersion?: pulumi.Input<string>;The IP version of the SLB instance to be created, which can be set to ipv4 or ipv6 . Default to “ipv4”. Now, only internet instance support ipv6 address.
property addressType
addressType?: pulumi.Input<string>;The network type of the SLB instance. Valid values: [“internet”, “intranet”]. If load balancer launched in VPC, this value must be “intranet”. - internet: After an Internet SLB instance is created, the system allocates a public IP address so that the instance can forward requests from the Internet. - intranet: After an intranet SLB instance is created, the system allocates an intranet IP address so that the instance can only forward intranet requests.
property bandwidth
bandwidth?: pulumi.Input<number>;Valid value is between 1 and 1000, If argument “internetChargeType” is “paybytraffic”, then this value will be ignore.
property deleteProtection
deleteProtection?: pulumi.Input<string>;Whether enable the deletion protection or not. on: Enable deletion protection. off: Disable deletion protection. Default to off. Only postpaid instance support this function.
property instanceChargeType
instanceChargeType?: pulumi.Input<string>;The billing method of the load balancer. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
property internet
internet?: pulumi.Input<boolean>;Field ‘internet’ has been deprecated from provider version 1.55.3. Use ‘address_type’ replaces it.
property internetChargeType
internetChargeType?: pulumi.Input<string>;Valid
values are PayByBandwidth, PayByTraffic. If this value is “PayByBandwidth”, then argument “internet” must be “true”. Default is “PayByTraffic”. If load balancer launched in VPC, this value must be “PayByTraffic”.
Before version 1.10.1, the valid values are “paybybandwidth” and “paybytraffic”.
property masterZoneId
masterZoneId?: pulumi.Input<string>;The primary zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property name
name?: pulumi.Input<string>;property period
period?: pulumi.Input<number>;The duration that you will buy the resource, in month. It is valid when instanceChargeType is PrePaid. Default to 1. Valid values: [1-9, 12, 24, 36].
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the SLB belongs.
property slaveZoneId
slaveZoneId?: pulumi.Input<string>;The standby zone ID of the SLB instance. If not specified, the system will be randomly assigned. You can query the primary and standby zones in a region by calling the DescribeZone API.
property specification
specification?: pulumi.Input<string>;The specification of the Server Load Balancer instance. Default to empty string indicating it is “Shared-Performance” instance. Launching “Performance-guaranteed” instance, it is must be specified and it valid values are: “slb.s1.small”, “slb.s2.small”, “slb.s2.medium”, “slb.s3.small”, “slb.s3.medium”, “slb.s3.large” and “slb.s4.large”.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource. The tags can have a maximum of 10 tag for every load balancer instance.
property vswitchId
vswitchId?: pulumi.Input<string>;The VSwitch ID to launch in. If addressType is internet, it will be ignore.
interface MasterSlaveServerGroupArgs
interface MasterSlaveServerGroupArgsThe set of arguments for constructing a MasterSlaveServerGroup resource.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;The Load Balancer ID which is used to launch a new master slave server group.
property name
name?: pulumi.Input<string>;Name of the master slave server group.
property servers
servers?: pulumi.Input<pulumi.Input<MasterSlaveServerGroupServer>[]>;A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.
interface MasterSlaveServerGroupState
interface MasterSlaveServerGroupStateInput properties used for looking up and filtering MasterSlaveServerGroup resources.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;The Load Balancer ID which is used to launch a new master slave server group.
property name
name?: pulumi.Input<string>;Name of the master slave server group.
property servers
servers?: pulumi.Input<pulumi.Input<MasterSlaveServerGroupServer>[]>;A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.
interface RuleArgs
interface RuleArgsThe set of arguments for constructing a Rule resource.
property cookie
cookie?: pulumi.Input<string>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
cookieTimeout?: pulumi.Input<number>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property domain
domain?: pulumi.Input<string>;Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported: - Standard domain name: www.test.com - Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
property frontendPort
frontendPort: pulumi.Input<number>;The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].
property healthCheck
healthCheck?: pulumi.Input<string>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.
property healthCheckConnectPort
healthCheckConnectPort?: pulumi.Input<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
healthCheckDomain?: pulumi.Input<string>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
healthCheckHttpCode?: pulumi.Input<string>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
healthCheckInterval?: pulumi.Input<number>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckTimeout
healthCheckTimeout?: pulumi.Input<number>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckUri
healthCheckUri?: pulumi.Input<string>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
healthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property listenerSync
listenerSync?: pulumi.Input<string>;Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;The Load Balancer ID which is used to launch the new forwarding rule.
property name
name?: pulumi.Input<string>;Name of the forwarding rule. Our plugin provides a default name: “tf-slb-rule”.
property scheduler
scheduler?: pulumi.Input<string>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”. This parameter is required and takes effect only when ListenerSync is set to off.
property serverGroupId
serverGroupId: pulumi.Input<string>;ID of a virtual server group that will be forwarded.
property stickySession
stickySession?: pulumi.Input<string>;Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.
property stickySessionType
stickySessionType?: pulumi.Input<string>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property unhealthyThreshold
unhealthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property url
url?: pulumi.Input<string>;Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters ‘-’ ‘/’ ‘?’ ‘%’ ‘#’ and ‘&’ are allowed. URLs must be started with the character ‘/’, but cannot be ‘/’ alone.
interface RuleState
interface RuleStateInput properties used for looking up and filtering Rule resources.
property cookie
cookie?: pulumi.Input<string>;The cookie configured on the server. It is mandatory when stickySession is “on” and stickySessionType is “server”. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
property cookieTimeout
cookieTimeout?: pulumi.Input<number>;Cookie timeout. It is mandatory when stickySession is “on” and stickySessionType is “insert”. Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property domain
domain?: pulumi.Input<string>;Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported: - Standard domain name: www.test.com - Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
property frontendPort
frontendPort?: pulumi.Input<number>;The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].
property healthCheck
healthCheck?: pulumi.Input<string>;Whether to enable health check. Valid values areon and off. TCP and UDP listener’s HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.
property healthCheckConnectPort
healthCheckConnectPort?: pulumi.Input<number>;Port used for health check. Valid value range: [1-65535]. Default to “None” means the backend server port is used.
property healthCheckDomain
healthCheckDomain?: pulumi.Input<string>;Domain name used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
property healthCheckHttpCode
healthCheckHttpCode?: pulumi.Input<string>;Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when healthCheck is on. Default to http2xx. Valid values are: http2xx, http3xx, http4xx and http5xx.
property healthCheckInterval
healthCheckInterval?: pulumi.Input<number>;Time interval of health checks. It is required when healthCheck is on. Valid value range: [1-50] in seconds. Default to 2.
property healthCheckTimeout
healthCheckTimeout?: pulumi.Input<number>;Maximum timeout of each health check response. It is required when healthCheck is on. Valid value range: [1-300] in seconds. Default to 5. Note: If healthCheckTimeout < healthCheckInterval, its will be replaced by healthCheckInterval.
property healthCheckUri
healthCheckUri?: pulumi.Input<string>;URI used for health check. When it used to launch TCP listener, healthCheckType must be “http”. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
property healthyThreshold
healthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is success. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property listenerSync
listenerSync?: pulumi.Input<string>;Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;The Load Balancer ID which is used to launch the new forwarding rule.
property name
name?: pulumi.Input<string>;Name of the forwarding rule. Our plugin provides a default name: “tf-slb-rule”.
property scheduler
scheduler?: pulumi.Input<string>;Scheduling algorithm, Valid values are wrr, rr and wlc. Default to “wrr”. This parameter is required and takes effect only when ListenerSync is set to off.
property serverGroupId
serverGroupId?: pulumi.Input<string>;ID of a virtual server group that will be forwarded.
property stickySession
stickySession?: pulumi.Input<string>;Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.
property stickySessionType
stickySessionType?: pulumi.Input<string>;Mode for handling the cookie. If stickySession is “on”, it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
property unhealthyThreshold
unhealthyThreshold?: pulumi.Input<number>;Threshold determining the result of the health check is fail. It is required when healthCheck is on. Valid value range: [1-10] in seconds. Default to 3.
property url
url?: pulumi.Input<string>;Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters ‘-’ ‘/’ ‘?’ ‘%’ ‘#’ and ‘&’ are allowed. URLs must be started with the character ‘/’, but cannot be ‘/’ alone.
interface ServerCertificateArgs
interface ServerCertificateArgsThe set of arguments for constructing a ServerCertificate resource.
property alicloudCertifacteId
alicloudCertifacteId?: pulumi.Input<string>;property alicloudCertifacteName
alicloudCertifacteName?: pulumi.Input<string>;property alicloudCertificateId
alicloudCertificateId?: pulumi.Input<string>;an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateName
alicloudCertificateName?: pulumi.Input<string>;the name of the certificate specified by alicloudCertificateId.but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateRegionId
alicloudCertificateRegionId?: pulumi.Input<string>;the region of the certificate specified by alicloudCertificateId. but it is not supported on the international site of alibaba cloud now.
property name
name?: pulumi.Input<string>;Name of the Server Certificate.
property privateKey
privateKey?: pulumi.Input<string>;the content of privat key of the ssl certificate specified by serverCertificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the slb server certificate belongs.
property serverCertificate
serverCertificate?: pulumi.Input<string>;the content of the ssl certificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface ServerCertificateState
interface ServerCertificateStateInput properties used for looking up and filtering ServerCertificate resources.
property alicloudCertifacteId
alicloudCertifacteId?: pulumi.Input<string>;property alicloudCertifacteName
alicloudCertifacteName?: pulumi.Input<string>;property alicloudCertificateId
alicloudCertificateId?: pulumi.Input<string>;an id of server certificate ssued/proxied by alibaba cloud. but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateName
alicloudCertificateName?: pulumi.Input<string>;the name of the certificate specified by alicloudCertificateId.but it is not supported on the international site of alibaba cloud now.
property alicloudCertificateRegionId
alicloudCertificateRegionId?: pulumi.Input<string>;the region of the certificate specified by alicloudCertificateId. but it is not supported on the international site of alibaba cloud now.
property name
name?: pulumi.Input<string>;Name of the Server Certificate.
property privateKey
privateKey?: pulumi.Input<string>;the content of privat key of the ssl certificate specified by serverCertificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The Id of resource group which the slb server certificate belongs.
property serverCertificate
serverCertificate?: pulumi.Input<string>;the content of the ssl certificate. where alicloudCertificateId is null, it is required, otherwise it is ignored.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface ServerGroupArgs
interface ServerGroupArgsThe set of arguments for constructing a ServerGroup resource.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId: pulumi.Input<string>;The Load Balancer ID which is used to launch a new virtual server group.
property name
name?: pulumi.Input<string>;Name of the virtual server group. Our plugin provides a default name: “tf-server-group”.
property servers
servers?: pulumi.Input<pulumi.Input<ServerGroupServer>[]>;A list of ECS instances to be added. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows.
interface ServerGroupState
interface ServerGroupStateInput properties used for looking up and filtering ServerGroup resources.
property deleteProtectionValidation
deleteProtectionValidation?: pulumi.Input<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.
property loadBalancerId
loadBalancerId?: pulumi.Input<string>;The Load Balancer ID which is used to launch a new virtual server group.
property name
name?: pulumi.Input<string>;Name of the virtual server group. Our plugin provides a default name: “tf-server-group”.
property servers
servers?: pulumi.Input<pulumi.Input<ServerGroupServer>[]>;A list of ECS instances to be added. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows.