code
string | signature
string | docstring
string | loss_without_docstring
float64 | loss_with_docstring
float64 | factor
float64 |
|---|---|---|---|---|---|
if after is None:
raise ValueError("Invalid value for `after`, must not be `None`")
if after is not None and not re.search('^[A-Za-z0-9]{32}', after):
raise ValueError("Invalid value for `after`, must be a follow pattern or equal to `/^[A-Za-z0-9]{32}/`")
self._after = after
|
def after(self, after)
|
Sets the after of this EnrollmentIdentities.
ID
:param after: The after of this EnrollmentIdentities.
:type: str
| 1.839804
| 1.774472
| 1.036818
|
if order is None:
raise ValueError("Invalid value for `order`, must not be `None`")
allowed_values = ["ASC", "DESC"]
if order not in allowed_values:
raise ValueError(
"Invalid value for `order` ({0}), must be one of {1}"
.format(order, allowed_values)
)
self._order = order
|
def order(self, order)
|
Sets the order of this EnrollmentIdentities.
:param order: The order of this EnrollmentIdentities.
:type: str
| 1.617602
| 1.518186
| 1.065483
|
allowed_values = ["ok", "warning", "error"]
if health_indicator not in allowed_values:
raise ValueError(
"Invalid value for `health_indicator` ({0}), must be one of {1}"
.format(health_indicator, allowed_values)
)
self._health_indicator = health_indicator
|
def health_indicator(self, health_indicator)
|
Sets the health_indicator of this UpdateCampaign.
An indication to the condition of the campaign.
:param health_indicator: The health_indicator of this UpdateCampaign.
:type: str
| 1.786646
| 1.816718
| 0.983447
|
if quota is None:
raise ValueError("Invalid value for `quota`, must not be `None`")
if quota is not None and quota < 0:
raise ValueError("Invalid value for `quota`, must be a value greater than or equal to `0`")
self._quota = quota
|
def quota(self, quota)
|
Sets the quota of this ServicePackageQuota.
Available quota for the service package.
:param quota: The quota of this ServicePackageQuota.
:type: int
| 1.71489
| 1.7058
| 1.005329
|
if enrolled_device_id is None:
raise ValueError("Invalid value for `enrolled_device_id`, must not be `None`")
if enrolled_device_id is not None and not re.search('^[A-Za-z0-9]{32}', enrolled_device_id):
raise ValueError("Invalid value for `enrolled_device_id`, must be a follow pattern or equal to `/^[A-Za-z0-9]{32}/`")
self._enrolled_device_id = enrolled_device_id
|
def enrolled_device_id(self, enrolled_device_id)
|
Sets the enrolled_device_id of this EnrollmentIdentity.
The ID of the device in the Device Directory once it has been registered.
:param enrolled_device_id: The enrolled_device_id of this EnrollmentIdentity.
:type: str
| 1.516696
| 1.474707
| 1.028473
|
if news_dir is None:
from generate_news import news_dir
news_dir = os.path.abspath(news_dir)
# assume the name of the remote alias is just 'origin'
remote_alias = 'origin'
# figure out what the 'default branch' for the origin is
origin_stats = subprocess.check_output(
['git', 'remote', 'show', remote_alias],
cwd=news_dir
).decode()
# the output of the git command looks like:
# ' HEAD branch: master'
origin_branch = 'master' # unless we prove otherwise
for line in origin_stats.splitlines():
if 'head branch:' in line.lower():
origin_branch = line.split(':', 1)[-1].strip()
break
origin = '%s/%s' % (remote_alias, origin_branch)
# figure out the current branch
current_branch = subprocess.check_output(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
cwd=news_dir
).decode().strip()
print(':: Finding news in `%s` to add to remote `%s`' % (current_branch, origin))
diff_command = ['git', 'diff', '%s...%s' % (origin, current_branch), '--name-status', news_dir]
file_diff = subprocess.check_output(
diff_command,
cwd=news_dir
).decode()
# the output of the git command looks like:
# 'A docs/news/789.feature'
# [optional] ensure we have an addition, rather than just modify/delete
added_news = [line for line in file_diff.splitlines() if line.lower().strip().startswith('a')]
# pass or fail
if not added_news:
print(
'! Error: Uh-oh, did not find any news files!\n'
'! Please add a news file to `%s`\n'
'+ File diff:\n%s\n'
'{} Git diff command:\n`%s`\n' % (
news_dir,
file_diff.strip(),
subprocess.list2cmdline(diff_command)
)
)
exit(1) # exit with an error status, no need for a traceback
print(':: %s new files in `%s`' % (len(added_news), news_dir))
|
def main(news_dir=None)
|
Checks for existence of a new newsfile
| 3.798532
| 3.772165
| 1.00699
|
return self.add_account_api_key_to_groups_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
else:
(data) = self.add_account_api_key_to_groups_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
return data
|
def add_account_api_key_to_groups(self, account_id, api_key, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add API key to a list of groups. # noqa: E501
An endpoint for adding API key to groups. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apikey}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_account_api_key_to_groups(account_id, api_key, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be added to the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.407829
| 1.853371
| 0.759604
|
return self.add_account_certificate_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_account_certificate_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def add_account_certificate(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Upload new trusted certificate. # noqa: E501
An endpoint for uploading new trusted certificates. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/trusted-certificates -d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_account_certificate(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param TrustedCertificateRootReq body: A trusted certificate object with attributes, signature is optional. (required)
:return: TrustedCertificateResp
If the method is called asynchronously,
returns the request thread.
| 1.539762
| 2.041054
| 0.754396
|
return self.add_account_user_to_groups_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_account_user_to_groups_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
return data
|
def add_account_user_to_groups(self, account_id, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add user to a list of groups. # noqa: E501
An endpoint for adding user to groups. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_account_user_to_groups(account_id, user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user to be added to the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.426798
| 1.922966
| 0.741977
|
return self.add_subjects_to_account_group_with_http_info(account_id, group_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_subjects_to_account_group_with_http_info(account_id, group_id, body, **kwargs) # noqa: E501
return data
|
def add_subjects_to_account_group(self, account_id, group_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add members to a group. # noqa: E501
An endpoint for adding users and API keys to groups. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID} -d '{\"users\": [0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_subjects_to_account_group(account_id, group_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group to be updated. (required)
:param SubjectList body: A list of users and API keys to be added to the group. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.430567
| 1.94754
| 0.734551
|
return self.check_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
else:
(data) = self.check_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
return data
|
def check_account_api_key(self, account_id, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Check the API key. # noqa: E501
An endpoint for checking API key. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.check_account_api_key(account_id, api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The API key to be checked. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.469585
| 1.890799
| 0.77723
|
return self.create_account_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.create_account_with_http_info(body, **kwargs) # noqa: E501
return data
|
def create_account(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new account. # noqa: E501
An endpoint for creating a new account. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts -d '{\"display_name\": \"MyAccount1\", \"admin_name\": \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_account(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param AccountCreationReq body: Details of the account to be created. (required)
:param str action: Action, either 'create' or 'enroll'. <ul><li>'create' creates the account where its admin user has ACTIVE status if admin_password was defined in the request, or RESET status if no admin_password was defined. If the user already exists, its status is not modified. </li><li>'enroll' creates the account where its admin user has ENROLLING status. If the user already exists, its status is not modified. Email to finish the enrollment or to notify the existing user about the new account is sent to the admin_email defined in the request. </li></ul>
:return: AccountCreationResp
If the method is called asynchronously,
returns the request thread.
| 1.607034
| 2.07828
| 0.773252
|
return self.create_account_api_key_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.create_account_api_key_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def create_account_api_key(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new API key. # noqa: E501
An endpoint for creating a new API key. There is no default value for the owner ID and it must be from the same account where the new API key is created. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys -d '{\"name\": \"MyKey1\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_account_api_key(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param ApiKeyInfoReq body: Details of the API key to be created. (required)
:return: ApiKeyInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.490605
| 2.009816
| 0.741662
|
return self.create_account_group_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.create_account_group_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def create_account_group(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new group. # noqa: E501
An endpoint for creating a new group. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups -d '{\"name\": \"MyGroup1\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_account_group(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param GroupCreationInfo body: Details of the group to be created. (required)
:return: GroupSummary
If the method is called asynchronously,
returns the request thread.
| 1.523927
| 2.022091
| 0.753639
|
return self.create_account_invitation_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.create_account_invitation_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def create_account_invitation(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a user invitation. # noqa: E501
An endpoint for inviting a new or an existing user to join the account. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account-id}/user-invitations -d {\"email\": \"myemail@company.com\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_account_invitation(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param UserInvitationReq body: A user invitation object with attributes. (required)
:return: UserInvitationResp
If the method is called asynchronously,
returns the request thread.
| 1.501873
| 1.975876
| 0.760105
|
return self.create_account_user_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.create_account_user_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def create_account_user(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new user. # noqa: E501
An endpoint for creating or inviting a new user to the account. In case of invitation email address is used only, other attributes are set in the 2nd step. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users -d {\"email\": \"myemail@company.com\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_account_user(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param UserInfoReq body: A user object with attributes. (required)
:param str action: Create or invite user.
:return: UserInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.513225
| 2.005908
| 0.754384
|
return self.delete_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
else:
(data) = self.delete_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
return data
|
def delete_account_api_key(self, account_id, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete the API key. # noqa: E501
An endpoint for deleting an API key. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apikey} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_account_api_key(account_id, api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.461268
| 1.910331
| 0.764929
|
return self.delete_account_certificate_with_http_info(account_id, cert_id, **kwargs) # noqa: E501
else:
(data) = self.delete_account_certificate_with_http_info(account_id, cert_id, **kwargs) # noqa: E501
return data
|
def delete_account_certificate(self, account_id, cert_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete trusted certificate by ID. # noqa: E501
An endpoint for deleting the trusted certificate. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/trusted-certificates/{cert-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_account_certificate(account_id, cert_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str cert_id: The ID of the trusted certificate to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.498522
| 1.937726
| 0.77334
|
return self.delete_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.delete_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def delete_account_group(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a group. # noqa: E501
An endpoint for deleting a group. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_account_group(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.488633
| 1.956273
| 0.760953
|
return self.delete_account_invitation_with_http_info(account_id, invitation_id, **kwargs) # noqa: E501
else:
(data) = self.delete_account_invitation_with_http_info(account_id, invitation_id, **kwargs) # noqa: E501
return data
|
def delete_account_invitation(self, account_id, invitation_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a user invitation. # noqa: E501
An endpoint for deleting an active user invitation which has been sent for a new or an existing user to join the account. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account-id}/user-invitations/{invitation-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_account_invitation(account_id, invitation_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str invitation_id: The ID of the invitation to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.461213
| 1.95595
| 0.74706
|
return self.delete_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
else:
(data) = self.delete_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
return data
|
def delete_account_user(self, account_id, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a user. # noqa: E501
An endpoint for deleting a user. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_account_user(account_id, user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.477873
| 1.941402
| 0.76124
|
return self.get_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
else:
(data) = self.get_account_api_key_with_http_info(account_id, api_key, **kwargs) # noqa: E501
return data
|
def get_account_api_key(self, account_id, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get API key details. # noqa: E501
An endpoint for retrieving API key details. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_api_key(account_id, api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be retrieved. (required)
:return: ApiKeyInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.440619
| 1.948198
| 0.739462
|
return self.get_account_certificate_with_http_info(account_id, cert_id, **kwargs) # noqa: E501
else:
(data) = self.get_account_certificate_with_http_info(account_id, cert_id, **kwargs) # noqa: E501
return data
|
def get_account_certificate(self, account_id, cert_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get trusted certificate by ID. # noqa: E501
An endpoint for retrieving a trusted certificate by ID. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/trusted-certificates/{cert-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_certificate(account_id, cert_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str cert_id: The ID of the trusted certificate to be retrieved. (required)
:return: TrustedCertificateInternalResp
If the method is called asynchronously,
returns the request thread.
| 1.482178
| 1.942648
| 0.762968
|
return self.get_account_group_summary_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.get_account_group_summary_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def get_account_group_summary(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get group information. # noqa: E501
An endpoint for getting general information about the group. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_group_summary(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group to be retrieved. (required)
:return: GroupSummary
If the method is called asynchronously,
returns the request thread.
| 1.45515
| 1.912094
| 0.761024
|
return self.get_account_info_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_account_info_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_account_info(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get account info. # noqa: E501
Returns detailed information about the account. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{account-id} -H 'Authorization: Bearer API_KEY'`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_info(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: The ID of the account to be fetched. (required)
:param str include: Comma separated additional data to return. Currently supported: limits, policies, sub_accounts
:param str properties: Property name to be returned from account specific properties.
:return: AccountInfo
If the method is called asynchronously,
returns the request thread.
| 1.533625
| 2.019352
| 0.759464
|
return self.get_account_invitation_with_http_info(account_id, invitation_id, **kwargs) # noqa: E501
else:
(data) = self.get_account_invitation_with_http_info(account_id, invitation_id, **kwargs) # noqa: E501
return data
|
def get_account_invitation(self, account_id, invitation_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Details of a user invitation. # noqa: E501
An endpoint for retrieving the details of an active user invitation sent for a new or an existing user to join the account. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{account-id}/user-invitations/{invitation-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_invitation(account_id, invitation_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str invitation_id: The ID of the invitation to be retrieved. (required)
:return: UserInvitationResp
If the method is called asynchronously,
returns the request thread.
| 1.451622
| 1.979753
| 0.733234
|
return self.get_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
else:
(data) = self.get_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
return data
|
def get_account_user(self, account_id, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Details of the user. # noqa: E501
An endpoint for retrieving details of the user. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{userID} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_account_user(account_id, user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user to be retrieved. (required)
:return: UserInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.4672
| 1.977308
| 0.742019
|
return self.get_all_account_api_keys_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_account_api_keys_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_all_account_api_keys(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get all API keys. # noqa: E501
An endpoint for retrieving the API keys in an array, optionally filtered by the owner. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_account_api_keys(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str key__eq: API key filter.
:param str owner__eq: Owner name filter.
:return: ApiKeyInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.478771
| 1.957914
| 0.755279
|
return self.get_all_account_certificates_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_account_certificates_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_all_account_certificates(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get all trusted certificates. # noqa: E501
An endpoint for retrieving trusted certificates in an array. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/trusted-certificates -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_account_certificates(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str name__eq: Filter for certificate name
:param str service__eq: Filter for service
:param int expire__eq: Filter for expire
:param int device_execution_mode__eq: Filter for developer certificates
:param int device_execution_mode__neq: Filter for not developer certificates
:param str owner__eq: Owner name filter
:param bool enrollment_mode__eq: Enrollment mode filter
:param str issuer__like: Filter for issuer. Finds all matches where the filter value is a case insensitive substring of the result. Example: issuer__like=cn=iss matches CN=issuer.
:param str subject__like: Filter for subject. Finds all matches where the filter value is a case insensitive substring of the result. Example: subject__like=cn=su matches CN=subject.
:return: TrustedCertificateInternalRespList
If the method is called asynchronously,
returns the request thread.
| 1.502221
| 1.863657
| 0.806061
|
return self.get_all_account_groups_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_account_groups_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_all_account_groups(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get all group information. # noqa: E501
An endpoint for retrieving all group information. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_account_groups(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str name__eq: Filter for group name
:return: GroupSummaryList
If the method is called asynchronously,
returns the request thread.
| 1.492838
| 1.963673
| 0.760227
|
return self.get_all_account_invitations_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_account_invitations_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_all_account_invitations(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get the details of all the user invitations. # noqa: E501
An endpoint for retrieving the details of all the active user invitations sent for new or existing users to join the account. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{account-id}/user-invitations -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_account_invitations(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:return: UserInvitationRespList
If the method is called asynchronously,
returns the request thread.
| 1.48647
| 1.970226
| 0.754467
|
return self.get_all_account_users_with_http_info(account_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_account_users_with_http_info(account_id, **kwargs) # noqa: E501
return data
|
def get_all_account_users(self, account_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get all user details. # noqa: E501
An endpoint for retrieving details of all users. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_account_users(account_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str email__eq: Filter for email address
:param str status__eq: Filter for status
:param str status__in: An optional filter for getting users with a specified set of statuses.
:param str status__nin: An optional filter for excluding users with a specified set of statuses.
:return: UserInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.494651
| 1.92766
| 0.775371
|
return self.get_all_accounts_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_all_accounts_with_http_info(**kwargs) # noqa: E501
return data
|
def get_all_accounts(self, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get all accounts. # noqa: E501
Returns an array of account objects, optionally filtered by status and tier level. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts -H 'Authorization: Bearer API_KEY'`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_accounts(asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str status__eq: An optional filter for account status, ENROLLING, ACTIVE, RESTRICTED or SUSPENDED.
:param str status__in: An optional filter for getting accounts with a specified set of statuses.
:param str status__nin: An optional filter for excluding accounts with a specified set of statuses.
:param str tier__eq: An optional filter for tier level, must be 0, 1, 2, 98, 99 or omitted.
:param str parent__eq: An optional filter for parent account ID.
:param str end_market__eq: An optional filter for account end market.
:param str country__like: An optional filter for account country. Finds all matches where the filter value is a case insensitive substring of the result. Example: country__like=LAND matches Ireland.
:param int limit: The number of results to return (2-1000), default is 1000.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC. Default value is ASC
:param str include: Comma separated additional data to return. Currently supported: limits, policies, sub_accounts
:param str format: Format information for the response to the query, supported: format=breakdown.
:param str properties: Property name to be returned from account specific properties.
:return: AccountInfoList
If the method is called asynchronously,
returns the request thread.
| 1.603309
| 2.224854
| 0.720636
|
return self.get_api_keys_of_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.get_api_keys_of_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def get_api_keys_of_account_group(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get API keys of a group. # noqa: E501
An endpoint for listing the API keys of the group with details. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID}/api-keys -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_api_keys_of_account_group(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group whose API keys are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:return: ApiKeyInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.411644
| 1.839423
| 0.767438
|
return self.get_groups_of_account_apikey_with_http_info(account_id, api_key, **kwargs) # noqa: E501
else:
(data) = self.get_groups_of_account_apikey_with_http_info(account_id, api_key, **kwargs) # noqa: E501
return data
|
def get_groups_of_account_apikey(self, account_id, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get groups of the API key. # noqa: E501
An endpoint for retrieving groups of the API key. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey}/groups -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_groups_of_account_apikey(account_id, api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key whose details are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:return: GroupSummaryList
If the method is called asynchronously,
returns the request thread.
| 1.422076
| 1.856869
| 0.765846
|
return self.get_groups_of_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
else:
(data) = self.get_groups_of_account_user_with_http_info(account_id, user_id, **kwargs) # noqa: E501
return data
|
def get_groups_of_account_user(self, account_id, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get groups of the user. # noqa: E501
An endpoint for retrieving groups of the user. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id}/groups -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_groups_of_account_user(account_id, user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user whose details are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:return: GroupSummaryList
If the method is called asynchronously,
returns the request thread.
| 1.415715
| 1.863436
| 0.759734
|
return self.get_users_of_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.get_users_of_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def get_users_of_account_group(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get users of a group. # noqa: E501
An endpoint for listing users of the group with details. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID}/users -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_users_of_account_group(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group whose users are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str status__eq: An optional filter for getting users by status.
:param str status__in: An optional filter for getting users with a specified set of statuses.
:param str status__nin: An optional filter for excluding users with a specified set of statuses.
:return: UserInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.418943
| 1.845192
| 0.768995
|
return self.remove_account_api_key_from_groups_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
else:
(data) = self.remove_account_api_key_from_groups_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
return data
|
def remove_account_api_key_from_groups(self, account_id, api_key, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove API key from groups. # noqa: E501
An endpoint for removing API key from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_account_api_key_from_groups(account_id, api_key, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be removed from the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.41438
| 1.872043
| 0.755527
|
return self.remove_account_user_from_groups_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
else:
(data) = self.remove_account_user_from_groups_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
return data
|
def remove_account_user_from_groups(self, account_id, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove user from groups. # noqa: E501
An endpoint for removing user from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_account_user_from_groups(account_id, user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user to be removed from the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.431525
| 1.948167
| 0.734806
|
return self.remove_api_keys_from_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.remove_api_keys_from_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def remove_api_keys_from_account_group(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove API keys from a group. # noqa: E501
An endpoint for removing API keys from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID}/api-keys -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_api_keys_from_account_group(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: A list of API keys to be removed from the group. (required)
:param SubjectList body:
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.428878
| 1.966058
| 0.726773
|
return self.remove_users_from_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
else:
(data) = self.remove_users_from_account_group_with_http_info(account_id, group_id, **kwargs) # noqa: E501
return data
|
def remove_users_from_account_group(self, account_id, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove users from a group. # noqa: E501
An endpoint for removing users from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID}/users -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_users_from_account_group(account_id, group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: (required)
:param SubjectList body:
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.44069
| 2.042194
| 0.705462
|
return self.reset_account_api_key_secret_with_http_info(account_id, api_key, **kwargs) # noqa: E501
else:
(data) = self.reset_account_api_key_secret_with_http_info(account_id, api_key, **kwargs) # noqa: E501
return data
|
def reset_account_api_key_secret(self, account_id, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Reset the secret key. # noqa: E501
An endpoint for resetting the secret key of the API key. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey}/reset-secret -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.reset_account_api_key_secret(account_id, api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be reset. (required)
:return: ApiKeyInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.458183
| 1.994202
| 0.731211
|
return self.update_account_with_http_info(account_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_account_with_http_info(account_id, body, **kwargs) # noqa: E501
return data
|
def update_account(self, account_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update attributes of an existing account. # noqa: E501
An endpoint for updating an account. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account-id} -d '{\"phone_number\": \"12345678\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_account(account_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: The ID of the account to be updated. (required)
:param AccountUpdateRootReq body: Details of the account to be updated. (required)
:return: AccountInfo
If the method is called asynchronously,
returns the request thread.
| 1.568924
| 2.097276
| 0.748077
|
return self.update_account_api_key_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
else:
(data) = self.update_account_api_key_with_http_info(account_id, api_key, body, **kwargs) # noqa: E501
return data
|
def update_account_api_key(self, account_id, api_key, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update API key details. # noqa: E501
An endpoint for updating API key details. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey} -d '{\"name\": \"TestApiKey25\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_account_api_key(account_id, api_key, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str api_key: The ID of the API key to be updated. (required)
:param ApiKeyUpdateReq body: New API key attributes to be stored. (required)
:return: ApiKeyInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.455721
| 1.981195
| 0.734769
|
return self.update_account_certificate_with_http_info(account_id, cert_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_account_certificate_with_http_info(account_id, cert_id, body, **kwargs) # noqa: E501
return data
|
def update_account_certificate(self, account_id, cert_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update trusted certificate. # noqa: E501
An endpoint for updating existing trusted certificates. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_account_certificate(account_id, cert_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str cert_id: The ID of the trusted certificate to be updated. (required)
:param TrustedCertificateUpdateReq body: A trusted certificate object with attributes. (required)
:return: TrustedCertificateInternalResp
If the method is called asynchronously,
returns the request thread.
| 1.486253
| 1.924944
| 0.772102
|
return self.update_account_group_name_with_http_info(account_id, group_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_account_group_name_with_http_info(account_id, group_id, body, **kwargs) # noqa: E501
return data
|
def update_account_group_name(self, account_id, group_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update the group name. # noqa: E501
An endpoint for updating a group name. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/policy-groups/{groupID}/ -d '{\"name\": \"TestGroup2\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_account_group_name(account_id, group_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str group_id: The ID of the group to be updated. (required)
:param GroupUpdateInfo body: Details of the group to be created. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.466279
| 1.924511
| 0.761897
|
return self.update_account_user_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_account_user_with_http_info(account_id, user_id, body, **kwargs) # noqa: E501
return data
|
def update_account_user(self, account_id, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update user details. # noqa: E501
An endpoint for updating user details. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id} -d '{\"username\": \"myusername\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_account_user(account_id, user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user to be updated. (required)
:param UserUpdateReq body: A user object with attributes. (required)
:return: UserInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.477225
| 1.979093
| 0.746415
|
return self.validate_account_user_email_with_http_info(account_id, user_id, **kwargs) # noqa: E501
else:
(data) = self.validate_account_user_email_with_http_info(account_id, user_id, **kwargs) # noqa: E501
return data
|
def validate_account_user_email(self, account_id, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Validate the user email. # noqa: E501
An endpoint for validating the user email. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/users/{user-id}/validate-email -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.validate_account_user_email(account_id, user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str account_id: Account ID. (required)
:param str user_id: The ID of the user whose email is validated. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.481623
| 1.908069
| 0.776504
|
return self.delete_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
else:
(data) = self.delete_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
return data
|
def delete_certificate_issuer(self, certificate_issuer_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete certificate issuer. # noqa: E501
Delete a certificate issuer by ID. <br> **Example usage:** ``` curl -X DELETE \\ -H 'authorization: <valid access token>' \\ https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_certificate_issuer(certificate_issuer_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str certificate_issuer_id: Certificate issuer ID. <br> The ID of the certificate issuer. An active certificate issuer may not be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.537332
| 1.997818
| 0.769506
|
return self.get_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
else:
(data) = self.get_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
return data
|
def get_certificate_issuer(self, certificate_issuer_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get certificate issuer by ID. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_certificate_issuer(certificate_issuer_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str certificate_issuer_id: Certificate issuer ID. The ID of the certificate issuer. (required)
:return: CertificateIssuerInfo
If the method is called asynchronously,
returns the request thread.
| 1.519175
| 1.90907
| 0.795767
|
return self.get_certificate_issuers_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_certificate_issuers_with_http_info(**kwargs) # noqa: E501
return data
|
def get_certificate_issuers(self, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get certificate issuers list. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_certificate_issuers(asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:return: CertificateIssuerInfoListResponse
If the method is called asynchronously,
returns the request thread.
| 1.604026
| 2.012825
| 0.796903
|
return self.update_certificate_issuer_with_http_info(certificate_issuer_id, certificate_issuer_update_request, **kwargs) # noqa: E501
else:
(data) = self.update_certificate_issuer_with_http_info(certificate_issuer_id, certificate_issuer_update_request, **kwargs) # noqa: E501
return data
|
def update_certificate_issuer(self, certificate_issuer_id, certificate_issuer_update_request, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update certificate issuer. # noqa: E501
Update a certificate issuer. <br> **Example usage:** ``` curl -X PUT \\ -H 'authorization: <valid access token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\ -d '{ \"description\": \"Sample GlobalSign certificate issuer - updated.\", \"name\": \"GlobalSign Issuer\" }' ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_certificate_issuer(certificate_issuer_id, certificate_issuer_update_request, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str certificate_issuer_id: Certificate issuer ID. <br> The ID of the certificate issuer. (required)
:param CertificateIssuerUpdateRequest certificate_issuer_update_request: Certificate issuer update request. (required)
:return: CertificateIssuerInfo
If the method is called asynchronously,
returns the request thread.
| 1.457827
| 1.888292
| 0.772034
|
return self.verify_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
else:
(data) = self.verify_certificate_issuer_with_http_info(certificate_issuer_id, **kwargs) # noqa: E501
return data
|
def verify_certificate_issuer(self, certificate_issuer_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Verify certificate issuer. # noqa: E501
A utility API that can be used to validate the user configuration before activating a certificate issuer. Verifies that the certificate issuer is accessible and can be used to generate certificates by Device Management. <br> **Note:** The API requests the 3rd party CA to sign a test certificate. For some 3rd party CAs, this operation may make use of the account quota. <br> **Example usage:** ``` curl -X POST \\ -H 'authorization: <valid access token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.verify_certificate_issuer(certificate_issuer_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str certificate_issuer_id: Certificate issuer ID. <br> The ID of the certificate issuer. (required)
:return: CertificateIssuerVerifyResponse
If the method is called asynchronously,
returns the request thread.
| 1.541766
| 2.03223
| 0.758657
|
allowed_values = ["pending", "updated_connector_channel", "failed_connector_channel_update", "deployed", "manifestremoved", "deregistered"]
if deployment_state not in allowed_values:
raise ValueError(
"Invalid value for `deployment_state` ({0}), must be one of {1}"
.format(deployment_state, allowed_values)
)
self._deployment_state = deployment_state
|
def deployment_state(self, deployment_state)
|
Sets the deployment_state of this CampaignDeviceMetadata.
The state of the update campaign on the device
:param deployment_state: The deployment_state of this CampaignDeviceMetadata.
:type: str
| 3.685436
| 3.750284
| 0.982708
|
kwargs = self._verify_sort_options(kwargs)
kwargs = self._verify_filters(kwargs, Certificate)
if "service__eq" in kwargs:
if kwargs["service__eq"] == CertificateType.bootstrap:
pass
elif kwargs["service__eq"] == CertificateType.developer:
kwargs["device_execution_mode__eq"] = 1
kwargs.pop("service__eq")
elif kwargs["service__eq"] == CertificateType.lwm2m:
pass
else:
raise CloudValueError(
"Incorrect value for CertificateType filter: %s" % (kwargs["service__eq"])
)
owner = kwargs.pop('owner_id__eq', None)
if owner is not None:
kwargs['owner__eq'] = owner
api = self._get_api(iam.DeveloperApi)
return PaginatedResponse(api.get_all_certificates, lwrap_type=Certificate, **kwargs)
|
def list_certificates(self, **kwargs)
|
List certificates registered to organisation.
Currently returns partially populated certificates. To obtain the full certificate object:
`[get_certificate(certificate_id=cert['id']) for cert in list_certificates]`
:param int limit: The number of certificates to retrieve.
:param str order: The ordering direction, ascending (asc) or
descending (desc).
:param str after: Get certificates after/starting at given `certificate_id`.
:param dict filters: Dictionary of filters to apply: type (eq), expire (eq), owner (eq)
:return: list of :py:class:`Certificate` objects
:rtype: Certificate
| 4.827345
| 4.959975
| 0.97326
|
api = self._get_api(iam.DeveloperApi)
certificate = Certificate(api.get_certificate(certificate_id))
self._extend_certificate(certificate)
return certificate
|
def get_certificate(self, certificate_id)
|
Get certificate by id.
:param str certificate_id: The certificate id (Required)
:returns: Certificate object
:rtype: Certificate
| 8.024869
| 8.805606
| 0.911336
|
api = self._get_api(iam.DeveloperApi)
api.delete_certificate(certificate_id)
return
|
def delete_certificate(self, certificate_id)
|
Delete a certificate.
:param str certificate_id: The certificate id (Required)
:returns: void
| 8.878837
| 10.552312
| 0.841412
|
kwargs.update({'name': name})
kwargs.update({'type': type})
api = self._get_api(iam.AccountAdminApi)
kwargs.update({'certificate_data': certificate_data})
certificate = Certificate._create_request_map(kwargs)
if not certificate.get('enrollment_mode') and signature:
certificate.update({'signature': signature})
body = iam.TrustedCertificateReq(**certificate)
prod_cert = api.add_certificate(body)
return self.get_certificate(prod_cert.id)
|
def add_certificate(self, name, type, certificate_data, signature=None, **kwargs)
|
Add a new BYOC certificate.
:param str name: name of the certificate (Required)
:param str type: type of the certificate. Values: lwm2m or bootstrap (Required)
:param str certificate_data: X509.v3 trusted certificate in PEM format. (Required)
:param str signature: This parameter has been DEPRECATED in the API and does not need to
be provided.
:param str status: Status of the certificate.
Allowed values: "ACTIVE" | "INACTIVE".
:param str description: Human readable description of this certificate,
not longer than 500 characters.
:returns: Certificate object
:rtype: Certificate
| 5.987815
| 6.093211
| 0.982703
|
kwargs['name'] = name
api = self._get_api(cert.DeveloperCertificateApi)
certificate = Certificate._create_request_map(kwargs)
# just pull the fields we care about
subset = cert.DeveloperCertificateRequestData.attribute_map
certificate = {k: v for k, v in certificate.items() if k in subset}
body = cert.DeveloperCertificateRequestData(**certificate)
dev_cert = api.create_developer_certificate(self.auth, body)
return self.get_certificate(dev_cert.id)
|
def add_developer_certificate(self, name, **kwargs)
|
Add a new developer certificate.
:param str name: name of the certificate (Required)
:param str description: Human readable description of this certificate,
not longer than 500 characters.
:returns: Certificate object
:rtype: Certificate
| 5.198146
| 5.928885
| 0.876749
|
api = self._get_api(iam.DeveloperApi)
cert = Certificate._create_request_map(kwargs)
body = iam.TrustedCertificateReq(**cert)
certificate = Certificate(api.update_certificate(certificate_id, body))
return self.get_certificate(certificate.id)
|
def update_certificate(self, certificate_id, **kwargs)
|
Update a certificate.
:param str certificate_id: The certificate id (Required)
:param str certificate_data: X509.v3 trusted certificate in PEM format.
:param str signature: This parameter has been DEPRECATED in the API and does not need to
be provided.
:param str type: type of the certificate. Values: lwm2m or bootstrap.
:param str status: Status of the certificate.
Allowed values: "ACTIVE" | "INACTIVE".
:param str description: Human readable description of this certificate,
not longer than 500 characters.
:returns: Certificate object
:rtype: Certificate
| 9.528184
| 9.335526
| 1.020637
|
mapped = super(Certificate, cls)._create_request_map(input_map)
if mapped.get('service') == CertificateType.developer:
mapped['service'] = CertificateType.bootstrap
return mapped
|
def _create_request_map(cls, input_map)
|
Create request map.
| 7.725151
| 7.320781
| 1.055236
|
if self._device_mode == 1 or self._type == CertificateType.developer:
return CertificateType.developer
elif self._type == CertificateType.bootstrap:
return CertificateType.bootstrap
else:
return CertificateType.lwm2m
|
def type(self)
|
Certificate type.
:return: The type of the certificate.
:rtype: CertificateType
| 6.605941
| 5.718135
| 1.155262
|
return self.get_all_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
else:
(data) = self.get_all_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
return data
|
def get_all_server_credentials(self, authorization, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Fetch all (Bootstrap and LwM2M) server credentials. # noqa: E501
This REST API is intended to be used by customers to fetch all (Bootstrap and LwM2M) server credentials that they will need to use with their clients to connect to bootstrap or LwM2M server. **Example usage:** curl -X GET \"http://api.us-east-1.mbedcloud.com/v3/server-credentials\" -H \"accept: application/json\" -H \"Authorization: Bearer THE_ACCESS_TOKEN\" # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_server_credentials(authorization, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str authorization: Bearer {Access Token}. (required)
:return: AllServerCredentialsResponseData
If the method is called asynchronously,
returns the request thread.
| 1.558512
| 1.961264
| 0.794647
|
return self.get_bootstrap_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
else:
(data) = self.get_bootstrap_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
return data
|
def get_bootstrap_server_credentials(self, authorization, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Fetch bootstrap server credentials. # noqa: E501
This REST API is intended to be used by customers to fetch bootstrap server credentials that they will need to use with their clients to connect to bootstrap server. **Example usage:** curl -X GET \"http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap\" -H \"accept: application/json\" -H \"Authorization: Bearer THE_ACCESS_TOKEN\" # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_bootstrap_server_credentials(authorization, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str authorization: Bearer {Access Token}. (required)
:return: ServerCredentialsResponseData
If the method is called asynchronously,
returns the request thread.
| 1.523919
| 1.946892
| 0.782745
|
return self.get_l2_m2_m_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
else:
(data) = self.get_l2_m2_m_server_credentials_with_http_info(authorization, **kwargs) # noqa: E501
return data
|
def get_l2_m2_m_server_credentials(self, authorization, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Fetch LwM2M server credentials. # noqa: E501
This REST API is intended to be used by customers to fetch LwM2M server credentials that they will need to use with their clients to connect to LwM2M server. **Example usage:** curl -X GET \"http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m\" -H \"accept: application/json\" -H \"Authorization: Bearer THE_ACCESS_TOKEN\" # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_l2_m2_m_server_credentials(authorization, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str authorization: Bearer {Access Token}. (required)
:return: ServerCredentialsResponseData
If the method is called asynchronously,
returns the request thread.
| 1.462885
| 1.841408
| 0.794439
|
api = self._get_api(enrollment.PublicAPIApi)
item = EnrollmentClaim._create_request_map(kwargs)
item = models.EnrollmentIdentity(**item)
return EnrollmentClaim(api.create_device_enrollment(item))
|
def add_enrollment_claim(self, **kwargs)
|
Add
| 13.982073
| 13.999681
| 0.998742
|
api = self._get_api(enrollment.PublicAPIApi)
return EnrollmentClaim(api.get_device_enrollment(id=id))
|
def get_enrollment_claim(self, id, **kwargs)
|
Get
| 12.105359
| 13.461378
| 0.899266
|
kwargs = self._verify_sort_options(kwargs)
kwargs = self._verify_filters(kwargs, EnrollmentClaim)
api = self._get_api(enrollment.PublicAPIApi)
return PaginatedResponse(
api.get_device_enrollments,
lwrap_type=EnrollmentClaim,
**kwargs
)
|
def list_enrollment_claims(self, **kwargs)
|
List
| 7.346032
| 7.399946
| 0.992714
|
api = self._get_api(enrollment.PublicAPIApi)
return api.delete_device_enrollment(id=id)
|
def delete_enrollment_claim(self, id, **kwargs)
|
Delete
| 13.891728
| 15.088729
| 0.920669
|
for notification in getattr(notification_object, 'notifications') or []:
# Ensure we have subscribed for the path we received a notification for
subscriber_queue = queues[notification.ep].get(notification.path)
if subscriber_queue is None:
LOG.debug(
"Ignoring notification on %s (%s) as no subscription is registered",
notification.ep,
notification.path
)
break
payload = tlv.decode(
payload=notification.payload,
content_type=notification.ct,
decode_b64=b64decode
)
subscriber_queue.put(payload)
for response in getattr(notification_object, 'async_responses') or []:
payload = tlv.decode(
payload=response.payload,
content_type=response.ct,
decode_b64=b64decode
)
db.update({response.id: dict(
payload=payload,
error=response.error,
status_code=response.status
)})
|
def handle_channel_message(db, queues, b64decode, notification_object)
|
Handler for notification channels
Given a NotificationMessage object, update internal state, notify
any subscribers and resolve async deferred tasks.
:param db:
:param queues:
:param b64decode:
:param notification_object:
:return:
| 3.864571
| 3.889167
| 0.993676
|
start_time = time.time()
# We return synchronously, so we block in a busy loop waiting for the
# request to be done.
while not self.is_done:
duration = time.time() - start_time
if timeout and duration > timeout:
raise CloudTimeoutError(
"Timeout getting async value. Timeout: %d seconds" % timeout
)
time.sleep(0.1)
# If we get an any status code other than a 2xx we raise an exception to the user, which can then be handled
# accordingly.
status_code, error_msg, payload = self.check_error()
if not self._status_ok(status_code):
raise CloudAsyncError("Async response for '%s' returned an error." % self.async_id,
reason=error_msg,
status=status_code)
value = self.value
if isinstance(value, six.binary_type):
value = value.decode('utf-8')
return value
|
def wait(self, timeout=0)
|
Blocks until timeout (seconds) or forever
:param timeout: time to wait, in seconds
:return:
| 4.888176
| 5.070911
| 0.963964
|
if not self.is_done:
raise CloudUnhandledError("Need to check if request is done, before checking for error")
response = self.db[self.async_id]
error_msg = response["error"]
status_code = int(response["status_code"])
payload = response["payload"]
return status_code, error_msg, payload
|
def check_error(self)
|
Check if the async response is an error.
Take care to call `is_done` before calling `error`. Note that the error
messages are always encoded as strings.
:raises CloudUnhandledError: When not checking `is_done` first
:return: status_code, error_msg, payload
:rtype: tuple
| 6.611614
| 3.348771
| 1.974341
|
status_code, error_msg, payload = self.check_error()
if status_code != 200 and not error_msg and not payload:
return "Async error (%s). Status code: %r" % (self.async_id, status_code)
return error_msg
|
def error(self)
|
Check if the async response is an error.
Take care to call `is_done` before calling `error`. Note that the error
messages are always encoded as strings.
:raises CloudUnhandledError: When not checking `is_done` first
:return: the error value/payload, if found.
:rtype: str
| 6.11694
| 5.989697
| 1.021243
|
status_code, error_msg, payload = self.check_error()
if not self._status_ok(status_code) and not payload:
raise CloudUnhandledError("Attempted to decode async request which returned an error.",
reason=error_msg,
status=status_code)
return self.db[self.async_id]["payload"]
|
def value(self)
|
Get the value of the finished async request, if it is available.
:raises CloudUnhandledError: When not checking value of `error` or `is_done` first
:return: the payload value
:rtype: str
| 12.78294
| 8.530754
| 1.498454
|
retries = 0
try:
while not self._stopping:
try:
data = self.notifications_api.long_poll_notifications()
except mds.rest.ApiException as e:
# An HTTP 410 can be raised when stopping so don't log anything
if not self._stopping:
backoff = 2 ** retries - random.randint(int(retries / 2), retries)
LOG.error('Notification long poll failed with exception (retry in %d seconds):\n%s', backoff, e)
retries += 1
# Backoff for an increasing amount of time until we have tried 10 times, then reset the backoff.
if retries >= 10:
retries = 0
time.sleep(backoff)
else:
handle_channel_message(
db=self.db,
queues=self.queues,
b64decode=self._b64decode,
notification_object=data
)
if self.subscription_manager:
self.subscription_manager.notify(data.to_dict())
finally:
self._stopped.set()
|
def run(self)
|
Thread main loop
| 5.793922
| 5.729734
| 1.011203
|
return self.add_api_key_to_groups_with_http_info(api_key, body, **kwargs) # noqa: E501
else:
(data) = self.add_api_key_to_groups_with_http_info(api_key, body, **kwargs) # noqa: E501
return data
|
def add_api_key_to_groups(self, api_key, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add API key to a list of groups. # noqa: E501
An endpoint for adding API key to groups. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_api_key_to_groups(api_key, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str api_key: The ID of the API key to be added to the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.46685
| 1.996931
| 0.734552
|
return self.add_certificate_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.add_certificate_with_http_info(body, **kwargs) # noqa: E501
return data
|
def add_certificate(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Upload a new trusted certificate. # noqa: E501
An endpoint for uploading new trusted certificates. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates -d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_certificate(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param TrustedCertificateReq body: A trusted certificate object with attributes. (required)
:return: TrustedCertificateResp
If the method is called asynchronously,
returns the request thread.
| 1.633428
| 2.332928
| 0.700162
|
return self.add_subjects_to_group_with_http_info(group_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_subjects_to_group_with_http_info(group_id, body, **kwargs) # noqa: E501
return data
|
def add_subjects_to_group(self, group_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add members to a group. # noqa: E501
An endpoint for adding users and API keys to a group. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group-id} -d '{\"users\": [0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_subjects_to_group(group_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str group_id: The ID of the group to be updated. (required)
:param SubjectList body: A list of users and API keys to be added to the group. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.490955
| 2.06061
| 0.723551
|
return self.add_user_to_groups_with_http_info(user_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_user_to_groups_with_http_info(user_id, body, **kwargs) # noqa: E501
return data
|
def add_user_to_groups(self, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Add user to a list of groups. # noqa: E501
An endpoint for adding user to groups. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.add_user_to_groups(user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str user_id: The ID of the user to be added to the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.483876
| 2.06202
| 0.719623
|
return self.create_group_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.create_group_with_http_info(body, **kwargs) # noqa: E501
return data
|
def create_group(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new group. # noqa: E501
An endpoint for creating a new group. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups -d '{\"name\": \"MyGroup1\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_group(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param GroupCreationInfo body: Details of the group to be created. (required)
:return: GroupSummary
If the method is called asynchronously,
returns the request thread.
| 1.593105
| 2.252242
| 0.707342
|
return self.create_invitation_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.create_invitation_with_http_info(body, **kwargs) # noqa: E501
return data
|
def create_invitation(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a user invitation. # noqa: E501
An endpoint for inviting a new or an existing user to join the account. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations -d {\"email\": \"myemail@company.com\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_invitation(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param UserInvitationReq body: A user invitation object with attributes. (required)
:return: UserInvitationResp
If the method is called asynchronously,
returns the request thread.
| 1.586554
| 2.174917
| 0.729478
|
return self.create_user_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501
return data
|
def create_user(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Create a new user. # noqa: E501
An endpoint for creating or inviting a new user to the account. In case of invitation email address is used only, other attributes are set in the 2nd step. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite -d {\"email\": \"myemail@company.com\"} -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.create_user(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param UserInfoReq body: A user object with attributes. (required)
:param str action: Action, either 'create' or 'invite'.
:return: UserInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.591653
| 2.22421
| 0.715604
|
return self.delete_group_with_http_info(group_id, **kwargs) # noqa: E501
else:
(data) = self.delete_group_with_http_info(group_id, **kwargs) # noqa: E501
return data
|
def delete_group(self, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a group. # noqa: E501
An endpoint for deleting a group. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_group(group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str group_id: The ID of the group to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.547125
| 2.123048
| 0.728728
|
return self.delete_invitation_with_http_info(invitation_id, **kwargs) # noqa: E501
else:
(data) = self.delete_invitation_with_http_info(invitation_id, **kwargs) # noqa: E501
return data
|
def delete_invitation(self, invitation_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a user invitation. # noqa: E501
An endpoint for deleting an active user invitation which has been sent for a new or an existing user to join the account. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_invitation(invitation_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str invitation_id: The ID of the invitation to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.536103
| 2.027239
| 0.757732
|
return self.delete_user_with_http_info(user_id, **kwargs) # noqa: E501
else:
(data) = self.delete_user_with_http_info(user_id, **kwargs) # noqa: E501
return data
|
def delete_user(self, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Delete a user. # noqa: E501
An endpoint for deleting a user. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.delete_user(user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str user_id: The ID of the user to be deleted. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
| 1.531615
| 2.109703
| 0.725986
|
return self.get_all_invitations_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_all_invitations_with_http_info(**kwargs) # noqa: E501
return data
|
def get_all_invitations(self, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get the details of all the user invitations. # noqa: E501
An endpoint for retrieving the details of all the active user invitations sent for new or existing users to join the account. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/user-invitations -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_invitations(asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:return: UserInvitationRespList
If the method is called asynchronously,
returns the request thread.
| 1.58555
| 2.153675
| 0.736207
|
return self.get_all_users_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_all_users_with_http_info(**kwargs) # noqa: E501
return data
|
def get_all_users(self, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get the details of all users. # noqa: E501
An endpoint for retrieving the details of all users. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/users -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_all_users(asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str email__eq: Filter for email address
:param str status__eq: Filter for status, for example active or reset
:param str status__in: An optional filter for getting users with a specified set of statuses.
:param str status__nin: An optional filter for excluding users with a specified set of statuses.
:return: UserInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.59681
| 2.23283
| 0.715151
|
return self.get_groups_of_apikey_with_http_info(api_key, **kwargs) # noqa: E501
else:
(data) = self.get_groups_of_apikey_with_http_info(api_key, **kwargs) # noqa: E501
return data
|
def get_groups_of_apikey(self, api_key, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get groups of the API key. # noqa: E501
An endpoint for retrieving groups of the API key. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey-id}/groups -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_groups_of_apikey(api_key, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str api_key: The ID of the API key whose details are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:return: GroupSummaryList
If the method is called asynchronously,
returns the request thread.
| 1.495377
| 1.933227
| 0.773513
|
return self.get_groups_of_user_with_http_info(user_id, **kwargs) # noqa: E501
else:
(data) = self.get_groups_of_user_with_http_info(user_id, **kwargs) # noqa: E501
return data
|
def get_groups_of_user(self, user_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get groups of the user. # noqa: E501
An endpoint for retrieving groups of the user. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/users/{user-id}/groups -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_groups_of_user(user_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str user_id: The ID of the user whose details are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:return: GroupSummaryList
If the method is called asynchronously,
returns the request thread.
| 1.475034
| 1.932501
| 0.763277
|
return self.get_invitation_with_http_info(invitation_id, **kwargs) # noqa: E501
else:
(data) = self.get_invitation_with_http_info(invitation_id, **kwargs) # noqa: E501
return data
|
def get_invitation(self, invitation_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Details of a user invitation. # noqa: E501
An endpoint for retrieving the details of an active user invitation sent for a new or an existing user to join the account. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation-id} -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_invitation(invitation_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str invitation_id: The ID of the invitation to be retrieved. (required)
:return: UserInvitationResp
If the method is called asynchronously,
returns the request thread.
| 1.53329
| 2.069506
| 0.740897
|
return self.get_users_of_group_with_http_info(group_id, **kwargs) # noqa: E501
else:
(data) = self.get_users_of_group_with_http_info(group_id, **kwargs) # noqa: E501
return data
|
def get_users_of_group(self, group_id, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Get users of a group. # noqa: E501
An endpoint for listing the users of a group with details. **Example usage:** `curl https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group-id}/users -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.get_users_of_group(group_id, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str group_id: The ID of the group whose users are retrieved. (required)
:param int limit: The number of results to return (2-1000), default is 50.
:param str after: The entity ID to fetch after the given one.
:param str order: The order of the records based on creation time, ASC or DESC; by default ASC
:param str include: Comma separated additional data to return. Currently supported: total_count
:param str status__eq: An optional filter for getting users by status.
:param str status__in: An optional filter for getting users with a specified set of statuses.
:param str status__nin: An optional filter for excluding users with a specified set of statuses.
:return: UserInfoRespList
If the method is called asynchronously,
returns the request thread.
| 1.489552
| 1.923815
| 0.77427
|
return self.remove_api_key_from_groups_with_http_info(api_key, body, **kwargs) # noqa: E501
else:
(data) = self.remove_api_key_from_groups_with_http_info(api_key, body, **kwargs) # noqa: E501
return data
|
def remove_api_key_from_groups(self, api_key, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove API key from groups. # noqa: E501
An endpoint for removing API key from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_api_key_from_groups(api_key, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str api_key: The ID of the API key to be removed from the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.482237
| 1.991041
| 0.744453
|
return self.remove_user_from_groups_with_http_info(user_id, body, **kwargs) # noqa: E501
else:
(data) = self.remove_user_from_groups_with_http_info(user_id, body, **kwargs) # noqa: E501
return data
|
def remove_user_from_groups(self, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove user from groups. # noqa: E501
An endpoint for removing user from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user-id}/groups -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_user_from_groups(user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str user_id: The ID of the user to be removed from the group. (required)
:param list[str] body: A list of IDs of the groups to be updated. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.490376
| 2.070352
| 0.719866
|
return self.remove_users_from_group_with_http_info(group_id, body, **kwargs) # noqa: E501
else:
(data) = self.remove_users_from_group_with_http_info(group_id, body, **kwargs) # noqa: E501
return data
|
def remove_users_from_group(self, group_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Remove users from a group. # noqa: E501
An endpoint for removing users from groups. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group-id}/users -d '[0162056a9a1586f30242590700000000,0117056a9a1586f30242590700000000]' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.remove_users_from_group(group_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str group_id: The ID of the group whose users are removed. (required)
:param SubjectList body: A list of users to be removed from the group. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.496678
| 2.097272
| 0.713631
|
return self.update_group_name_with_http_info(group_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_group_name_with_http_info(group_id, body, **kwargs) # noqa: E501
return data
|
def update_group_name(self, group_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update the group name. # noqa: E501
An endpoint for updating a group name. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group-id} -d '{\"name\": \"TestGroup2\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_group_name(group_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str group_id: The ID of the group to be updated. (required)
:param GroupUpdateInfo body: Details of the group to be created. (required)
:return: UpdatedResponse
If the method is called asynchronously,
returns the request thread.
| 1.532347
| 1.997685
| 0.767061
|
return self.update_my_account_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.update_my_account_with_http_info(body, **kwargs) # noqa: E501
return data
|
def update_my_account(self, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Updates attributes of the account. # noqa: E501
An endpoint for updating the account. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me -d '{\"phone_number\": \"12345678\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_my_account(body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param AccountUpdateReq body: Details of the account to be updated. (required)
:return: AccountInfo
If the method is called asynchronously,
returns the request thread.
| 1.592855
| 2.165987
| 0.735395
|
return self.update_user_with_http_info(user_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_user_with_http_info(user_id, body, **kwargs) # noqa: E501
return data
|
def update_user(self, user_id, body, **kwargs): # noqa: E501
kwargs['_return_http_data_only'] = True
if kwargs.get('asynchronous')
|
Update user details. # noqa: E501
An endpoint for updating user details. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user-id} -d '{\"username\": \"myusername\"}' -H 'content-type: application/json' -H 'Authorization: Bearer API_KEY'` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> thread = api.update_user(user_id, body, asynchronous=True)
>>> result = thread.get()
:param asynchronous bool
:param str user_id: The ID of the user whose details are updated. (required)
:param UserUpdateReq body: A user object with attributes. (required)
:return: UserInfoResp
If the method is called asynchronously,
returns the request thread.
| 1.545005
| 2.083124
| 0.741677
|
return {
'observable': self.observable,
'path': self.path,
'type': self.type,
'content_type': self.content_type
}
|
def to_dict(self)
|
Return dictionary of object.
| 4.084878
| 3.391135
| 1.204575
|
if certificate_issuer_id is None:
raise ValueError("Invalid value for `certificate_issuer_id`, must not be `None`")
if certificate_issuer_id is not None and len(certificate_issuer_id) > 32:
raise ValueError("Invalid value for `certificate_issuer_id`, length must be less than or equal to `32`")
self._certificate_issuer_id = certificate_issuer_id
|
def certificate_issuer_id(self, certificate_issuer_id)
|
Sets the certificate_issuer_id of this CreateCertificateIssuerConfig.
The ID of the certificate issuer.
:param certificate_issuer_id: The certificate_issuer_id of this CreateCertificateIssuerConfig.
:type: str
| 1.481137
| 1.550659
| 0.955166
|
if reference is None:
raise ValueError("Invalid value for `reference`, must not be `None`")
if reference is not None and len(reference) > 50:
raise ValueError("Invalid value for `reference`, length must be less than or equal to `50`")
if reference is not None and not re.search('(?!mbed\\.)[\\w-_.]{1,50}', reference):
raise ValueError("Invalid value for `reference`, must be a follow pattern or equal to `/(?!mbed\\.)[\\w-_.]{1,50}/`")
self._reference = reference
|
def reference(self, reference)
|
Sets the reference of this CreateCertificateIssuerConfig.
The certificate name, as created in the factory, to which the certificate issuer configuration applies. The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP.
:param reference: The reference of this CreateCertificateIssuerConfig.
:type: str
| 2.119125
| 2.053488
| 1.031963
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.