Sagemaker User Profile Waiter
Describe the feature
Add a UserProfileInService waiter to the list of out-of-box waiters of the Sagemaker Client
Use Case
In the SageMaker API, User Profile objects aren't immediately available upon creation. As per DescribeUserProfile action, the Status is a state machine, initially set to Pending, which may terminate in InService or Failed. Until the user profile reach InService, it's impossible to create application Spaces owned by the aforementioned user profile.
Having a corresponding waiter in the SDK out-of-box would be convenient in situations when one wants to programmatically provision and pre-configure Sagemaker environements for users, for example reactively in response to central service directory request.
Proposed Solution
A custom waiter model was able to achieve that:
model = botocore.waiter.WaiterModel({
"version": 2,
"waiters": {
"UserProfileInService": {
"delay": 5,
"operation": "DescribeUserProfile",
"maxAttempts": 20,
"acceptors": [
{
"state": "success",
"matcher": "path",
"argument": "Status",
"expected": "InService"
},
{
"state": "failure",
"matcher": "path",
"argument": "Status",
"expected": "Failed"
}
]
}
}
})
waiter = botocore.waiter.create_waiter_with_client("UserProfileInService", model, sagemaker_client)
Other Information
No response
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
SDK version used
1.37.34
Environment details (OS name and version, etc.)
MacOS 14.7
Hello @daleksandrov-adsk, thanks for reaching out. I have reached out to the SageMaker Service team about this feature request. There are no timelines for now on the release although please ensure to check or https://raw.githubusercontent.com/boto/boto3/develop/CHANGELOG.rst for any updates. If you have any questions, please do let me know. Thanks.
For Internal Tracking: P250152333
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.
Hello, I have forwarded the request to the team. Currently, there is no estimate on when the team is going to release the feature. Although moving forward, please check our changelog for any updates https://raw.githubusercontent.com/boto/boto3/develop/CHANGELOG.rst and https://github.com/boto/botocore/blob/develop/CHANGELOG.rst. Thank you.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.