Skip to content

ServiceProviderServiceGetAuthorizationRequest

Bases: OCIRequest

Requests the service provider's service authorization information for a specific service or service pack. The response is either ServiceProviderServiceGetAuthorizationResponse or ErrorResponse.

The following element is used in AS mode and triggers an ErrorResponse in XS data mode:
  servicePackName

Attributes:

service_provider_id (str):

user_service_name (Optional[str]):

group_service_name (Optional[str]):

service_pack_name (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderServiceGetAuthorizationRequest(OCIRequest):
    """Requests the service provider's service authorization information for a specific service or service pack.
        The response is either ServiceProviderServiceGetAuthorizationResponse or ErrorResponse.

        The following element is used in AS mode and triggers an ErrorResponse in XS data mode:
          servicePackName

    Attributes:

        service_provider_id (str):

        user_service_name (Optional[str]):

        group_service_name (Optional[str]):

        service_pack_name (Optional[str]):

    """

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

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

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

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

Responses

Bases: OCIDataResponse

Response to ServiceProviderServiceGetAuthorizationRequest. If the feature was never licensed, then "authorized" is false and the remaining elements are not returned. If the service pack is available for use, "authorized" is true. "authorizedQuantity" can be unlimited or a quantity. In the case of a service pack, "authorizedQuantity" is the service pack's quantity. "authorizable" is applicable for user services and group services; it is not returned for service packs.

Attributes:

authorized (bool):

authorized_quantity (Optional[UnboundedNonNegativeInt]):

used_quantity (Optional[UnboundedNonNegativeInt]):

authorizable (Optional[bool]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderServiceGetAuthorizationResponse(OCIDataResponse):
    """Response to ServiceProviderServiceGetAuthorizationRequest.
        If the feature was never licensed, then \"authorized\" is false and the remaining elements are not returned.
        If the service pack is available for use, \"authorized\" is true.
        \"authorizedQuantity\" can be unlimited or a quantity. In the case of a service pack, \"authorizedQuantity\" is the service pack's quantity.
        \"authorizable\" is applicable for user services and group services; it is not returned for service packs.

    Attributes:

        authorized (bool):

        authorized_quantity (Optional[UnboundedNonNegativeInt]):

        used_quantity (Optional[UnboundedNonNegativeInt]):

        authorizable (Optional[bool]):

    """

    authorized: bool = field(metadata={"alias": "authorized"})

    authorized_quantity: Optional[UnboundedNonNegativeInt] = field(
        default=None, metadata={"alias": "authorizedQuantity"}
    )

    used_quantity: Optional[UnboundedNonNegativeInt] = field(
        default=None, metadata={"alias": "usedQuantity"}
    )

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

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

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 ServiceProviderServiceGetAuthorizationRequest

client = Client()

command = ServiceProviderServiceGetAuthorizationRequest(
    service_provider_id=...,
    user_service_name=...,
    group_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("ServiceProviderServiceGetAuthorizationRequest",
    service_provider_id=...,
    user_service_name=...,
    group_service_name=...,
    service_pack_name=...,
)

print(response)