Skip to content

get_account_activity async

get_account_activity(
    activity_id: ActivityId,
    *,
    config_overrides: Optional[AsyncFreeTierClientConfig] = 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

>>> await client.get_account_activity(activity_id='d622f48bf4014286a2686ab10cacfb2e', language_code='en-US')
Source code in docs_src/capo_freetier/_services/async_free_tier.py
async def get_account_activity(
    self,
    activity_id: "capo_freetier.types.activity_id.ActivityId",
    *,
    config_overrides: Optional[AsyncFreeTierClientConfig] = 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

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

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

        (
            output,
            http_response,
        ) = await capo_freetier._operations.aws_free_tier_service.get_account_activity.async_get_account_activity(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output