Skip to content

get_account_activity

get_account_activity(
    activity_id: ActivityId,
    *,
    config_overrides: Optional[FreeTierClientConfig] = None,
    language_code: Optional[LanguageCode] = None,
) -> GetAccountActivityResponse

Returns a specific activity record that is available to the customer.

Parameters:

  • activity_id (ActivityId) –

    A unique identifier that identifies the activity.

  • language_code (Optional[LanguageCode], default: None ) –

    The language code used to return translated title and description fields.

Raises:

Examples:

Fetching an Account activity by id

>>> client.get_account_activity(activity_id='d622f48bf4014286a2686ab10cacfb2e', language_code='en-US')
Source code in docs_src/capo_freetier/_services/free_tier.py
def get_account_activity(
    self,
    activity_id: "capo_freetier.types.activity_id.ActivityId",
    *,
    config_overrides: Optional[FreeTierClientConfig] = None,
    language_code: Optional[
        "capo_freetier.types.language_code.LanguageCode"
    ] = None,
) -> "capo_freetier.types.get_account_activity_response.GetAccountActivityResponse":
    """<p> Returns a specific activity record that is available to the customer. </p>

    Args:
        activity_id: <p> A unique identifier that identifies the activity. </p>
        language_code: <p> The language code used to return translated title and description fields. </p>

    Raises:
        capo_freetier.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of your request.</p>
        capo_freetier.errors.resource_not_found_exception.ResourceNotFoundException: <p> This exception is thrown when the requested resource cannot be found. </p>
        capo_freetier.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_freetier.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_freetier.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Fetching an Account activity by id

        >>> client.get_account_activity(activity_id='d622f48bf4014286a2686ab10cacfb2e', language_code='en-US')
    """

    def _handler(
        req: "OperationRequest[capo_freetier.types.get_account_activity_request.GetAccountActivityRequest]",
    ) -> OperationResponse[
        "capo_freetier.types.get_account_activity_response.GetAccountActivityResponse"
    ]:
        import capo_freetier._operations.aws_free_tier_service.get_account_activity

        output, http_response = (
            capo_freetier._operations.aws_free_tier_service.get_account_activity.get_account_activity(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccountActivity")
    )
    input_: capo_freetier.types.get_account_activity_request.GetAccountActivityRequest = {
        "activity_id": activity_id
    }
    if language_code is not None:
        input_["language_code"] = language_code

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