Skip to content

ServiceProviderServiceModifyAuthorizationListRequest

Bases: OCIRequest

Requests to change the service provider's service authorization status. The boolean flags are used to authorize or unauthorize services. The response is either SuccessResponse or ErrorResponse.

Attributes:

service_provider_id (str):

group_service_authorization (Optional[List[GroupServiceAuthorization]]):

user_service_authorization (Optional[List[UserServiceAuthorization]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderServiceModifyAuthorizationListRequest(OCIRequest):
    """Requests to change the service provider's service authorization status.
        The boolean flags are used to authorize or unauthorize services.
        The response is either SuccessResponse or ErrorResponse.

    Attributes:

        service_provider_id (str):

        group_service_authorization (Optional[List[GroupServiceAuthorization]]):

        user_service_authorization (Optional[List[UserServiceAuthorization]]):

    """

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

    group_service_authorization: Optional[List[GroupServiceAuthorization]] = field(
        default=None, metadata={"alias": "groupServiceAuthorization"}
    )

    user_service_authorization: Optional[List[UserServiceAuthorization]] = field(
        default=None, metadata={"alias": "userServiceAuthorization"}
    )

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 ServiceProviderServiceModifyAuthorizationListRequest

client = Client()

command = ServiceProviderServiceModifyAuthorizationListRequest(
    service_provider_id=...,
    group_service_authorization=...,
    user_service_authorization=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("ServiceProviderServiceModifyAuthorizationListRequest",
    service_provider_id=...,
    group_service_authorization=...,
    user_service_authorization=...,
)

print(response)