Modifying an Agency
Function
This API is provided for the administrator to modify an agency.
The API can be called using both the global endpoint and region-specific endpoints.
URI
PUT /v3.0/OS-AGENCY/agencies/{agency_id}
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        agency_id  | 
      
        Yes  | 
      
        String  | 
      
        Agency ID. For details about how to obtain the agency ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.  | 
     
Request Parameters
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        Content-Type  | 
      
        Yes  | 
      
        String  | 
      
        Fill application/json;charset=utf8 in this field.  | 
     
| 
        X-Auth-Token  | 
      
        Yes  | 
      
        String  | 
      
        Access token issued to a user to bear its identity and permissions. For details about the permissions required by the token, see Actions.  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        Yes  | 
      
        object  | 
      
        Agency information.  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        trust_domain_id  | 
      
        No  | 
      
        String  | 
      
        ID of the delegated account. If both trust_domain_id and trust_domain_name are specified, trust_domain_name takes precedence. At least one of these four parameters must be specified for the agency.  | 
     
| 
        trust_domain_name  | 
      
        No  | 
      
        String  | 
      
        Name of the delegated account. If both trust_domain_id and trust_domain_name are specified, trust_domain_name takes precedence. At least one of these four parameters must be specified for the agency.  | 
     
| 
        description  | 
      
        No  | 
      
        String  | 
      
        Description of the agency, which must contain less than or equal to 255 characters. At least one of these four parameters must be specified for the agency.  | 
     
| 
        duration  | 
      
        No  | 
      
        String  | 
      
        Validity period of the agency. Unit: day. At least one of these four parameters must be specified for the agency. Options: 
  | 
     
Response Parameters
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        object  | 
      
        Agency information.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        create_time  | 
      
        String  | 
      
        Time when the agency was created. 
         NOTE: 
         The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format, for example, 2023-06-28T08:56:33.710000Z. For details about the date and timestamp formats, see ISO-8601.  | 
     
| 
        description  | 
      
        String  | 
      
        Description of the agency.  | 
     
| 
        domain_id  | 
      
        String  | 
      
        ID of the delegating account.  | 
     
| 
        duration  | 
      
        String  | 
      
        Validity period of the agency. Unit: hour. 
  | 
     
| 
        expire_time  | 
      
        String  | 
      
        Expiration time of the agency. The value null indicates that the agency has unlimited validity. 
         NOTE: 
         The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format, for example, 2023-06-28T08:56:33.710000Z. For details about the date and timestamp formats, see ISO-8601.  | 
     
| 
        id  | 
      
        String  | 
      
        Agency ID.  | 
     
| 
        name  | 
      
        String  | 
      
        Agency name.  | 
     
| 
        trust_domain_id  | 
      
        String  | 
      
        ID of the delegated account.  | 
     
| 
        trust_domain_name  | 
      
        String  | 
      
        Name of the delegated account.  | 
     
Example Request
Request for changing the validity period of an agency to one day.
PUT https://iam.myhuaweicloud.eu/v3.0/OS-AGENCY/agencies/{agency_id}
  {
    "agency": {
        "trust_domain_id": "b2cd82a33fb043dc9304bf72...",
        "trust_domain_name": "IAMDomainB",
        "description": "IAMDescription",
        "duration": "ONEDAY"
    }
}
 Example Response
Status code: 200
The agency is modified successfully.
{
    "agency": {
        "description": "IAMDescription",
        "trust_domain_id": "b2cd82a33fb043dc9304bf72a0...",
        "id": "0760a9e2a60026664f1fc0031f9f205e",
        "duration": "ONEDAY",
        "create_time": "2020-01-04T03:37:16.000000",
        "expire_time": "2020-01-21T13:06:11.241588",
        "domain_id": "d78cbac186b744899480f25...",
        "name": "IAMAgency"
    }
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        The agency is modified successfully.  | 
     
| 
        400  | 
      
        Invalid parameters.  | 
     
| 
        401  | 
      
        Authentication failed.  | 
     
| 
        403  | 
      
        Access denied.  | 
     
| 
        404  | 
      
        The requested resource cannot be found.  | 
     
| 
        500  | 
      
        Internal server error.  | 
     
Error Codes
None
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.