Skip to content

UserServiceIsAssignedRequest

Bases: OCIRequest

Request to determine if a UserService or service pack is assigned to the user.

Attributes:

user_id (str):

service_name (Optional[str]):

service_pack_name (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class UserServiceIsAssignedRequest(OCIRequest):
    """Request to determine if a UserService or service pack is assigned to the user.

    Attributes:

        user_id (str):

        service_name (Optional[str]):

        service_pack_name (Optional[str]):

    """

    user_id: str = field(metadata={"alias": "userId"})

    service_name: Optional[str] = field(default=None, metadata={"alias": "serviceName"})

    service_pack_name: Optional[str] = field(
        default=None, metadata={"alias": "servicePackName"}
    )

Responses

:: mercury_ocip.commands.base_command.ErrorResponse

:: mercury_ocip.commands.base_command.SuccessResponse

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import UserServiceIsAssignedRequest

client = Client()

command = UserServiceIsAssignedRequest(
    user_id=...,
    service_name=...,
    service_pack_name=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("UserServiceIsAssignedRequest",
    user_id=...,
    service_name=...,
    service_pack_name=...,
)

print(response)