### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- com Package »
- vmware Package »
- vapi Package »
- metadata Package »

# privilege Package

## `privilege` Package

## `service_client` Module

The `com.vmware.vapi.metadata.privilege.service_client` module provides classes to retrieve privilege information for operation elements.

class `com.vmware.vapi.metadata.privilege.service_client.``Operation`(config)

  Bases: `vmware.vapi.bindings.stub.VapiInterface`

  The `Operation` class provides methods to retrieve privilege information of an operation element.

  An operation element is said to contain privilege information if there are any privileges assigned to the operation element or if one of the parameter elements contained in it has privileges assigned in privilege definition file.

  Parameters: | config (`vmware.vapi.bindings.stub.StubConfiguration`) – Configuration to be used for creating the stub.

  `RESOURCE_TYPE` = 'com.vmware.vapi.operation'

    Resource type for operation.

  `get`(service_id, operation_id)

    Retrieves the privilege information about an operation element corresponding to `operation_id` contained in the service element corresponding to `service_id`.

    Parameters: | service_id (`str`) – Identifier of the service element. The parameter must be an identifier for the resource type: `com.vmware.vapi.service`. operation_id (`str`) – Identifier of the operation element. The parameter must be an identifier for the resource type: `com.vmware.vapi.operation`.
    Return type: | `com.vmware.vapi.metadata.privilege_client.OperationInfo`
    Returns: | The `com.vmware.vapi.metadata.privilege_client.OperationInfo` instance that corresponds to `operation_id`.
    Raise : | `com.vmware.vapi.std.errors_client.NotFound` if the service element associated with `service_id` does not exist.
    Raise : | `com.vmware.vapi.std.errors_client.NotFound` if the operation element associated with `operation_id` does not exist.
    Raise : | `com.vmware.vapi.std.errors_client.NotFound` if the operation element associated with `operation_id` does not have any privilege information.

  `list`(service_id)

    Returns the identifiers for the operation elements contained in the service element corresponding to `service_id` that have privilege information.

    Parameters: | service_id (`str`) – Identifier of the service element. The parameter must be an identifier for the resource type: `com.vmware.vapi.service`.
    Return type: | `list` of `str`
    Returns: | List of identifiers for the operation elements contained in the service element that have privilege information. The return value will contain identifiers for the resource type: `com.vmware.vapi.operation`.
    Raise : | `com.vmware.vapi.std.errors_client.NotFound` if the service element associated with `service_id` does not have any operation elements that have privilege information.

### Navigation

- index
- modules |
- next |
- previous |
- vSphere Automation SDK for Python 6.5.0 documentation »
- com Package »
- vmware Package »
- vapi Package »
- metadata Package »