wxc_sdk.licenses package
Licenses
An allowance for features and services that are provided to users on a Webex services subscription. Cisco and its partners manage the amount of licenses provided to administrators and users. This license resource can be accessed only by an admin.
- class wxc_sdk.licenses.SiteType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
Webex site type
- control_hub = 'Control Hub managed site'
the site is managed by Webex Control Hub
- linked = 'Linked site'
the site is a linked site
- site_admin = 'Site Admin managed site'
the site is managed by Site Administration
- class wxc_sdk.licenses.License(*, id: str, name: str, totalUnits: int, consumedUnits: int, consumedByUsers: int | None = None, consumedByWorkspaces: int | None = None, subscriptionId: str | None = None, siteUrl: str | None = None, siteType: SiteType | None = None)[source]
Bases:
ApiModel
Webex license
- license_id: str
A unique identifier for the license.
- name: str
Name of the licensed feature.
- total_units: int
Total number of license units allocated.
- consumed_units: int
Total number of license units consumed.
- consumed_by_users: int | None
- consumed_by_workspaces: int | None
- subscription_id: str | None
The subscription ID associated with this license. This ID is used in other systems, such as Webex Control Hub.
- site_url: str | None
The Webex Meetings site associated with this license.
- property webex_calling: bool
is this a Webex Calling license
- property webex_calling_professional: bool
is this a Webex Calling professional license
- property webex_calling_basic: bool
is this a Webex Calling basic license
- property webex_calling_workspaces: bool
is this a Webex Calling workspace license
- class wxc_sdk.licenses.LicensesApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
Licenses
An allowance for features and services that are provided to users on a Webex services subscription. Cisco and its partners manage the amount of licenses provided to administrators and users. License can be assigned only by admins.
Viewing the list of all licenses in your organization and viewing license details requires an administrator auth token with a scope of spark-admin:licenses_read.
Updating the licenses of users requires an administrator auth token with a scope of spark-admin:people_write.
To learn about how to allocate Hybrid Services licenses, see the Managing Hybrid Services guide.
- list(org_id: str | None = None) list[License] [source]
List all licenses for a given organization. If no org_id is specified, the default is the organization of the authenticated user.
Response properties that are not applicable to the license will not be present in the response.
- Parameters:
org_id (str) – List licenses for this organization.
- Returns:
yields
License
instances
- details(license_id) License [source]
Shows details for a license, by ID.
Response properties that are not applicable to the license will not be present in the response.
- Parameters:
license_id (str) – The unique identifier for the license.
- Returns:
license details
- Return type:
- assigned_users(license_id: str, **params) Generator[LicenseUser, None, None] [source]
Get users license is assigned to, by license ID.
Specify the license ID in the licenseId parameter in the URI. Long result sets will be split into pages.
- Parameters:
license_id (str) – The unique identifier for the license.
- assign_licenses_to_users(email: str | None = None, person_id: str | None = None, licenses: List[LicenseRequest] | None = None, site_urls: List[SiteUrlsRequest] | None = None, org_id: str | None = None) UserLicensesResponse [source]
Assign Licenses to Users
Assign licenses and attendee siteUrls to existing users. Only an admin can assign licenses. Only existing users can be assigned a license. Assign meeting licenses to users outside your organization (Status will be pending until the user accepts the invite)
At least one of the following body parameters is required to assign license to the user: email, personId. For Calling license assignment, properties phoneNumber or extension are required. If phoneNumber is not provided then locationId is mandatory.
When assigning licenses and attendee siteUrls to a user who does not belong to the organization, the licenses and siteUrls remain in pending state until the user accepts them. The pendingLicenses and pendingSiteUrls are part of the response.
- Parameters:
email (str) – Email address of the user.
person_id (str) – A unique identifier for the user.
licenses (list[LicenseRequest]) – An array of licenses to be assigned to the user.
site_urls (list[SiteUrlsRequest]) – An array of siteUrls to be assigned to the user.
org_id (str) – The ID of the organization to which the licenses and siteUrls belong. If not specified, the organization ID from the OAuth token is used.
- Return type:
Example
self.api.licenses.assign_licenses_to_users( person_id=new_user.person_id, licenses=[LicenseRequest(id=calling_license_id, properties=LicenseProperties(location_id=target_location.location_id, extension=extension))])
- base = 'licenses'
- class wxc_sdk.licenses.LicenseUser(*, id: str | None = None, type: LicenseUserType | None = None, displayName: str | None = None, email: str | None = None)[source]
Bases:
ApiModel
- id: str | None
A unique identifier for the user. example: Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY
- type: LicenseUserType | None
Indicates if the user is internal or external to the organization. example: INTERNAL
- display_name: str | None
The full name of the user. example: John Andersen
- email: str | None
Email address of the user. example: john.andersen@example.com
- class wxc_sdk.licenses.LicenseUserType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- internal = 'INTERNAL'
User resides in the license-owned organization.
- external = 'EXTERNAL'
User resides outside the license-owned organization.
- class wxc_sdk.licenses.LicenseRequestOperation(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- remove = 'remove'
Remove the license from the user
- add = 'add'
Assign the license to the user
- class wxc_sdk.licenses.LicenseProperties(*, locationId: str | None = None, phoneNumber: str | None = None, extension: str | None = None)[source]
Bases:
ApiModel
- location_id: str | None
The ID of the location for this user. Applicable to Webex Calling license. example: Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzYzNzE1
- phone_number: str | None
Work phone number for the user. Applicable to Webex Calling license. example: 14085267209
- extension: str | None
Webex Calling extension of the user. Applicable to Webex Calling license. example: 133
- class wxc_sdk.licenses.LicenseRequest(*, id: str | None = None, operation: LicenseRequestOperation | None = None, properties: LicenseProperties | None = None)[source]
Bases:
ApiModel
- id: str | None
A unique identifier for the license. example: Y2lzY29zcGFyazovL3VzL0xJQ0VOU0UvOTZhYmMyYWEtM2RjYy0xMWU1LWExNTItZmUzNDgxOWNkYzlh
- operation: LicenseRequestOperation | None
Operation type. The default operation is add if no operation is specified. example: add
- properties: LicenseProperties | None
Properties for the license. Either phoneNumber or extension are mandatory for assigning Webex Calling licenses. If phoneNumber is not provided then locationId is mandatory.
- class wxc_sdk.licenses.SiteAccountType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- attendee = 'attendee'
Attendee account on the site.
- host = 'host'
Host account on the site.
- class wxc_sdk.licenses.SiteUrlsRequest(*, siteUrl: str | None = None, accountType: SiteAccountType | None = None, operation: LicenseRequestOperation | None = None)[source]
Bases:
ApiModel
- site_url: str | None
Attendee access on the site. example: mysite.webex.com
- account_type: SiteAccountType | None
Account type. Only attendee type is supported. For host account, remove attendee and assign the license on that site. example: attendee
- operation: LicenseRequestOperation | None
Operation type. The default operation is add if no operation is specified. example: add
- class wxc_sdk.licenses.SiteResponse(*, siteUrl: str | None = None, accountType: SiteAccountType | None = None)[source]
Bases:
ApiModel
- site_url: str | None
siteUrl assigned to the user. example: mysite.webex.com
- account_type: SiteAccountType | None
Account Type of the site. example: attendee
- class wxc_sdk.licenses.UserLicensesResponse(*, orgId: str | None = None, personId: str | None = None, email: str | None = None, licenses: list[str] | None = None, siteUrls: list[SiteResponse] | None = None, pendingLicenses: list[str] | None = None, pendingSiteUrls: list[SiteResponse] | None = None)[source]
Bases:
ApiModel
- org_id: str | None
The ID of the organization to which this user belongs. example: Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi85NmFiYzJhYS0zZGNjLTExZTUtYTE1Mi1mZTM0ODE5Y2RjOWE
- person_id: str | None
A unique identifier for the user. example: Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mNWIzNjE4Ny1jOGRkLTQ3MjctOGIyZi1mOWM0NDdmMjkwNDY
- email: str | None
The email address of this user. example: john.andersen@example.com
- licenses: list[str] | None
- site_urls: list[SiteResponse] | None
An array of siteUrls and their accountType that are assigned to this user.
- pending_licenses: list[str] | None
- pending_site_urls: list[SiteResponse] | None
An array of siteUrls and their accountType that are in pending state. This is only applicable to users outside the organization.