Sends you notification through Amazon EventBridge when all files written to your file share have been uploaded to Amazon S3.
Storage Gateway can send a notification through Amazon EventBridge when all files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the file share up to the time that you make a request for notification. When the upload is done, Storage Gateway sends you notification through EventBridge. You can configure EventBridge to send the notification through event targets such as Amazon SNS or Lambda function. This operation is only supported for S3 File Gateways.
For more information, see Getting file upload notification in the Amazon S3 File Gateway User Guide.
Raises:
-
InternalServerError
–
An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException
–
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
| def notify_when_uploaded(
self,
file_share_arn: "capo_storage_gateway.types.file_share_arn.FileShareARN",
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.notify_when_uploaded_output.NotifyWhenUploadedOutput":
"""<p>Sends you notification through Amazon EventBridge when all files written to your file share have been uploaded to Amazon S3.</p> <p>Storage Gateway can send a notification through Amazon EventBridge when all files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the file share up to the time that you make a request for notification. When the upload is done, Storage Gateway sends you notification through EventBridge. You can configure EventBridge to send the notification through event targets such as Amazon SNS or Lambda function. This operation is only supported for S3 File Gateways.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/filegateway/latest/files3/monitoring-file-gateway.html#get-notification">Getting file upload notification</a> in the <i>Amazon S3 File Gateway User Guide</i>.</p>
Raises:
capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_storage_gateway.types.notify_when_uploaded_input.NotifyWhenUploadedInput]",
) -> OperationResponse[
"capo_storage_gateway.types.notify_when_uploaded_output.NotifyWhenUploadedOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.notify_when_uploaded
output, http_response = (
capo_storage_gateway._operations.storage_gateway_20130630.notify_when_uploaded.notify_when_uploaded(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("NotifyWhenUploaded")
)
input_: capo_storage_gateway.types.notify_when_uploaded_input.NotifyWhenUploadedInput = {
"file_share_arn": file_share_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|