create_link
async
¶
create_link(
gateway_id: GatewayId,
peer_gateway_id: GatewayId,
log_settings: LinkLogSettings,
*,
config_overrides: Optional[AsyncRTBFabricClientConfig] = 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.
>>> await 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/async_rtb_fabric.py
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | |