Met à jour les propriétés de plusieurs règles de transfert par lot.
Description de l'opération
UpdateRulesAttribute est une opération asynchrone. Après l'envoi d'une requête, le système renvoie un identifiant de requête et exécute la tâche en arrière-plan. Les propriétés des règles de transfert ne sont pas mises à jour immédiatement. Vous pouvez appeler l'opération pour interroger l'état de mise à jour des règles de transfert :
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
alb:UpdateRulesAttribute |
update |
*LoadBalancer
*ServerGroup
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| ClientToken |
string |
Non |
Le jeton client utilisé pour garantir l'idempotence de la requête. Assurez-vous que le jeton client est unique parmi les différentes requêtes. Le jeton client ne peut contenir que des caractères ASCII. Remarque
Si vous ne spécifiez pas ce paramètre, le système utilise automatiquement le RequestId de la requête API comme ClientToken. Le RequestId de chaque requête API est différent. |
123e4567-e89b-12d3-a456-42665544*** |
| Rules |
array<object> |
Oui |
La liste des règles de transfert. |
|
|
array<object> |
Oui |
Une règle de transfert. |
||
| Priority |
integer |
Non |
La priorité de la règle de transfert. |
80 |
| RuleName |
string |
Non |
Le nom de la règle de transfert. |
rule_111 |
| RuleActions |
array<object> |
Non |
La liste des actions de la règle de transfert. |
|
|
array<object> |
Oui |
Une action de la règle de transfert. |
||
| FixedResponseConfig |
object |
Non |
La configuration de l'action pour renvoyer une réponse fixe. |
|
| Content |
string |
Non |
The content. |
dssacav |
| ContentType |
string |
Non |
The content type. |
text/plain |
| HttpCode |
string |
Non |
The HTTP status code. |
200 |
| ForwardGroupConfig |
object |
Non |
La configuration de l'action pour transférer les requêtes vers des groupes de serveurs. |
|
| ServerGroupTuples |
array<object> |
Non |
The list of destination server groups. |
|
|
object |
Non |
A destination server group. |
||
| ServerGroupId |
string |
Non |
The server group ID. |
sgp-3kbj35ay7cvi****** |
| Weight |
integer |
Non |
The weight. |
100 |
| ServerGroupStickySession |
object |
Non |
Session persistence between server groups. |
|
| Enabled |
boolean |
Non |
Specifies whether to enable session persistence. |
true |
| Timeout |
integer |
Non |
The timeout period. |
100 |
| InsertHeaderConfig |
object |
Non |
La configuration de l'action pour insérer un en-tête. |
|
| CoverEnabled |
boolean |
Non |
Specifies whether to overwrite the value of a request header. |
False |
| Key |
string |
Non |
The HTTP header. |
key |
| Value |
string |
Non |
The content of the HTTP header. |
value |
| ValueType |
string |
Non |
The value type. |
SystemDefined |
| Order |
integer |
Oui |
La priorité. |
1 |
| RedirectConfig |
object |
Non |
La configuration de l'action de redirection. |
|
| Host |
string |
Non |
The destination host to which requests are redirected. |
test.alb.com |
| HttpCode |
string |
Non |
The redirection method. |
301 |
| Path |
string |
Non |
The destination path to which requests are redirected. |
/ |
| Port |
string |
Non |
The destination port to which requests are redirected. |
443 |
| Protocol |
string |
Non |
The destination protocol to which requests are redirected. |
HTTPS |
| Query |
string |
Non |
The destination query string to which requests are redirected. |
${query} |
| RewriteConfig |
object |
Non |
La configuration de l'action de réécriture. |
|
| Host |
string |
Non |
The hostname. |
${host} |
| Path |
string |
Non |
The path. |
/ |
| Query |
string |
Non |
The query. |
${query} |
| Type |
string |
Oui |
Le type de l'action de la règle de transfert. |
ForwardGroup |
| TrafficLimitConfig |
object |
Non |
La configuration de limitation de trafic. |
|
| QPS |
integer |
Non |
The number of queries per second (QPS). |
1000 |
| PerIpQps |
integer |
Non |
The number of QPS for a single IP address. |
100 |
| TrafficMirrorConfig |
object |
Non |
La configuration de mise en miroir du trafic. |
|
| TargetType |
string |
Non |
The type of the mirror destination. |
ForwardGroupMirror |
| MirrorGroupConfig |
object |
Non |
The server groups to which traffic is mirrored. |
|
| ServerGroupTuples |
array<object> |
Non |
The server groups to which traffic is mirrored. |
|
|
object |
Non |
A server group to which traffic is mirrored. |
||
| ServerGroupId |
string |
Non |
The server group ID. |
sgp-vlnjo1rhw0vc****** |
| RemoveHeaderConfig |
object |
Non |
La configuration pour la suppression d'un en-tête HTTP spécifique. |
|
| Key |
string |
Non |
The key of the HTTP header. |
key |
| CorsConfig |
object |
Non |
La configuration du partage de ressources cross-origin (CORS). |
|
| AllowOrigin |
array |
Non |
The allowed origins. |
|
|
string |
Non |
An allowed origin. |
* |
|
| AllowMethods |
array |
Non |
The allowed HTTP methods for cross-origin requests. |
|
|
string |
Non |
The allowed HTTP method for cross-origin requests. Valid values:
|
GET |
|
| AllowHeaders |
array |
Non |
The list of headers that are allowed for cross-origin requests. |
|
|
string |
Non |
A header that is allowed for cross-origin requests. |
test |
|
| ExposeHeaders |
array |
Non |
The list of headers that can be exposed to the client. |
|
|
string |
Non |
A header that can be exposed to the client. |
test |
|
| AllowCredentials |
string |
Non |
Specifies whether to allow credentials in cross-origin requests. |
off |
| MaxAge |
integer |
Non |
The maximum cache duration of preflight requests in the browser. |
60 |
| RuleConditions |
array<object> |
Non |
La liste des conditions de la règle de transfert. |
|
|
array<object> |
Oui |
Une condition de la règle de transfert. |
||
| CookieConfig |
object |
Non |
La configuration de la condition basée sur les cookies. |
|
| Values |
array<object> |
Non |
The list of cookie key-value pairs. |
|
|
object |
Non |
A cookie key-value pair. |
||
| Key |
string |
Non |
The key of the cookie. |
key |
| Value |
string |
Non |
The value of the cookie. |
value |
| HeaderConfig |
object |
Non |
La configuration de la condition basée sur les en-têtes. |
|
| Key |
string |
Non |
The key of the HTTP header. |
key |
| Values |
array |
Non |
The list of HTTP header values. |
|
|
string |
Non |
An HTTP header value. |
value |
|
| HostConfig |
object |
Non |
La configuration de la condition basée sur l'hôte. |
|
| Values |
array |
Non |
The list of hostnames. |
|
|
string |
Non |
A hostname. |
www.example.com |
|
| MethodConfig |
object |
Non |
La configuration de la condition basée sur la méthode. |
|
| Values |
array |
Non |
The list of HTTP request methods. |
|
|
string |
Non |
An HTTP request method. |
PUT |
|
| PathConfig |
object |
Non |
La configuration de la condition basée sur le chemin. |
|
| Values |
array |
Non |
The list of path conditions. |
|
|
string |
Non |
A path condition. |
/test |
|
| QueryStringConfig |
object |
Non |
La configuration de la condition basée sur la chaîne de requête. |
|
| Values |
array<object> |
Non |
The list of query string key-value pairs. |
|
|
object |
Non |
A query string key-value pair. |
||
| Key |
string |
Non |
The key of the query string. |
account |
| Value |
string |
Non |
The value of the query string. |
on |
| ResponseHeaderConfig |
object |
Non |
La configuration de la condition basée sur l'en-tête de réponse. |
|
| Key |
string |
Non |
The key of the response header. |
test |
| Values |
array |
Non |
The values of the response header. |
|
|
string |
Non |
A value of the response header. |
value |
|
| ResponseStatusCodeConfig |
object |
Non |
La configuration de la condition basée sur le code d'état de la réponse. |
|
| Values |
array |
Non |
The response status codes. |
|
|
string |
Non |
A response status code. |
200 |
|
| Type |
string |
Non |
Le type de la condition. |
Header |
| SourceIpConfig |
object |
Non |
La configuration permettant de faire correspondre le trafic de service en fonction de l'adresse IP source. |
|
| Values |
array |
Non |
One or more IP addresses or CIDR blocks. |
|
|
string |
Non |
An IP address or a CIDR block. |
192.168.1.1 |
|
| RuleId |
string |
Oui |
L'identifiant de la règle de transfert. |
rule-n4hfecmmtmfl****** |
| DryRun |
boolean |
Non |
Indique si un test à blanc doit être effectué. Valeurs valides :
|
false |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Schéma de la réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
| JobId |
string |
L'identifiant de la tâche asynchrone. |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
Exemples
JSON format
{
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | OperationDenied.IpGroupCanNotUsedForMirrorAction | The operation is not allowed because of %s. | The operation is not allowed because of %s. |
| 400 | IncorrectStatus.Rule | The status of %s [%s] is incorrect. | |
| 400 | OperationDenied.SameGroupForForwardAndMirrorAction | The operation is not allowed because of %s. | The operation is not allowed because of %s. |
| 400 | OperationDenied.GRPCServerGroup | The operation is not allowed because of %s. | |
| 400 | Conflict.Priority | There is already %s having the same configuration with %s. | |
| 400 | ResourceQuotaExceeded.ServerGroupAttachedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceQuotaExceeded.LoadBalancerServersNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceQuotaExceeded.ServerAddedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | QuotaExceeded.RuleWildcardsNum | The quota of %s is exceeded, usage %s/%s. | The quota of %s is exceeded, usage %s/%s. |
| 400 | QuotaExceeded.RuleMatchEvaluationsNum | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.RuleActionsNum | The quota of %s is exceeded, usage %s/%s. | The quota of %s is exceeded. Usage: %s/%s. |
| 400 | Mismatch.Protocol | The %s is mismatched for %s and %s. | The %s is mismatched for %s and %s. |
| 400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | The %s is mismatched for %s and %s. |
| 400 | OperationDenied.ServiceManagedResource | The operation is not allowed because the current resource of %s is managed resource. | |
| 400 | OperationDenied.ListenerIdInconsistent | The operation is not allowed because of ListenerIdInconsistent. | |
| 400 | IllegalParam.Priority | The param of Priority is illegal. | |
| 400 | OperationDenied.MirrorActionSupportHttpGroupOnly | The operation is not allowed because of MirrorActionSupportHttpGroupOnly. | |
| 400 | OperationDenied.ProtocolMustSameForForwardGroupAction | The operation is not allowed because of ProtocolMustSameForForwardGroupAction. | |
| 404 | ResourceNotFound.Rule | The specified resource %s is not found. | The specified resource %s is not found. |
| 404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.