Accepts a link request between gateways.
When a requester gateway requests to link with a responder gateway, the responder can use this operation to accept the link request and establish the connection.
Parameters:
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.
-
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:
Accept a link request
Accepts a link request from requester gateway
>>> await client.accept_link(gateway_id='rtb-gw-12345678', link_id='link-87654321', log_settings={'applicationLogs': {'sampling': {'errorLog': 100.0, 'filterLog': 0.0}}})
Source code in docs_src/capo_rtbfabric/_services/async_rtb_fabric.py
| async def accept_link(
self,
gateway_id: "capo_rtbfabric.types.gateway_id.GatewayId",
link_id: "capo_rtbfabric.types.link_id.LinkId",
log_settings: "capo_rtbfabric.types.link_log_settings.LinkLogSettings",
*,
config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
attributes: Optional[
"capo_rtbfabric.types.link_attributes.LinkAttributes"
] = None,
timeout_in_millis: Optional[
"capo_rtbfabric.types.link_timeout_in_millis.LinkTimeoutInMillis"
] = None,
) -> "capo_rtbfabric.types.accept_link_response.AcceptLinkResponse":
"""<p>Accepts a link request between gateways.</p> <p>When a requester gateway requests to link with a responder gateway, the responder can use this operation to accept the link request and establish the connection.</p>
Args:
gateway_id: <p>The unique identifier of the gateway.</p>
link_id: <p>The unique identifier of the link.</p>
attributes: <p>Attributes of the link.</p>
log_settings: <p>Settings for the application logs.</p>
timeout_in_millis: <p>The timeout value in milliseconds.</p>
Raises:
capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
capo_rtbfabric.errors.conflict_exception.ConflictException: <p>The request could not be completed because of a conflict in the current state of the resource.</p>
capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
capo_rtbfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request could not be completed because the resource does not exist.</p>
capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Accept a link request
Accepts a link request from requester gateway
>>> await client.accept_link(gateway_id='rtb-gw-12345678', link_id='link-87654321', log_settings={'applicationLogs': {'sampling': {'errorLog': 100.0, 'filterLog': 0.0}}})
"""
async def _handler(
req: "AsyncOperationRequest[capo_rtbfabric.types.accept_link_request.AcceptLinkRequest]",
) -> AsyncOperationResponse[
"capo_rtbfabric.types.accept_link_response.AcceptLinkResponse"
]:
import capo_rtbfabric._operations.rtb_fabric.accept_link
(
output,
http_response,
) = await capo_rtbfabric._operations.rtb_fabric.accept_link.async_accept_link(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AcceptLink")
)
input_: capo_rtbfabric.types.accept_link_request.AcceptLinkRequest = {
"gateway_id": gateway_id,
"link_id": link_id,
"log_settings": log_settings,
}
if attributes is not None:
input_["attributes"] = attributes
if timeout_in_millis is not None:
input_["timeout_in_millis"] = timeout_in_millis
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|