RTBFabric / Client / create_link_routing_rule
create_link_routing_rule¶
- RTBFabric.Client.create_link_routing_rule(**kwargs)¶
Creates a routing rule for a link.
Routing rules use priority-based evaluation where lower priority numbers are evaluated first. Each rule specifies conditions that must all match for the rule to apply.
See also: AWS API Documentation
Request Syntax
response = client.create_link_routing_rule( clientToken='string', gatewayId='string', linkId='string', priority=123, conditions={ 'hostHeader': 'string', 'hostHeaderWildcard': 'string', 'pathPrefix': 'string', 'pathExact': 'string', 'queryStringEquals': { 'key': 'string', 'value': 'string' }, 'queryStringExists': 'string' }, tags={ 'string': 'string' } )
- Parameters:
clientToken (string) –
[REQUIRED]
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.
If you don’t provide this value, then Amazon Web Services generates a random one for you.
If you retry the operation with the same
ClientToken, but with different parameters, the retry fails with anIdempotentParameterMismatcherror.This field is autopopulated if not provided.
gatewayId (string) –
[REQUIRED]
The unique identifier of the gateway.
linkId (string) –
[REQUIRED]
The unique identifier of the link.
priority (integer) –
[REQUIRED]
The priority of the routing rule. Lower numbers are evaluated first. Valid values are 1 to 1000. Priority must be unique among non-deleted rules within a link.
conditions (dict) –
[REQUIRED]
The conditions for the routing rule. All specified fields must match for the rule to apply. At least one condition field must be set.
hostHeader (string) –
The exact host header value to match.
hostHeaderWildcard (string) –
A wildcard pattern for host header matching (for example,
*.example.com).pathPrefix (string) –
The path prefix to match. The request path must start with this value. Must start with
/.pathExact (string) –
The exact path to match. Must start with
/.queryStringEquals (dict) –
A query string key-value pair that must be present and match exactly.
key (string) – [REQUIRED]
The key of the query string parameter to match. Must contain only RFC 3986 unreserved characters.
value (string) – [REQUIRED]
The value of the query string parameter to match. Must contain only RFC 3986 unreserved characters.
queryStringExists (string) –
A query string key that must be present in the request (any value is accepted).
tags (dict) –
A map of the key-value pairs of the tag or tags to assign to the resource.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'ruleId': 'string', 'status': 'CREATION_IN_PROGRESS'|'ACTIVE'|'UPDATE_IN_PROGRESS'|'DELETION_IN_PROGRESS'|'DELETED'|'FAILED', 'createdAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
ruleId (string) –
The unique identifier of the routing rule.
status (string) –
The status of the routing rule.
createdAt (datetime) –
The timestamp of when the routing rule was created.
Exceptions
RTBFabric.Client.exceptions.ServiceQuotaExceededExceptionRTBFabric.Client.exceptions.ResourceNotFoundExceptionRTBFabric.Client.exceptions.ThrottlingExceptionRTBFabric.Client.exceptions.AccessDeniedExceptionRTBFabric.Client.exceptions.ConflictExceptionRTBFabric.Client.exceptions.InternalServerExceptionRTBFabric.Client.exceptions.ValidationException