Skip to content

SystemEmergencyCallDDoSProtectionModifyRequest

Bases: OCIRequest

Modify the Emergency Call DDos Protection settings. The response is either SuccessResponse or an ErrorResponse.

Attributes:

enabled (Optional[bool]):

sample_interval_seconds (Optional[int]):

protection_rate (Optional[Nillable[int]]):

protection_action (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class SystemEmergencyCallDDoSProtectionModifyRequest(OCIRequest):
    """Modify the Emergency Call DDos Protection settings.
      The response is either SuccessResponse or an ErrorResponse.

    Attributes:

        enabled (Optional[bool]):

        sample_interval_seconds (Optional[int]):

        protection_rate (Optional[Nillable[int]]):

        protection_action (Optional[str]):

    """

    enabled: Optional[bool] = field(default=None, metadata={"alias": "enabled"})

    sample_interval_seconds: Optional[int] = field(
        default=None, metadata={"alias": "sampleIntervalSeconds"}
    )

    protection_rate: Optional[Nillable[int]] = field(
        default=None, metadata={"alias": "protectionRate"}
    )

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

    def __post_init__(self):
        nillable_fields = ["protection_rate"]
        for field_name in nillable_fields:
            value = getattr(self, field_name)
            if value == "" or value == "None":
                object.__setattr__(self, field_name, OCINil)

Responses

Bases: OCIResponse

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

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import SystemEmergencyCallDDoSProtectionModifyRequest

client = Client()

command = SystemEmergencyCallDDoSProtectionModifyRequest(
    enabled=...,
    sample_interval_seconds=...,
    protection_rate=...,
    protection_action=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("SystemEmergencyCallDDoSProtectionModifyRequest",
    enabled=...,
    sample_interval_seconds=...,
    protection_rate=...,
    protection_action=...,
)

print(response)