Skip to content

describe_user_profile

describe_user_profile(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    domain_id: Optional[DomainId] = None,
    user_profile_name: Optional[UserProfileName] = None,
) -> DescribeUserProfileResponse

Describes a user profile. For more information, see CreateUserProfile.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def describe_user_profile(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    domain_id: Optional["capo_sagemaker.types.domain_id.DomainId"] = None,
    user_profile_name: Optional[
        "capo_sagemaker.types.user_profile_name.UserProfileName"
    ] = None,
) -> "capo_sagemaker.types.describe_user_profile_response.DescribeUserProfileResponse":
    """<p>Describes a user profile. For more information, see <code>CreateUserProfile</code>.</p>

    Args:
        domain_id: <p>The domain ID.</p>
        user_profile_name: <p>The user profile name. This value is not case sensitive.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        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.describe_user_profile_request.DescribeUserProfileRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.describe_user_profile_response.DescribeUserProfileResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.describe_user_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeUserProfile")
    )
    input_: capo_sagemaker.types.describe_user_profile_request.DescribeUserProfileRequest = {}
    if domain_id is not None:
        input_["domain_id"] = domain_id
    if user_profile_name is not None:
        input_["user_profile_name"] = user_profile_name

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