Skip to content

GroupDnDeactivateListRequest

Bases: OCIRequest

Deactivate a list of activated DNs on a group. The DNs then become available for activation again. It is possible to deactivate either: a single DN, or a list of DNs, or a range of DNs, or any combination thereof. It is not an error to deactivate an already deactivated DN. The response is either SuccessResponse or ErrorResponse.

Attributes:

service_provider_id (str):

group_id (str):

phone_number (Optional[List[str]]):

dn_range (Optional[List[DNRange]]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class GroupDnDeactivateListRequest(OCIRequest):
    """Deactivate a list of activated DNs on a group. The DNs then become available for
        activation again. It is possible to deactivate either: a single DN,
        or a list of DNs, or a range of DNs, or any combination thereof.
        It is not an error to deactivate an already deactivated DN.
        The response is either SuccessResponse or ErrorResponse.

    Attributes:

        service_provider_id (str):

        group_id (str):

        phone_number (Optional[List[str]]):

        dn_range (Optional[List[DNRange]]):

    """

    service_provider_id: str = field(metadata={"alias": "serviceProviderId"})

    group_id: str = field(metadata={"alias": "groupId"})

    phone_number: Optional[List[str]] = field(
        default=None, metadata={"alias": "phoneNumber"}
    )

    dn_range: Optional[List[DNRange]] = field(
        default=None, metadata={"alias": "dnRange"}
    )

Responses

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source 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 GroupDnDeactivateListRequest

client = Client()

command = GroupDnDeactivateListRequest(
    service_provider_id=...,
    group_id=...,
    phone_number=...,
    dn_range=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("GroupDnDeactivateListRequest",
    service_provider_id=...,
    group_id=...,
    phone_number=...,
    dn_range=...,
)

print(response)