Cria uma instância do Network Load Balancer (NLB).
Syntax
{
"Type": "ALIYUN::NLB::LoadBalancer",
"Properties": {
"LoadBalancerName": String,
"AddressIpVersion": String,
"ResourceGroupId": String,
"VpcId": String,
"LoadBalancerBillingConfig": Map,
"TrafficAffinityEnabled": Boolean,
"BandwidthPackageId": String,
"AddressType": String,
"ZoneMappings": List,
"CrossZoneEnabled": Boolean,
"LoadBalancerType": String,
"DeletionProtectionConfig": Map,
"ModificationProtectionConfig": Map,
"Tags": List
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
LoadBalancerName |
String |
No |
Yes |
O nome da instância NLB. |
None |
|
AddressIpVersion |
String |
No |
No |
A versão do IP. |
Valores válidos:
|
|
ResourceGroupId |
String |
No |
No |
O ID do grupo de recursos. |
None |
|
VpcId |
String |
Yes |
No |
O ID da VPC. |
None |
|
LoadBalancerBillingConfig |
Map |
No |
No |
A configuração de faturamento. |
Para mais informações, consulte LoadBalancerBillingConfig property. |
|
TrafficAffinityEnabled |
Boolean |
No |
Yes |
Indica se a afinidade de tráfego está ativada. |
Valores válidos:
|
|
BandwidthPackageId |
String |
No |
Yes |
O ID do plano de largura de banda EIP para instâncias voltadas para a Internet. |
None |
|
AddressType |
String |
Yes |
Yes |
O tipo de endereço IPv4. |
Valores válidos:
|
|
ZoneMappings |
List |
Yes |
No |
O mapeamento de zonas para vSwitches. |
Para mais informações, consulte ZoneMappings properties. |
|
CrossZoneEnabled |
Boolean |
No |
Yes |
Indica se o balanceamento de carga entre zonas está ativado. |
Valores válidos:
|
|
LoadBalancerType |
String |
No |
No |
O tipo da instância NLB. |
None |
|
DeletionProtectionConfig |
Map |
No |
Yes |
A configuração de proteção contra exclusão. |
Para mais informações, consulte DeletionProtectionConfig properties. |
|
ModificationProtectionConfig |
Map |
No |
Yes |
A configuração de proteção contra modificação. |
Para mais informações, consulte ModificationProtectionConfig properties. |
|
Tags |
List |
No |
Yes |
As tags. |
Para mais informações, consulte Tags properties. |
LoadBalancerBillingConfig syntax
"LoadBalancerBillingConfig": {
"PayType": String
}
LoadBalancerBillingConfig property
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
PayType |
String |
No |
No |
O método de faturamento. |
Valores válidos:
|
ZoneMappings syntax
"ZoneMappings": [
{
"ZoneId": String,
"VSwitchId": String,
"AllocationId": String,
"PrivateIPv4Address": String,
"LoadBalancerAddresses": List
}
]
ZoneMappings properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
ZoneId |
String |
Yes |
No |
O ID da zona de disponibilidade. |
Chame a operação DescribeZones para consultar as zonas disponíveis da instância NLB. |
|
VSwitchId |
String |
Yes |
No |
O vSwitch da zona. |
Apenas um vSwitch por zona. |
|
AllocationId |
String |
No |
No |
O ID do EIP. |
None |
|
PrivateIPv4Address |
String |
No |
No |
O endereço IPv4. |
None |
|
LoadBalancerAddresses |
List |
No |
No |
Os endpoints da instância NLB. |
Esta propriedade tem precedência sobre AllocationId e EipType na seção "ZoneMappings". Para mais informações, consulte LoadBalancerAddresses properties. |
|
EipType |
String |
No |
No |
O tipo de EIP. |
Valores válidos:
Nota
Para informações sobre as regiões em que é possível associar Anycast EIPs a instâncias NLB, consulte Associate an Anycast EIP for nearby access across multiple regions. |
LoadBalancerAddresses syntax
"LoadBalancerAddresses": {
"AllocationId": String,
"PrivateIPv4Address": String
}
LoadBalancerAddresses properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
AllocationId |
String |
Yes |
No |
O ID do EIP. |
None |
|
PrivateIPv4Address |
String |
No |
No |
O endereço IPv4. |
None |
DeletionProtectionConfig syntax
"DeletionProtectionConfig": {
"Enabled": String,
"Reason": String
}
DeletionProtectionConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Enabled |
String |
Yes |
Yes |
Indica se a proteção contra exclusão está ativada. |
Valores válidos:
|
|
Reason |
String |
No |
Yes |
O motivo para ativar ou desativar a proteção contra exclusão. |
De 2 a 128 caracteres. Aceita letras, dígitos, pontos (.), underscores (_) e hífens (-). Deve começar com uma letra. |
ModificationProtectionConfig syntax
"ModificationProtectionConfig": {
"Reason": String,
"Status": String
}
ModificationProtectionConfig properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Reason |
String |
No |
Yes |
O motivo pelo qual a proteção contra exclusão está ativada. |
De 2 a 128 caracteres. Aceita letras, dígitos, pontos (.), underscores (_) e hífens (-). Deve começar com uma letra. Nota
Esta propriedade só tem efeito quando Status está definido como ConsoleProtection. |
|
Status |
String |
Yes |
Yes |
Especifica se a proteção contra exclusão está ativada. |
Valores válidos:
Nota
Quando definido como ConsoleProtection, as configurações da instância não podem ser modificadas pelo console do NLB, mas podem ser alteradas via chamadas de operações de API. |
Tags syntax
"Tags": {
"Key": String,
"Value": String
}
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Key |
String |
Yes |
No |
A chave da tag. |
Até 128 caracteres. Não pode conter Máximo de 20 tags por chamada. |
|
Value |
String |
No |
No |
O valor da tag. |
Até 128 caracteres. Não pode começar com Máximo de 20 tags por chamada. |
Valores de retorno
Fn::GetAtt
AddressIpVersion: a versão de IP da instância NLB.
VpcId: o ID da VPC.
LoadBalancerId: o ID da instância NLB.
AddressType: o tipo de endereço IPv4.
DNSName: o nome de domínio DNS da instância NLB.
ZoneMappings: o mapeamento de zonas para vSwitches.
LoadBalancerType: o tipo da instância NLB.
Arn: o Alibaba Cloud Resource Name (ARN).
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
VpcId:
Type: String
Description: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
AddressType:
Type: String
Description: |-
The type of IP address that the NLB instance uses to provide services. Valid values:
Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
AllowedValues:
- Internet
- Intranet
ZoneMappings:
Type: Json
Description: The zones and the vSwitches in the zones. You must specify at least two zones.
MinLength: 2
MaxLength: 3
Resources:
LoadBalancer:
Type: ALIYUN::NLB::LoadBalancer
Properties:
VpcId:
Ref: VpcId
AddressType:
Ref: AddressType
ZoneMappings:
Ref: ZoneMappings
Outputs:
AddressIpVersion:
Description: The version of IP address that the NLB instance uses to provide services.
Value:
Fn::GetAtt:
- LoadBalancer
- AddressIpVersion
VpcId:
Description: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
Value:
Fn::GetAtt:
- LoadBalancer
- VpcId
LoadBalancerId:
Description: The ID of the NLB instance.
Value:
Fn::GetAtt:
- LoadBalancer
- LoadBalancerId
AddressType:
Description: The type of IP address that the NLB instance uses to provide services.
Value:
Fn::GetAtt:
- LoadBalancer
- AddressType
DNSName:
Description: The domain name of the NLB instance.
Value:
Fn::GetAtt:
- LoadBalancer
- DNSName
ZoneMappings:
Description: The zones, vSwitches and addresses which are mapped to the zones.
Value:
Fn::GetAtt:
- LoadBalancer
- ZoneMappings
LoadBalancerType:
Description: The type of the NLB instance.
Value:
Fn::GetAtt:
- LoadBalancer
- LoadBalancerType
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcId": {
"Type": "String",
"Description": "The ID of the virtual private cloud (VPC) where the NLB instance is deployed."
},
"AddressType": {
"Type": "String",
"Description": "The type of IP address that the NLB instance uses to provide services. Valid values:\nInternet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.\nIntranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.",
"AllowedValues": [
"Internet",
"Intranet"
]
},
"ZoneMappings": {
"Type": "Json",
"Description": "The zones and the vSwitches in the zones. You must specify at least two zones.",
"MinLength": 2,
"MaxLength": 3
}
},
"Resources": {
"LoadBalancer": {
"Type": "ALIYUN::NLB::LoadBalancer",
"Properties": {
"VpcId": {
"Ref": "VpcId"
},
"AddressType": {
"Ref": "AddressType"
},
"ZoneMappings": {
"Ref": "ZoneMappings"
}
}
}
},
"Outputs": {
"AddressIpVersion": {
"Description": "The version of IP address that the NLB instance uses to provide services.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"AddressIpVersion"
]
}
},
"VpcId": {
"Description": "The ID of the virtual private cloud (VPC) where the NLB instance is deployed.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"VpcId"
]
}
},
"LoadBalancerId": {
"Description": "The ID of the NLB instance.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"LoadBalancerId"
]
}
},
"AddressType": {
"Description": "The type of IP address that the NLB instance uses to provide services.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"AddressType"
]
}
},
"DNSName": {
"Description": "The domain name of the NLB instance.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"DNSName"
]
}
},
"ZoneMappings": {
"Description": "The zones, vSwitches and addresses which are mapped to the zones.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"ZoneMappings"
]
}
},
"LoadBalancerType": {
"Description": "The type of the NLB instance.",
"Value": {
"Fn::GetAtt": [
"LoadBalancer",
"LoadBalancerType"
]
}
}
}
}