Skip to content

list_service_level_objectives async

list_service_level_objectives(
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    key_attributes: Optional[Attributes] = None,
    operation_name: Optional[OperationName] = None,
    dependency_config: Optional[DependencyConfig] = None,
    max_results: Optional[ListServiceLevelObjectivesMaxResults] = None,
    next_token: Optional[NextToken] = None,
    metric_source_types: Optional[MetricSourceTypes] = None,
    include_linked_accounts: Optional[bool] = None,
    slo_owner_aws_account_id: Optional[AwsAccountId] = None,
    metric_source: Optional[MetricSource] = None,
) -> ListServiceLevelObjectivesOutput

Returns a list of SLOs created in this account.

Parameters:

  • key_attributes (Optional[Attributes], default: None ) –

    You can use this optional field to specify which services you want to retrieve SLO information for.

    This is a string-to-string map. It can include the following fields.

    • Type designates the type of object this is.

    • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.

    • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.

    • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.

    • Environment specifies the location where this object is hosted, or what it belongs to.

  • operation_name (Optional[OperationName], default: None ) –

    The name of the operation that this SLO is associated with.

  • dependency_config (Optional[DependencyConfig], default: None ) –

    Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName.

  • max_results (Optional[ListServiceLevelObjectivesMaxResults], default: None ) –

    The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.

  • next_token (Optional[NextToken], default: None ) –

    Include this value, if it was returned by the previous operation, to get the next set of service level objectives.

  • metric_source_types (Optional[MetricSourceTypes], default: None ) –

    Use this optional field to only include SLOs with the specified metric source types in the output. Supported types are:

    • Service operation

    • Service dependency

    • Service

    • CloudWatch metric

    • AppMonitor

    • Canary

  • include_linked_accounts (Optional[bool], default: None ) –

    If you are using this operation in a monitoring account, specify true to include SLO from source accounts in the returned data.

    When you are monitoring an account, you can use Amazon Web Services account ID in KeyAttribute filter for service source account and SloOwnerawsaccountID for SLO source account with IncludeLinkedAccounts to filter the returned data to only a single source account.

  • slo_owner_aws_account_id (Optional[AwsAccountId], default: None ) –

    SLO's Amazon Web Services account ID.

  • metric_source (Optional[MetricSource], default: None ) –

    Identifies the metric source to filter SLOs by.

Raises:

Source code in docs_src/capo_application_signals/_services/async_application_signals.py
async def list_service_level_objectives(
    self,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    key_attributes: Optional[
        "capo_application_signals.types.attributes.Attributes"
    ] = None,
    operation_name: Optional[
        "capo_application_signals.types.operation_name.OperationName"
    ] = None,
    dependency_config: Optional[
        "capo_application_signals.types.dependency_config.DependencyConfig"
    ] = None,
    max_results: Optional[
        "capo_application_signals.types.list_service_level_objectives_max_results.ListServiceLevelObjectivesMaxResults"
    ] = None,
    next_token: Optional[
        "capo_application_signals.types.next_token.NextToken"
    ] = None,
    metric_source_types: Optional[
        "capo_application_signals.types.metric_source_types.MetricSourceTypes"
    ] = None,
    include_linked_accounts: Optional[bool] = None,
    slo_owner_aws_account_id: Optional[
        "capo_application_signals.types.aws_account_id.AwsAccountId"
    ] = None,
    metric_source: Optional[
        "capo_application_signals.types.metric_source.MetricSource"
    ] = None,
) -> "capo_application_signals.types.list_service_level_objectives_output.ListServiceLevelObjectivesOutput":
    """<p>Returns a list of SLOs created in this account.</p>

    Args:
        key_attributes: <p>You can use this optional field to specify which services you want to retrieve SLO information for.</p> <p>This is a string-to-string map. It can include the following fields.</p> <ul> <li> <p> <code>Type</code> designates the type of object this is.</p> </li> <li> <p> <code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p> </li> <li> <p> <code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p> </li> </ul>
        operation_name: <p>The name of the operation that this SLO is associated with.</p>
        dependency_config: <p>Identifies the dependency using the <code>DependencyKeyAttributes</code> and <code>DependencyOperationName</code>. </p>
        max_results: <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.</p>
        next_token: <p>Include this value, if it was returned by the previous operation, to get the next set of service level objectives.</p>
        metric_source_types: <p>Use this optional field to only include SLOs with the specified metric source types in the output. Supported types are:</p> <ul> <li> <p>Service operation</p> </li> <li> <p>Service dependency</p> </li> <li> <p>Service</p> </li> <li> <p>CloudWatch metric</p> </li> <li> <p>AppMonitor</p> </li> <li> <p>Canary</p> </li> </ul>
        include_linked_accounts: <p>If you are using this operation in a monitoring account, specify <code>true</code> to include SLO from source accounts in the returned data. </p> <p>When you are monitoring an account, you can use Amazon Web Services account ID in <code>KeyAttribute</code> filter for service source account and <code>SloOwnerawsaccountID</code> for SLO source account with <code>IncludeLinkedAccounts</code> to filter the returned data to only a single source account. </p>
        slo_owner_aws_account_id: <p>SLO's Amazon Web Services account ID.</p>
        metric_source: <p>Identifies the metric source to filter SLOs by.</p>

    Raises:
        capo_application_signals.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_application_signals.errors.validation_exception.ValidationException: <p>The resource is not valid.</p>
        capo_application_signals.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_application_signals.types.list_service_level_objectives_input.ListServiceLevelObjectivesInput]",
    ) -> AsyncOperationResponse[
        "capo_application_signals.types.list_service_level_objectives_output.ListServiceLevelObjectivesOutput"
    ]:
        import capo_application_signals._operations.application_signals.list_service_level_objectives

        (
            output,
            http_response,
        ) = await capo_application_signals._operations.application_signals.list_service_level_objectives.async_list_service_level_objectives(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServiceLevelObjectives")
    )
    input_: capo_application_signals.types.list_service_level_objectives_input.ListServiceLevelObjectivesInput = {}
    if key_attributes is not None:
        input_["key_attributes"] = key_attributes
    if operation_name is not None:
        input_["operation_name"] = operation_name
    if dependency_config is not None:
        input_["dependency_config"] = dependency_config
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if metric_source_types is not None:
        input_["metric_source_types"] = metric_source_types
    if include_linked_accounts is not None:
        input_["include_linked_accounts"] = include_linked_accounts
    if slo_owner_aws_account_id is not None:
        input_["slo_owner_aws_account_id"] = slo_owner_aws_account_id
    if metric_source is not None:
        input_["metric_source"] = metric_source

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