Skip to content

manage_propertygraph_statistics async

manage_propertygraph_statistics(
    *,
    config_overrides: Optional[AsyncneptunedataClientConfig] = None,
    mode: Optional[StatisticsAutoGenerationMode] = None,
) -> ManagePropertygraphStatisticsOutput

Manages the generation and use of property graph statistics.

When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:ManageStatistics IAM action in that cluster.

Parameters:

  • mode (Optional[StatisticsAutoGenerationMode], default: None ) –

    The statistics generation mode. One of: DISABLE_AUTOCOMPUTE, ENABLE_AUTOCOMPUTE, or REFRESH, the last of which manually triggers DFE statistics generation.

Raises:

Source code in docs_src/capo_neptunedata/_services/async_neptunedata.py
async def manage_propertygraph_statistics(
    self,
    *,
    config_overrides: Optional[AsyncneptunedataClientConfig] = None,
    mode: Optional[
        "capo_neptunedata.types.statistics_auto_generation_mode.StatisticsAutoGenerationMode"
    ] = None,
) -> "capo_neptunedata.types.manage_propertygraph_statistics_output.ManagePropertygraphStatisticsOutput":
    """<p>Manages the generation and use of property graph statistics.</p> <p>When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#managestatistics">neptune-db:ManageStatistics</a> IAM action in that cluster.</p>

    Args:
        mode: <p>The statistics generation mode. One of: <code>DISABLE_AUTOCOMPUTE</code>, <code>ENABLE_AUTOCOMPUTE</code>, or <code>REFRESH</code>, the last of which manually triggers DFE statistics generation.</p>

    Raises:
        capo_neptunedata.errors.access_denied_exception.AccessDeniedException: <p>Raised in case of an authentication or authorization failure.</p>
        capo_neptunedata.errors.bad_request_exception.BadRequestException: <p>Raised when a request is submitted that cannot be processed.</p>
        capo_neptunedata.errors.client_timeout_exception.ClientTimeoutException: <p>Raised when a request timed out in the client.</p>
        capo_neptunedata.errors.constraint_violation_exception.ConstraintViolationException: <p>Raised when a value in a request field did not satisfy required constraints.</p>
        capo_neptunedata.errors.illegal_argument_exception.IllegalArgumentException: <p>Raised when an argument in a request is not supported.</p>
        capo_neptunedata.errors.invalid_argument_exception.InvalidArgumentException: <p>Raised when an argument in a request has an invalid value.</p>
        capo_neptunedata.errors.invalid_parameter_exception.InvalidParameterException: <p>Raised when a parameter value is not valid.</p>
        capo_neptunedata.errors.missing_parameter_exception.MissingParameterException: <p>Raised when a required parameter is missing.</p>
        capo_neptunedata.errors.preconditions_failed_exception.PreconditionsFailedException: <p>Raised when a precondition for processing a request is not satisfied.</p>
        capo_neptunedata.errors.read_only_violation_exception.ReadOnlyViolationException: <p>Raised when a request attempts to write to a read-only resource.</p>
        capo_neptunedata.errors.statistics_not_available_exception.StatisticsNotAvailableException: <p>Raised when statistics needed to satisfy a request are not available.</p>
        capo_neptunedata.errors.too_many_requests_exception.TooManyRequestsException: <p>Raised when the number of requests being processed exceeds the limit.</p>
        capo_neptunedata.errors.unsupported_operation_exception.UnsupportedOperationException: <p>Raised when a request attempts to initiate an operation that is not supported.</p>
        capo_neptunedata.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptunedata.types.manage_propertygraph_statistics_input.ManagePropertygraphStatisticsInput]",
    ) -> AsyncOperationResponse[
        "capo_neptunedata.types.manage_propertygraph_statistics_output.ManagePropertygraphStatisticsOutput"
    ]:
        import capo_neptunedata._operations.amazon_neptune_dataplane.manage_propertygraph_statistics

        (
            output,
            http_response,
        ) = await capo_neptunedata._operations.amazon_neptune_dataplane.manage_propertygraph_statistics.async_manage_propertygraph_statistics(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ManagePropertygraphStatistics")
    )
    input_: capo_neptunedata.types.manage_propertygraph_statistics_input.ManagePropertygraphStatisticsInput = {}
    if mode is not None:
        input_["mode"] = mode

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output