UserModifyGroupIdRequest
Bases: OCIRequest
Move the user from one group to another group within the same enterprise. If evaluateOnly is specified, no actual move will happen. The command only tests the move and reports the impacts or possible conditions preventing the move. The response is either UserModifyGroupIdResponse or ErrorResponse.
Attributes:
user_id (str):
new_group_id (str):
evaluate_only (Optional[bool]):
Source code in src/mercury_ocip_fast/commands/commands.py
| @dataclass(kw_only=True)
class UserModifyGroupIdRequest(OCIRequest):
"""Move the user from one group to another group within the same enterprise.
If evaluateOnly is specified, no actual move will happen. The command only tests the move and reports the impacts or possible conditions preventing the move.
The response is either UserModifyGroupIdResponse or ErrorResponse.
Attributes:
user_id (str):
new_group_id (str):
evaluate_only (Optional[bool]):
"""
user_id: str = field(metadata={"alias": "userId"})
new_group_id: str = field(metadata={"alias": "newGroupId"})
evaluate_only: Optional[bool] = field(
default=None, metadata={"alias": "evaluateOnly"}
)
|
Responses
Bases: OCIDataResponse
Response to UserModifyGroupIdRequest. error indicates the failing conditions preventing the user move. impact indicates any change to user and group as the result of a user move.
Attributes:
error (Optional[List[UserMoveMessage]]):
impact (Optional[List[UserMoveMessage]]):
Source code in src/mercury_ocip_fast/commands/commands.py
| @dataclass(kw_only=True)
class UserModifyGroupIdResponse(OCIDataResponse):
"""Response to UserModifyGroupIdRequest.
error indicates the failing conditions preventing the user move.
impact indicates any change to user and group as the result of a user move.
Attributes:
error (Optional[List[UserMoveMessage]]):
impact (Optional[List[UserMoveMessage]]):
"""
error: Optional[List[UserMoveMessage]] = field(
default=None, metadata={"alias": "error"}
)
impact: Optional[List[UserMoveMessage]] = field(
default=None, metadata={"alias": "impact"}
)
|
Bases: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class ErrorResponse(OCIResponse):
errorCode: Optional[int] = None
summary: str
summaryEnglish: str
detail: Optional[str] = None
|
Example Usage
from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import UserModifyGroupIdRequest
client = Client()
command = UserModifyGroupIdRequest(
user_id=...,
new_group_id=...,
evaluate_only=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip_fast.client import Client
client = Client()
response = client.raw_command("UserModifyGroupIdRequest",
user_id=...,
new_group_id=...,
evaluate_only=...,
)
print(response)