create_link
¶
create_link(
gateway_id: GatewayId,
peer_gateway_id: GatewayId,
log_settings: LinkLogSettings,
*,
config_overrides: Optional[RTBFabricClientConfig] = None,
attributes: Optional[LinkAttributes] = None,
http_responder_allowed: Optional[bool] = None,
tags: Optional[TagsMap] = None,
timeout_in_millis: Optional[LinkTimeoutInMillis] = None,
) -> CreateLinkResponse
Creates a new link between gateways.
Establishes a connection that allows gateways to communicate and exchange bid requests and responses.
Parameters:
-
gateway_id(GatewayId) –The unique identifier of the gateway.
-
peer_gateway_id(GatewayId) –The unique identifier of the peer gateway.
-
attributes(Optional[LinkAttributes], default:None) –Attributes of the link.
-
http_responder_allowed(Optional[bool], default:None) –Boolean to specify if an HTTP responder is allowed.
-
tags(Optional[TagsMap], default:None) –A map of the key-value pairs of the tag or tags to assign to the resource.
-
log_settings(LinkLogSettings) –Application log settings for the link. This value is required. Under
applicationLogs.sampling, theerrorLogandfilterLogfields set the percentage of eligible events to log. Valid values range from0through100. To turn off application logs, set both fields to0, as in{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}. -
timeout_in_millis(Optional[LinkTimeoutInMillis], default:None) –The timeout value in milliseconds.
Raises:
-
AccessDeniedException–The request could not be completed because you do not have sufficient access to perform this action.
-
ConflictException–The request could not be completed because of a conflict in the current state of the resource.
-
InternalServerException–The request could not be completed because of an internal server error. Try your call again.
-
ResourceNotFoundException–The request could not be completed because the resource does not exist.
-
ServiceQuotaExceededException–The request could not be completed because you exceeded a service quota.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The request could not be completed because it fails satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a standard link between gateways Creates a new link between two RTB applications. Requires peerGatewayId to specify the target gateway.
>>> client.create_link(gateway_id='rtb-gw-12345678', peer_gateway_id='rtb-gw-87654321', log_settings={'applicationLogs': {'sampling': {'errorLog': 100.0, 'filterLog': 0.0}}})
Source code in docs_src/capo_rtbfabric/_services/rtb_fabric.py
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | |