Creating a ModelArts Agency
Function
This API is used to create a ModelArts agency for ModelArts-dependent services, such as Object Storage Service (OBS), Software Repository for Container (SWR), and Intelligent EdgeFabric (IEF).
This API applies to the following scenarios: When you need to configure permissions for ModelArts to access services such as OBS, SWR, and IEF, you can use this API to create an agency. Before using this API, ensure that you have the permission to create an agency and have corresponding permissions in IAM. After the agency is created, ModelArts is authorized to access services such as OBS, SWR, and IEF for data storage, image pulling, model deployment, and other functions. If you do not have the permission to create an agency or dependent services have not been configured, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
POST /v2/{project_id}/agency
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
agency_name_suffix |
No |
String |
Definition: Suffix of the agency name. The agency name prefix is consistently to be ma_agency. For example, if the value of this parameter is iam-user01, the name of the created agency is ma_agency_iam-user01. The value of this parameter is left blank by default, indicating that an agency named ma_agency is created. Constraints: N/A Range: 0 to 50 Default Value: N/A |
Response Parameters
Status code: 200
OK
None
Example Requests
The following is an example of how to create a ModelArts agency whose name suffix is iam-user01.
POST https://{endpoint}/v2/{project_id}/agency { "agency_name_suffix" : "iam-user01" }
Example Responses
Status code: 200
OK
{ "agency_name" : "ma_agency_iam-user01" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot