|
Valeurs AssociationProperty
|
Description
|
AssociationPropertyMetadata correspondant
|
|
Auto
|
ROS génère automatiquement des champs tels que AssociationProperty et AssociationPropertyMetadata à partir de la structure de données Terraform.
Remarque
Cela s'applique uniquement aux paramètres JSON dans les modèles Terraform.
|
Overwrite : complète ou remplace les définitions de paramètres imbriqués internes.
Ce dictionnaire facultatif contient :
-
Key
Chemin d'accès au paramètre imbriqué interne. Règles relatives aux chemins :
-
Utilisez * pour représenter un élément d'une liste ou d'un ensemble.
-
Utilisez le nom de l'élément pour désigner un objet contenu dans un autre objet.
-
Séparez les segments de chemin par un point (.).
-
Vous pouvez omettre le caractère au début et au milieu d'un chemin. En revanche, vous ne pouvez pas omettre un ou plusieurs caractères à la fin d'un chemin.
Exemples : // The path for name is name.
// The path for address is address.
variable "user_information" {
type = object({
name = string
address = string
})
}
// The path for elements in region_ids is *.
variable "region_ids" {
type = list(string)
}
// The path for internal is *.internal, which can be abbreviated as internal.
// The path for external is *.external, which can be abbreviated as external.
// The path for protocol is *.protocol, which can be abbreviated as protocol.
variable "docker_ports" {
type = list(object({
internal = number
external = number
protocol = string
}))
}
// The path for b is *.b, which can be abbreviated as b.
// The path for elements in b is *.b.*, which can be abbreviated as b.*
// The path for c is *.c, which can be abbreviated as c.
// The path for d is *.c.*.d, which can be abbreviated as c.d.
// The path for elements in d is *.c.*.d.*, which can be abbreviated as c.d.*
// The path for e is *.e, which can be abbreviated as e.
// The path for elements in e is *.e.*, which can be abbreviated as e.*.
// The path for elements in e is *.e.*.*, which can be abbreviated as e.*.* (you must keep both * characters).
// The path for f is *.f, which can be abbreviated as f.
// The path for g is *.f.*.*.g, which can be abbreviated as f.g.
// The path for elements in g is *.f.*.*.g.*, which can be abbreviated as f.g.*
variable "complex_type_demo" {
type = list(object({
b = list(string)
c = list(object({
d = list(string)
}))
e = list(list(string))
f = list(list(object({
g = list(string)
})))
}))
}
-
Value
Complément apporté à la définition du paramètre. Pour plus d'informations, consultez la rubrique Paramètres.
|
|
AutoCompleteInput
|
Génère une chaîne aléatoire.
|
-
CharacterClasses
-
Class : type de caractère. Valeurs valides :
-
lowercase
-
uppercase
-
number
-
specialCharacter
-
Min : nombre minimal de caractères pour ce type.
-
SpecialCharacters : caractères spéciaux spécifiques. Valide uniquement lorsque Class vaut specialCharacter.
-
Start : indique si la chaîne peut commencer par un caractère spécial. Valide uniquement lorsque Class vaut specialCharacter.
-
End : indique si la chaîne peut se terminer par un caractère spécial. Valide uniquement lorsque Class vaut specialCharacter.
-
Prefix : préfixe de la chaîne.
-
Suffix : suffixe de la chaîne.
-
Length : longueur de la chaîne.
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ManagedKubernetesClusterName": {
"Type": "String",
"Label": {
"en": "Managed Kubernetes Cluster Name",
"zh-cn": "ACK managed cluster name"
},
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 5,
"Prefix": "cluster-for-mse-",
"Suffix": "-by-ros",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ManagedKubernetesClusterName:
Type: String
Label:
en: Managed Kubernetes Cluster Name
zh-cn: ACK managed cluster name
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: cluster-for-mse-
Suffix: '-by-ros'
CharacterClasses:
- Class: lowercase
min: 1
|
|
ChargeType
|
Mode de facturation. Valeurs valides :
-
Paiement à l'utilisation
-
Abonnement
|
Aucun
|
|
Code
|
Champ de saisie de code.
|
Aucun
|
|
CommaDelimitedList
|
Tableau dont les éléments sont séparés par des virgules.
|
Aucun
|
|
Cron
|
Expression cron formatée définissant la planification d'une tâche.
|
Aucun
|
|
DateTime
|
Date.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DateTime": {
"Type": "String",
"AssociationProperty": "DateTime"
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DateTime:
Type: String
AssociationProperty: DateTime
-
Description de l'exemple
Dans cet exemple, la date est définie en spécifiant DateTime comme valeur de AssociationProperty pour le paramètre DateTime.
|
|
FileContent
|
Lit le contenu d'un fichier local.
|
AcceptFileSuffixes : types de fichiers acceptés pour le téléversement, séparés par des virgules.
|
|
GMTZone
|
Sélection d'un fuseau GMT.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GMTZone": {
"Type": "String",
"AssociationProperty": "GMTZone"
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GMTZone:
Type: String
AssociationProperty: GMTZone
-
Description de l'exemple
Ici, le fuseau GMT est défini en attribuant GMTZone à la propriété AssociationProperty du paramètre GMTZone.
|
|
Json
|
Saisie d'un objet JSON.
|
Aucun
|
|
List[Parameter]
|
Liste de paramètres affichée avec indentation.
S'applique uniquement aux paramètres JSON.
|
Pour plus d'informations, consultez la rubrique Paramètres.
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionIds": {
"Label": {
"en": "ECS Region Ids",
"zh-cn": "ECS Region List"
},
"MaxLength": 100,
"MinLength": 1,
"Type": "Json",
"AssociationProperty": "List[Parameter]",
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId",
"MinLength": 1,
"MaxLength": 64
}
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionIds:
Label:
en: ECS Region Ids
zh-cn: ECS Region List
MaxLength: 100
MinLength: 1
Type: Json
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
MinLength: 1
MaxLength: 64
-
Description de l'exemple
Cet exemple utilise List[Parameter] pour AssociationProperty et Parameter pour AssociationPropertyMetadata afin de présenter plusieurs ID de région ECS avec indentation dans la console.
|
|
List[Parameters]
|
Liste de groupes de paramètres présentée dans un tableau.
Concerne exclusivement les paramètres JSON.
|
|
|
OOSServiceRole
|
Rôle de service OOS.
|
RegionId : ID de la région. Valeur par défaut : région de la pile.
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"OosServiceRole": {
"Type": "String",
"AssociationProperty": "OOSServiceRole",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}"
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
OosServiceRole:
Type: String
AssociationProperty: OOSServiceRole
AssociationPropertyMetadata:
RegionId: ${RegionId}
-
Description de l'exemple
Le rôle de service OOS est ici configuré en attribuant OOSServiceRole à la propriété AssociationProperty du paramètre OosServiceRole.
|
|
Password
|
Champ de saisie de mot de passe.
|
Aucun
|
|
RateControl
|
Taux d'exécution OOS.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RateControl": {
"Type": "String",
"AssociationProperty": "RateControl"
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RateControl:
Type: String
AssociationProperty: RateControl
-
Description de l'exemple
Ce scénario configure le taux d'exécution OOS en définissant RateControl comme valeur de AssociationProperty pour le paramètre RateControl.
|
|
Tags
|
Sélection de tags.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"Tags": {
"Type": "String",
"AssociationProperty": "Tags",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}",
"ResourceType": "ALIYUN::ECS::INSTANCE"
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Tags:
Type: String
AssociationProperty: Tags
AssociationPropertyMetadata:
RegionId: ${RegionId}
ResourceType: ALIYUN::ECS::INSTANCE
-
Description de l'exemple
Les informations de tag personnalisées d'une instance ECS sont récupérées en affectant Tags à la propriété AssociationProperty du paramètre Tags, puis en renseignant RegionId et ResourceType dans les attributs AssociationPropertyMetadata.
|
|
Targets
|
Sélection d'instances ECS par ID d'instance, tags, groupes de ressources ou autres méthodes.
|
RegionId : ID de la région. Valeur par défaut : région de la pile.
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"Targets": {
"Type": "String",
"AssociationProperty": "Targets",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}"
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Targets:
Type: String
AssociationProperty: Targets
AssociationPropertyMetadata:
RegionId: ${RegionId}
-
Description de l'exemple
L'objet instance ECS est obtenu en définissant Targets comme valeur de AssociationProperty pour le paramètre Targets et en précisant RegionId dans l'attribut AssociationPropertyMetadata.
|
|
TextArea
|
Champ de saisie de texte enrichi.
|
Aucun
|
|
TimeTriggerWeekly
|
Sélection hebdomadaire d'une heure.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TimeTriggerWeekly": {
"Type": "String",
"AssociationProperty": "TimeTriggerWeekly"
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TimeTriggerWeekly:
Type: String
AssociationProperty: TimeTriggerWeekly
-
Description de l'exemple
Une heure est sélectionnée sur une base hebdomadaire grâce à l'attribution de TimeTriggerWeekly à la propriété AssociationProperty du paramètre TimeTriggerWeekly.
|
|
TimeZone
|
Sélection d'un fuseau horaire.
|
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TimeZone": {
"Type": "String",
"AssociationProperty": "TimeZone"
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TimeZone:
Type: String
AssociationProperty: TimeZone
-
Description de l'exemple
Le fuseau horaire est configuré en spécifiant TimeZone comme valeur de AssociationProperty pour le paramètre TimeZone.
|
|
Aucun
|
Dispose les paramètres avec indentation.
S'applique uniquement aux paramètres JSON.
Remarque
Ne spécifiez pas AssociationProperty. Utilisez exclusivement AssociationPropertyMetadata pour obtenir une disposition indentée.
|
-
Parameters : dictionnaire contenant les définitions de paramètres.
Exemples :
-
Exemple de code
Exemple JSON : {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RenameECS": {
"Label": {
"en": "Rename ECS",
"zh-cn": "Rename ECS"
},
"MaxLength": 100,
"MinLength": 1,
"Type": "Json",
"AssociationPropertyMetadata": {
"Parameters": {
"InstanceId": {
"Type": "String",
"Label": {
"en": "ECS Instance Id",
"zh-cn": "ECS Instance ID"
},
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId",
"MinLength": 1,
"MaxLength": 64
},
"Name": {
"Type": "String",
"Label": {
"en": "New Name",
"zh-cn": "New Name"
},
"MinLength": 1
}
}
}
}
}
}
Exemple YAML : ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RenameECS:
Label:
en: Rename ECS
zh-cn: Rename ECS
MaxLength: 100
MinLength: 1
Type: Json
AssociationPropertyMetadata:
Parameters:
InstanceId:
Type: String
Label:
en: ECS Instance Id
zh-cn: ECS Instance ID
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
MinLength: 1
MaxLength: 64
Name:
Type: String
Label:
en: New Name
zh-cn: New Name
MinLength: 1
-
Description de l'exemple
AssociationProperty n'est pas défini dans cet exemple. Seul AssociationPropertyMetadata reçoit la valeur Parameters, ce qui permet d'afficher un unique ID d'instance ECS avec indentation dans la console.
-
Metadata : dictionnaire. Pour plus d'informations, consultez la rubrique Métadonnées.
Remarque
Combinez cette approche avec List[Parameter] pour créer des structures imbriquées. Aucune limite de profondeur ne s'applique.
|