Skip to content

list_actions

list_actions(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    source_uri: Optional[SourceUri] = None,
    action_type: Optional[String256] = None,
    created_after: Optional[Timestamp] = None,
    created_before: Optional[Timestamp] = None,
    sort_by: Optional[SortActionsBy] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListActionsResponse

Lists the actions in your account and their properties.

Parameters:

  • source_uri (Optional[SourceUri], default: None ) –

    A filter that returns only actions with the specified source URI.

  • action_type (Optional[String256], default: None ) –

    A filter that returns only actions of the specified type.

  • created_after (Optional[Timestamp], default: None ) –

    A filter that returns only actions created on or after the specified time.

  • created_before (Optional[Timestamp], default: None ) –

    A filter that returns only actions created on or before the specified time.

  • sort_by (Optional[SortActionsBy], default: None ) –

    The property used to sort results. The default value is CreationTime.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order. The default value is Descending.

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

    If the previous call to ListActions didn't return the full set of actions, the call returns a token for getting the next set of actions.

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

    The maximum number of actions to return in the response. The default value is 10.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_actions(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    source_uri: Optional["capo_sagemaker.types.source_uri.SourceUri"] = None,
    action_type: Optional["capo_sagemaker.types.string256.String256"] = None,
    created_after: Optional["capo_sagemaker.types.timestamp.Timestamp"] = None,
    created_before: Optional["capo_sagemaker.types.timestamp.Timestamp"] = None,
    sort_by: Optional["capo_sagemaker.types.sort_actions_by.SortActionsBy"] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
) -> "capo_sagemaker.types.list_actions_response.ListActionsResponse":
    """<p>Lists the actions in your account and their properties.</p>

    Args:
        source_uri: <p>A filter that returns only actions with the specified source URI.</p>
        action_type: <p>A filter that returns only actions of the specified type.</p>
        created_after: <p>A filter that returns only actions created on or after the specified time.</p>
        created_before: <p>A filter that returns only actions created on or before the specified time.</p>
        sort_by: <p>The property used to sort results. The default value is <code>CreationTime</code>.</p>
        sort_order: <p>The sort order. The default value is <code>Descending</code>.</p>
        next_token: <p>If the previous call to <code>ListActions</code> didn't return the full set of actions, the call returns a token for getting the next set of actions.</p>
        max_results: <p>The maximum number of actions to return in the response. The default value is 10.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_actions_request.ListActionsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_actions_response.ListActionsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_actions

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_actions.list_actions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListActions")
    )
    input_: capo_sagemaker.types.list_actions_request.ListActionsRequest = {}
    if source_uri is not None:
        input_["source_uri"] = source_uri
    if action_type is not None:
        input_["action_type"] = action_type
    if created_after is not None:
        input_["created_after"] = created_after
    if created_before is not None:
        input_["created_before"] = created_before
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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