Skip to content

list_user_profiles

list_user_profiles(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    sort_order: Optional[SortOrder] = None,
    sort_by: Optional[UserProfileSortKey] = None,
    domain_id_equals: Optional[DomainId] = None,
    user_profile_name_contains: Optional[UserProfileName] = None,
) -> ListUserProfilesResponse

Lists user profiles.

Parameters:

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

    If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

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

    This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10.

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

    The sort order for the results. The default is Ascending.

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

    The parameter by which to sort the results. The default is CreationTime.

  • domain_id_equals (Optional[DomainId], default: None ) –

    A parameter by which to filter the results.

  • user_profile_name_contains (Optional[UserProfileName], default: None ) –

    A parameter by which to filter the results.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_user_profiles(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
    sort_by: Optional[
        "capo_sagemaker.types.user_profile_sort_key.UserProfileSortKey"
    ] = None,
    domain_id_equals: Optional["capo_sagemaker.types.domain_id.DomainId"] = None,
    user_profile_name_contains: Optional[
        "capo_sagemaker.types.user_profile_name.UserProfileName"
    ] = None,
) -> "capo_sagemaker.types.list_user_profiles_response.ListUserProfilesResponse":
    """<p>Lists user profiles.</p>

    Args:
        next_token: <p>If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.</p>
        max_results: <p>This parameter defines the maximum number of results that can be return in a single response. The <code>MaxResults</code> parameter is an upper bound, not a target. If there are more results available than the value specified, a <code>NextToken</code> is provided in the response. The <code>NextToken</code> indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for <code>MaxResults</code> is 10.</p>
        sort_order: <p>The sort order for the results. The default is Ascending.</p>
        sort_by: <p>The parameter by which to sort the results. The default is CreationTime.</p>
        domain_id_equals: <p>A parameter by which to filter the results.</p>
        user_profile_name_contains: <p>A parameter by which to filter the results.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_user_profiles_request.ListUserProfilesRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_user_profiles_response.ListUserProfilesResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_user_profiles

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListUserProfiles")
    )
    input_: capo_sagemaker.types.list_user_profiles_request.ListUserProfilesRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if domain_id_equals is not None:
        input_["domain_id_equals"] = domain_id_equals
    if user_profile_name_contains is not None:
        input_["user_profile_name_contains"] = user_profile_name_contains

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