Crée une instance Network Load Balancer (NLB).
Syntaxe
{
"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
}
}
Propriétés
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
LoadBalancerName |
String |
Non |
Oui |
Nom de l'instance NLB. |
Aucune |
|
AddressIpVersion |
String |
Non |
Non |
Version IP. |
Valeurs valides :
|
|
ResourceGroupId |
String |
Non |
Non |
ID du groupe de ressources. |
Aucune |
|
VpcId |
String |
Oui |
Non |
ID du VPC. |
Aucune |
|
LoadBalancerBillingConfig |
Map |
Non |
Non |
Configuration de facturation. |
Pour plus d'informations, consultez la section Propriété LoadBalancerBillingConfig. |
|
TrafficAffinityEnabled |
Boolean |
Non |
Oui |
Active ou désactive l'affinité du trafic. |
Valeurs valides :
|
|
BandwidthPackageId |
String |
Non |
Oui |
ID du plan de bande passante EIP pour les instances accessibles depuis Internet. |
Aucune |
|
AddressType |
String |
Oui |
Oui |
Type d'adresse IPv4. |
Valeurs valides :
|
|
ZoneMappings |
List |
Oui |
Non |
Mappages entre les zones et les vSwitch. |
Pour plus d'informations, consultez la section Propriétés ZoneMappings. |
|
CrossZoneEnabled |
Boolean |
Non |
Oui |
Active ou désactive l'équilibrage de charge interzones. |
Valeurs valides :
|
|
LoadBalancerType |
String |
Non |
Non |
Type d'instance NLB. |
Aucune |
|
DeletionProtectionConfig |
Map |
Non |
Oui |
Configuration de protection contre la suppression. |
Pour plus d'informations, consultez la section Propriétés DeletionProtectionConfig. |
|
ModificationProtectionConfig |
Map |
Non |
Oui |
Configuration de protection contre la modification. |
Pour plus d'informations, consultez la section Propriétés ModificationProtectionConfig. |
|
Tags |
List |
Non |
Oui |
Tags. |
Pour plus d'informations, consultez la section Propriétés Tags. |
Syntaxe LoadBalancerBillingConfig
"LoadBalancerBillingConfig": {
"PayType": String
}
Propriété LoadBalancerBillingConfig
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
PayType |
String |
Non |
Non |
Méthode de facturation. |
Valeurs valides :
|
Syntaxe ZoneMappings
"ZoneMappings": [
{
"ZoneId": String,
"VSwitchId": String,
"AllocationId": String,
"PrivateIPv4Address": String,
"LoadBalancerAddresses": List
}
]
Propriétés ZoneMappings
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
ZoneId |
String |
Oui |
Non |
ID de la zone. |
Appelez l'opération DescribeZones pour interroger les zones de l'instance NLB. |
|
VSwitchId |
String |
Oui |
Non |
vSwitch de la zone. |
Un seul vSwitch par zone. |
|
AllocationId |
String |
Non |
Non |
ID de l'EIP. |
Aucune |
|
PrivateIPv4Address |
String |
Non |
Non |
Adresse IPv4. |
Aucune |
|
LoadBalancerAddresses |
List |
Non |
Non |
Endpoints de l'instance NLB. |
Cette propriété est prioritaire sur AllocationId et EipType dans la section « ZoneMappings ». Pour plus d'informations, consultez la section Propriétés LoadBalancerAddresses. |
|
EipType |
String |
Non |
Non |
Type d'EIP. |
Valeurs valides :
Remarque
Pour obtenir des informations sur les régions dans lesquelles vous pouvez associer des EIP Anycast à des instances NLB, consultez la rubrique Associer un EIP Anycast pour un accès de proximité dans plusieurs régions. |
Syntaxe LoadBalancerAddresses
"LoadBalancerAddresses": {
"AllocationId": String,
"PrivateIPv4Address": String
}
Propriétés LoadBalancerAddresses
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
AllocationId |
String |
Oui |
Non |
ID de l'EIP. |
Aucune |
|
PrivateIPv4Address |
String |
Non |
Non |
Adresse IPv4. |
Aucune |
Syntaxe DeletionProtectionConfig
"DeletionProtectionConfig": {
"Enabled": String,
"Reason": String
}
Propriétés DeletionProtectionConfig
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
Enabled |
String |
Oui |
Oui |
Active ou désactive la protection contre la suppression. |
Valeurs valides :
|
|
Reason |
String |
Non |
Oui |
Raison de l'activation ou de la désactivation de la protection contre la suppression. |
2 à 128 caractères. Prend en charge les lettres, les chiffres, les points (.), les traits de soulignement (_) et les tirets (-). Doit commencer par une lettre. |
Syntaxe ModificationProtectionConfig
"ModificationProtectionConfig": {
"Reason": String,
"Status": String
}
Propriétés ModificationProtectionConfig
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
Reason |
String |
Non |
Oui |
Raison de l'activation de la protection contre la suppression. |
2 à 128 caractères. Prend en charge les lettres, les chiffres, les points (.), les traits de soulignement (_) et les tirets (-). Doit commencer par une lettre. Remarque
Cette propriété prend effet uniquement si Status est défini sur ConsoleProtection. |
|
Status |
String |
Oui |
Oui |
Indique si la protection contre la suppression est activée. |
Valeurs valides :
Remarque
Si cette valeur est définie sur ConsoleProtection, les configurations de l'instance ne peuvent pas être modifiées dans la console NLB, mais elles peuvent l'être via des appels d'API. |
Syntaxe Tags
"Tags": {
"Key": String,
"Value": String
}
Propriétés Tags
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
Key |
String |
Oui |
Non |
Clé du tag. |
Jusqu'à 128 caractères. Ne doit pas contenir Maximum de 20 tags par appel. |
|
Value |
String |
Non |
Non |
Valeur du tag. |
Jusqu'à 128 caractères. Ne doit pas commencer par Maximum de 20 tags par appel. |
Valeurs de retour
Fn::GetAtt
AddressIpVersion : version IP de l'instance NLB.
VpcId : ID du VPC.
LoadBalancerId : ID de l'instance NLB.
AddressType : type d'adresse IPv4.
DNSName : nom de domaine de l'instance NLB.
ZoneMappings : mappages entre les zones et les vSwitch.
LoadBalancerType : type d'instance NLB.
Arn : nom de ressource Alibaba Cloud (ARN).
Exemples
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"
]
}
}
}
}