- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Overview
- Permissions Management
- Basics of Docker
-
Image Management
- Pushing an Image Through a Container Engine Client
- Obtaining a Long-Term Valid Docker Login Command
- Obtaining a Long-Term Valid containerd Pull/Push Command
- Uploading an Image Through the SWR Console
- Pulling an Image
- Setting Image Attributes
- Sharing Private Images
- Adding a Trigger
- Adding an Image Retention Policy
- Image Center
- Organization Management
- User Permissions
- Auditing
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
API
- Organization Management
- Image Repository Management
- Image Tag Management
- Shared Account Management
- API Versions
- Organization Permission Management
- Image Permission Management
- Automatic Image Synchronization Task Management
- Trigger Management
- Image Retention Policy Management
- Temporary Login Command
- Quota Management
- Example Applications
- Appendixes
- Change History
- FAQs
- Videos
- SDK Reference
Creating an Account Used for Image Sharing
Function
Create an account used for image sharing. You can share your private images with other users, granting them permissions to pull the images.
URI
POST /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains
For details about parameters, see Table 1.
Request
- Request parameters
Table 2 Request body parameter description Parameter
Mandatory
Type
Description
access_domain
Yes
String
Name of the account used for image sharing.
permit
Yes
String
Currently, only the read permission is supported.
deadline
Yes
String
Valid until (UTC). If the sharing is permanent, the value is forever. Otherwise, the sharing is valid until 00:00:00 of the next day.
description
No
String
Description.
- Example request
POST https://{Endpoint}/v2/manage/namespaces/group/repositories/busybox/access-domains
Body:
{ "access_domain": "domain_name", "permit": "read", "deadline": "2021-10-01T16:00:00.000Z", "description": "description" }
Status Code
Status Code |
Description |
---|---|
201 |
Creation successful. |
400 |
Request error. |
401 |
Authentication failed. |
409 |
The repository has been shared. |
500 |
Internal error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.