Skip to content

get_resources_summary

get_resources_summary(
    *, config_overrides: Optional[ProtonClientConfig] = None
) -> GetResourcesSummaryOutput

Get counts of Proton resources.

For infrastructure-provisioning resources (environments, services, service instances, pipelines), the action returns staleness counts. A resource is stale when it's behind the recommended version of the Proton template that it uses and it needs an update to become current.

The action returns staleness counts (counts of resources that are up-to-date, behind a template major version, or behind a template minor version), the total number of resources, and the number of resources that are in a failed state, grouped by resource type. Components, environments, and service templates return less information - see the components, environments, and serviceTemplates field descriptions.

For context, the action also returns the total number of each type of Proton template in the Amazon Web Services account.

For more information, see Proton dashboard in the Proton User Guide.

Raises:

Source code in docs_src/capo_proton/_services/proton.py
def get_resources_summary(
    self, *, config_overrides: Optional[ProtonClientConfig] = None
) -> "capo_proton.types.get_resources_summary_output.GetResourcesSummaryOutput":
    """<p>Get counts of Proton resources.</p> <p>For infrastructure-provisioning resources (environments, services, service instances, pipelines), the action returns staleness counts. A resource is stale when it's behind the recommended version of the Proton template that it uses and it needs an update to become current.</p> <p>The action returns staleness counts (counts of resources that are up-to-date, behind a template major version, or behind a template minor version), the total number of resources, and the number of resources that are in a failed state, grouped by resource type. Components, environments, and service templates return less information - see the <code>components</code>, <code>environments</code>, and <code>serviceTemplates</code> field descriptions.</p> <p>For context, the action also returns the total number of each type of Proton template in the Amazon Web Services account.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/monitoring-dashboard.html">Proton dashboard</a> in the <i>Proton User Guide</i>.</p>

    Raises:
        capo_proton.errors.access_denied_exception.AccessDeniedException: <p>There <i>isn't</i> sufficient access for performing this action.</p>
        capo_proton.errors.internal_server_exception.InternalServerException: <p>The request failed to register with the service.</p>
        capo_proton.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_proton.errors.validation_exception.ValidationException: <p>The input is invalid or an out-of-range value was supplied for the input parameter.</p>
        capo_proton.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_proton.types.get_resources_summary_input.GetResourcesSummaryInput]",
    ) -> OperationResponse[
        "capo_proton.types.get_resources_summary_output.GetResourcesSummaryOutput"
    ]:
        import capo_proton._operations.aws_proton20200720.get_resources_summary

        output, http_response = (
            capo_proton._operations.aws_proton20200720.get_resources_summary.get_resources_summary(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetResourcesSummary")
    )
    input_: capo_proton.types.get_resources_summary_input.GetResourcesSummaryInput = {}

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