Skip to content

describe_tags

describe_tags(
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
    filters: Optional[TagFilters] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeTagsResponse

Retrieves a list of configuration items that have tags as specified by the key-value pairs, name and value, passed to the optional parameter filters.

There are three valid tag filter names:

  • tagKey

  • tagValue

  • configurationId

Also, all configuration items associated with your user that have tags can be listed if you call DescribeTags as is without passing any parameters.

Parameters:

  • filters (Optional[TagFilters], default: None ) –

    You can filter the list using a key-value format. You can separate these items by using logical operators. Allowed filters include tagKey, tagValue, and configurationId.

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

    The total number of items to return in a single page of output. The maximum value is 100.

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

    A token to start the list. Use this token to get the next set of results.

Raises:

Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
def describe_tags(
    self,
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
    filters: Optional[
        "capo_application_discovery_service.types.tag_filters.TagFilters"
    ] = None,
    max_results: Optional[
        "capo_application_discovery_service.types.integer.Integer"
    ] = None,
    next_token: Optional[
        "capo_application_discovery_service.types.next_token.NextToken"
    ] = None,
) -> "capo_application_discovery_service.types.describe_tags_response.DescribeTagsResponse":
    """<p>Retrieves a list of configuration items that have tags as specified by the key-value pairs, name and value, passed to the optional parameter <code>filters</code>.</p> <p>There are three valid tag filter names:</p> <ul> <li> <p>tagKey</p> </li> <li> <p>tagValue</p> </li> <li> <p>configurationId</p> </li> </ul> <p>Also, all configuration items associated with your user that have tags can be listed if you call <code>DescribeTags</code> as is without passing any parameters.</p>

    Args:
        filters: <p>You can filter the list using a <i>key</i>-<i>value</i> format. You can separate these items by using logical operators. Allowed filters include <code>tagKey</code>, <code>tagValue</code>, and <code>configurationId</code>. </p>
        max_results: <p>The total number of items to return in a single page of output. The maximum value is 100.</p>
        next_token: <p>A token to start the list. Use this token to get the next set of results.</p>

    Raises:
        capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
        capo_application_discovery_service.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home Region is not set. Set the home Region to continue.</p>
        capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
        capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
        capo_application_discovery_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified configuration ID was not located. Verify the configuration ID and try again.</p>
        capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
        capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_discovery_service.types.describe_tags_request.DescribeTagsRequest]",
    ) -> OperationResponse[
        "capo_application_discovery_service.types.describe_tags_response.DescribeTagsResponse"
    ]:
        import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.describe_tags

        output, http_response = (
            capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.describe_tags.describe_tags(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTags")
    )
    input_: capo_application_discovery_service.types.describe_tags_request.DescribeTagsRequest = {}
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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