Skip to content

ServiceProviderAccessDeviceCustomTagModifyRequest

Bases: OCIRequest

Request to modify a static configuration tag for a service provider access device.

The tagValueToEncrypt element can only be used by a system administrator.

The following elements are only used in XS data mode and ignored in AS data mode:
  tagValueToEncrypt

The response is either a SuccessResponse or an ErrorResponse.

Attributes:

service_provider_id (str):

device_name (str):

tag_name (str):

tag_value (Optional[Nillable[str]]):

tag_value_to_encrypt (Optional[Nillable[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderAccessDeviceCustomTagModifyRequest(OCIRequest):
    """Request to modify a static configuration tag for a service provider access device.

        The tagValueToEncrypt element can only be used by a system administrator.

        The following elements are only used in XS data mode and ignored in AS data mode:
          tagValueToEncrypt

        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        service_provider_id (str):

        device_name (str):

        tag_name (str):

        tag_value (Optional[Nillable[str]]):

        tag_value_to_encrypt (Optional[Nillable[str]]):

    """

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

    device_name: str = field(metadata={"alias": "deviceName"})

    tag_name: str = field(metadata={"alias": "tagName"})

    tag_value: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "tagValue"}
    )

    tag_value_to_encrypt: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "tagValueToEncrypt"}
    )

    def __post_init__(self):
        nillable_fields = ["tag_value", "tag_value_to_encrypt"]
        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 ServiceProviderAccessDeviceCustomTagModifyRequest

client = Client()

command = ServiceProviderAccessDeviceCustomTagModifyRequest(
    service_provider_id=...,
    device_name=...,
    tag_name=...,
    tag_value=...,
    tag_value_to_encrypt=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ServiceProviderAccessDeviceCustomTagModifyRequest",
    service_provider_id=...,
    device_name=...,
    tag_name=...,
    tag_value=...,
    tag_value_to_encrypt=...,
)

print(response)