This operation accepts a data grant.
Parameters:
-
data_grant_arn
(DataGrantArn)
–
The Amazon Resource Name (ARN) of the data grant to accept.
Raises:
Source code in docs_src/capo_dataexchange/_services/data_exchange.py
| def accept_data_grant(
self,
data_grant_arn: "capo_dataexchange.types.data_grant_arn.DataGrantArn",
*,
config_overrides: Optional[DataExchangeClientConfig] = None,
) -> "capo_dataexchange.types.accept_data_grant_response.AcceptDataGrantResponse":
"""<p>This operation accepts a data grant.</p>
Args:
data_grant_arn: <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
Raises:
capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
capo_dataexchange.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_dataexchange.types.accept_data_grant_request.AcceptDataGrantRequest]",
) -> OperationResponse[
"capo_dataexchange.types.accept_data_grant_response.AcceptDataGrantResponse"
]:
import capo_dataexchange._operations.data_exchange.accept_data_grant
output, http_response = (
capo_dataexchange._operations.data_exchange.accept_data_grant.accept_data_grant(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AcceptDataGrant")
)
input_: capo_dataexchange.types.accept_data_grant_request.AcceptDataGrantRequest = {
"data_grant_arn": data_grant_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|