Obtains the manual snapshot limits for a directory.
Parameters:
-
directory_id
(DirectoryId)
–
Contains the identifier of the directory to obtain the limits for.
Raises:
Examples:
To get snapshot limits
The following example obtains the manual snapshot limits for a specified directory.
>>> client.get_snapshot_limits(directory_id='d-92654abfed')
Source code in docs_src/capo_directory_service/_services/directory_service.py
| def get_snapshot_limits(
self,
directory_id: "capo_directory_service.types.directory_id.DirectoryId",
*,
config_overrides: Optional[DirectoryServiceClientConfig] = None,
) -> "capo_directory_service.types.get_snapshot_limits_result.GetSnapshotLimitsResult":
"""<p>Obtains the manual snapshot limits for a directory.</p>
Args:
directory_id: <p>Contains the identifier of the directory to obtain the limits for.</p>
Raises:
capo_directory_service.errors.client_exception.ClientException: <p>A client exception has occurred.</p>
capo_directory_service.errors.entity_does_not_exist_exception.EntityDoesNotExistException: <p>The specified entity could not be found.</p>
capo_directory_service.errors.service_exception.ServiceException: <p>An exception has occurred in Directory Service.</p>
capo_directory_service.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To get snapshot limits
The following example obtains the manual snapshot limits for a specified directory.
>>> client.get_snapshot_limits(directory_id='d-92654abfed')
"""
def _handler(
req: "OperationRequest[capo_directory_service.types.get_snapshot_limits_request.GetSnapshotLimitsRequest]",
) -> OperationResponse[
"capo_directory_service.types.get_snapshot_limits_result.GetSnapshotLimitsResult"
]:
import capo_directory_service._operations.directory_service_20150416.get_snapshot_limits
output, http_response = (
capo_directory_service._operations.directory_service_20150416.get_snapshot_limits.get_snapshot_limits(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetSnapshotLimits")
)
input_: capo_directory_service.types.get_snapshot_limits_request.GetSnapshotLimitsRequest = {
"directory_id": directory_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|