RTBFabric / Client / put_link_flows
put_link_flows¶
- RTBFabric.Client.put_link_flows(**kwargs)¶
Replaces a link’s flow configuration. The change applies asynchronously. The call returns once the change is accepted, and the link serves its prior flows until the update commits atomically. RTB Fabric validates the request before accepting it, and a request that fails validation changes nothing. After the call, use GetLink. Once the change completes, the link’s status is ACTIVE again and its flows show the change.
See also: AWS API Documentation
Request Syntax
response = client.put_link_flows( gatewayId='string', linkId='string', clientToken='string', lockToken='string', flows=[ { 'name': 'string', 'pipeline': { 'sequential': { 'modules': [ { 'name': 'string', 'moduleVersionArn': 'string', 'selectedActions': [ 'FILTER'|'ENRICH_REQUEST_EXT'|'ENRICH_REQUEST_HEADERS'|'OBSERVE', ], 'failureMode': 'OPEN'|'CLOSED', 'activationPercentage': ..., 'configurationValues': 'string' }, ] }, 'phased': { 'phases': [ { 'modules': [ { 'name': 'string', 'moduleVersionArn': 'string', 'selectedActions': [ 'FILTER'|'ENRICH_REQUEST_EXT'|'ENRICH_REQUEST_HEADERS'|'OBSERVE', ], 'failureMode': 'OPEN'|'CLOSED', 'activationPercentage': ..., 'configurationValues': 'string' }, ] }, ] } } }, ] )
- Parameters:
gatewayId (string) –
[REQUIRED]
The unique identifier of the gateway.
linkId (string) –
[REQUIRED]
The unique identifier of the link.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry with the same token and parameters, you get the original response without an error. If you retry with the same token but different parameters, the call fails with ValidationException. If you don’t provide a token, the SDK generates one, and RTB Fabric remembers it for 8 hours. A retry returns the original
updateIdbeforelockTokenis checked.This field is autopopulated if not provided.
lockToken (string) –
[REQUIRED]
The concurrency token that you read from GetLink. If the link changed since that read, by any operation, the call fails with ConflictException.
flows (list) –
[REQUIRED]
The link’s flows, replacing the current ones. An empty list removes every flow.
(dict) –
One flow on a link: a set of modules that runs on the link’s bid requests.
name (string) – [REQUIRED]
The flow’s name, unique within the link.
pipeline (dict) – [REQUIRED]
The pipeline that the flow’s modules run in. In a sequential pipeline, each module sees the previous module’s output. In a phased pipeline, a phase’s modules see the prior phase’s output, not each other’s.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
sequential,phased.sequential (dict) –
Modules run in list order. Use it when each module needs the previous module’s output.
modules (list) – [REQUIRED]
In execution order.
(dict) –
A version attached to a flow, with its settings.
name (string) – [REQUIRED]
The module’s name, unique within the flow.
moduleVersionArn (string) – [REQUIRED]
The version to attach. It must be ACTIVE and available to you (see ListAvailableModuleVersions). You can keep a version that’s already in the link’s flows after it’s deprecated, but you can’t give it a higher share of traffic.
selectedActions (list) –
The capabilities to turn on, chosen from the version’s
configurableActions. If the version exposes one, it’s the default. If the version exposes more than one, this field is required. If it exposes none, omit this field.(string) –
A capability that you can turn on when you attach a version, such as FILTER or OBSERVE. Each capability needs a minimum permission.
failureMode (string) –
Specifies what happens when the module fails – when its call fails or times out, or when an express module’s dataset is stale. The default is OPEN.
activationPercentage (float) –
The percentage of the flow’s requests that the module runs on. The flow skips the module on the rest of the requests. The default is 100.
configurationValues (string) –
RTB Fabric validates the value against the version’s
configurationSchemaand rejects a value that fails with ValidationException. Omit it when the schema is empty or fully defaulted.
phased (dict) –
Phases run in order; a phase’s modules run concurrently on the same input. Use it when a phase’s modules don’t depend on each other.
phases (list) – [REQUIRED]
At most 8 modules in total across the phases; more fails with ValidationException.
(dict) –
One phase of a phased pipeline. Its modules run concurrently on the previous phase’s output.
modules (list) – [REQUIRED]
At most one MUTATE_REQUEST_BODY module.
(dict) –
A version attached to a flow, with its settings.
name (string) – [REQUIRED]
The module’s name, unique within the flow.
moduleVersionArn (string) – [REQUIRED]
The version to attach. It must be ACTIVE and available to you (see ListAvailableModuleVersions). You can keep a version that’s already in the link’s flows after it’s deprecated, but you can’t give it a higher share of traffic.
selectedActions (list) –
The capabilities to turn on, chosen from the version’s
configurableActions. If the version exposes one, it’s the default. If the version exposes more than one, this field is required. If it exposes none, omit this field.(string) –
A capability that you can turn on when you attach a version, such as FILTER or OBSERVE. Each capability needs a minimum permission.
failureMode (string) –
Specifies what happens when the module fails – when its call fails or times out, or when an express module’s dataset is stale. The default is OPEN.
activationPercentage (float) –
The percentage of the flow’s requests that the module runs on. The flow skips the module on the rest of the requests. The default is 100.
configurationValues (string) –
RTB Fabric validates the value against the version’s
configurationSchemaand rejects a value that fails with ValidationException. Omit it when the schema is empty or fully defaulted.
- Return type:
dict
- Returns:
Response Syntax
{ 'gatewayId': 'string', 'linkId': 'string', 'status': 'PENDING_CREATION'|'PENDING_REQUEST'|'REQUESTED'|'ACCEPTED'|'ACTIVE'|'REJECTED'|'FAILED'|'PENDING_DELETION'|'DELETED'|'PENDING_UPDATE'|'PENDING_ISOLATION'|'ISOLATED'|'PENDING_RESTORATION'|'CREATE_FAILED'|'DELETE_FAILED', 'updateId': 'string' }
Response Structure
(dict) –
gatewayId (string) –
The unique identifier of the gateway.
linkId (string) –
The unique identifier of the link.
status (string) –
The link’s status. A successful call returns PENDING_UPDATE, and the link serves its prior flows until the change completes.
updateId (string) –
The ID of the update this call started.
Exceptions