Skip to content

start_dependency_insights

start_dependency_insights(
    service_arn: Arn,
    *,
    config_overrides: Optional[resiliencehubv2ClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> StartDependencyInsightsResponse

Starts generating dependency insights for a service. Generation runs asynchronously; the response returns the initial status, and you retrieve the results with GetDependencyInsights. To use this operation, you must have the resiliencehub:StartDependencyInsights permission on the service.

Raises:

Source code in docs_src/capo_resiliencehubv2/_services/resiliencehubv2.py
def start_dependency_insights(
    self,
    service_arn: "capo_resiliencehubv2.types.arn.Arn",
    *,
    config_overrides: Optional[resiliencehubv2ClientConfig] = None,
    client_token: Optional[
        "capo_resiliencehubv2.types.client_token.ClientToken"
    ] = None,
) -> "capo_resiliencehubv2.types.start_dependency_insights_response.StartDependencyInsightsResponse":
    """<p>Starts generating dependency insights for a service. Generation runs asynchronously; the response returns the initial status, and you retrieve the results with GetDependencyInsights. To use this operation, you must have the <code>resiliencehub:StartDependencyInsights</code> permission on the service.</p>

    Raises:
        capo_resiliencehubv2.errors.access_denied_exception.AccessDeniedException: <p>Access denied — caller lacks required permissions.</p>
        capo_resiliencehubv2.errors.conflict_exception.ConflictException: <p>Conflict — resource already exists.</p>
        capo_resiliencehubv2.errors.internal_server_exception.InternalServerException: <p>Internal service error.</p>
        capo_resiliencehubv2.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found.</p>
        capo_resiliencehubv2.errors.throttling_exception.ThrottlingException: <p>Too many requests — rate limit exceeded.</p>
        capo_resiliencehubv2.errors.validation_exception.ValidationException: <p>Validation error — invalid input parameters.</p>
        capo_resiliencehubv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_resiliencehubv2.types.start_dependency_insights_request.StartDependencyInsightsRequest]",
    ) -> OperationResponse[
        "capo_resiliencehubv2.types.start_dependency_insights_response.StartDependencyInsightsResponse"
    ]:
        import capo_resiliencehubv2._operations.ngrh_service_core.start_dependency_insights

        output, http_response = (
            capo_resiliencehubv2._operations.ngrh_service_core.start_dependency_insights.start_dependency_insights(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartDependencyInsights")
    )
    input_: capo_resiliencehubv2.types.start_dependency_insights_request.StartDependencyInsightsRequest = {
        "service_arn": service_arn
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output