Skip to content

get_topic_attributes

get_topic_attributes(
    topic_arn: topicARN, *, config_overrides: Optional[SNSClientConfig] = None
) -> GetTopicAttributesResponse

Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.

Parameters:

  • topic_arn (topicARN) –

    The ARN of the topic whose properties you want to get.

Raises:

Source code in docs_src/capo_sns/_services/sns.py
def get_topic_attributes(
    self,
    topic_arn: "capo_sns.types.topic_arn.topicARN",
    *,
    config_overrides: Optional[SNSClientConfig] = None,
) -> "capo_sns.types.get_topic_attributes_response.GetTopicAttributesResponse":
    """<p>Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.</p>

    Args:
        topic_arn: <p>The ARN of the topic whose properties you want to get.</p>

    Raises:
        capo_sns.errors.authorization_error_exception.AuthorizationErrorException: <p>Indicates that the user has been denied access to the requested resource.</p>
        capo_sns.errors.internal_error_exception.InternalErrorException: <p>Indicates an internal service error.</p>
        capo_sns.errors.invalid_parameter_exception.InvalidParameterException: <p>Indicates that a request parameter does not comply with the associated constraints.</p>
        capo_sns.errors.invalid_security_exception.InvalidSecurityException: <p>The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.</p>
        capo_sns.errors.not_found_exception.NotFoundException: <p>Indicates that the requested resource does not exist.</p>
        capo_sns.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sns.types.get_topic_attributes_input.GetTopicAttributesInput]",
    ) -> OperationResponse[
        "capo_sns.types.get_topic_attributes_response.GetTopicAttributesResponse"
    ]:
        import capo_sns._operations.amazon_simple_notification_service.get_topic_attributes

        output, http_response = (
            capo_sns._operations.amazon_simple_notification_service.get_topic_attributes.get_topic_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTopicAttributes")
    )
    input_: capo_sns.types.get_topic_attributes_input.GetTopicAttributesInput = {
        "topic_arn": topic_arn
    }

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