Table of Contents
IoTDeviceAdvisor.
Client
¶A low-level client representing AWS IoT Core Device Advisor (oTDeviceAdvisor)
AWS IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT devices during device software development. Device Advisor provides pre-built tests that you can use to validate IoT devices for reliable and secure connectivity with AWS IoT Core before deploying devices to production. By using Device Advisor, you can confirm that your devices can connect to AWS IoT Core, follow security best practices and, if applicable, receive software updates from IoT Device Management. You can also download signed qualification reports to submit to the AWS Partner Network to get your device qualified for the AWS Partner Device Catalog without the need to send your device in and wait for it to be tested.
client = session.create_client('iotdeviceadvisor')
These are the available methods:
can_paginate
(operation_name)¶Check if an operation can be paginated.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
True
if the operation can be paginated,
False
otherwise.
create_suite_definition
(**kwargs)¶Creates a Device Advisor test suite.
See also: AWS API Documentation
Request Syntax
response = client.create_suite_definition(
suiteDefinitionConfiguration={
'suiteDefinitionName': 'string',
'devices': [
{
'thingArn': 'string',
'certificateArn': 'string'
},
],
'intendedForQualification': True|False,
'rootGroup': 'string',
'devicePermissionRoleArn': 'string'
},
tags={
'string': 'string'
}
)
suiteDefinitionConfiguration (dict) –
Creates a Device Advisor test suite with suite definition configuration.
suiteDefinitionName (string) –
Gets Suite Definition Configuration name.
devices (list) –
Gets the devices configured.
(dict) –
Lists all the devices under test
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
intendedForQualification (boolean) –
Gets the tests intended for qualification in a suite.
rootGroup (string) –
Gets test suite root group.
devicePermissionRoleArn (string) –
Gets device permission arn.
tags (dict) –
The tags to be attached to the suite definition.
(string) –
(string) –
dict
Response Syntax
{
'suiteDefinitionId': 'string',
'suiteDefinitionArn': 'string',
'suiteDefinitionName': 'string',
'createdAt': datetime(2015, 1, 1)
}
Response Structure
(dict) –
suiteDefinitionId (string) –
Creates a Device Advisor test suite with suite UUID.
suiteDefinitionArn (string) –
Creates a Device Advisor test suite with Amazon Resource name.
suiteDefinitionName (string) –
Creates a Device Advisor test suite with suite definition name.
createdAt (datetime) –
Creates a Device Advisor test suite with TimeStamp of when it was created.
Exceptions
delete_suite_definition
(**kwargs)¶Deletes a Device Advisor test suite.
See also: AWS API Documentation
Request Syntax
response = client.delete_suite_definition(
suiteDefinitionId='string'
)
suiteDefinitionId (string) –
[REQUIRED]
Deletes a Device Advisor test suite with defined suite Id.
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
ClientMethod (string) – The client method to presign for
Params (dict) – The parameters normally passed to
ClientMethod
.
ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.
The presigned url
get_paginator
(operation_name)¶Create a paginator for an operation.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate
method to
check if an operation is pageable.
L{botocore.paginate.Paginator}
A paginator object.
get_suite_definition
(**kwargs)¶Gets information about a Device Advisor test suite.
See also: AWS API Documentation
Request Syntax
response = client.get_suite_definition(
suiteDefinitionId='string',
suiteDefinitionVersion='string'
)
suiteDefinitionId (string) –
[REQUIRED]
Requests suite definition Id with GetSuiteDefinition API call.
suiteDefinitionVersion (string) – Requests the suite definition version of a test suite.
dict
Response Syntax
{
'suiteDefinitionId': 'string',
'suiteDefinitionArn': 'string',
'suiteDefinitionVersion': 'string',
'latestVersion': 'string',
'suiteDefinitionConfiguration': {
'suiteDefinitionName': 'string',
'devices': [
{
'thingArn': 'string',
'certificateArn': 'string'
},
],
'intendedForQualification': True|False,
'rootGroup': 'string',
'devicePermissionRoleArn': 'string'
},
'createdAt': datetime(2015, 1, 1),
'lastModifiedAt': datetime(2015, 1, 1),
'tags': {
'string': 'string'
}
}
Response Structure
(dict) –
suiteDefinitionId (string) –
Gets suite definition Id with GetSuiteDefinition API call.
suiteDefinitionArn (string) –
The ARN of the suite definition.
suiteDefinitionVersion (string) –
Gets suite definition version with GetSuiteDefinition API call.
latestVersion (string) –
Gets latest suite definition version with GetSuiteDefinition API call.
suiteDefinitionConfiguration (dict) –
Gets the suite configuration with GetSuiteDefinition API call.
suiteDefinitionName (string) –
Gets Suite Definition Configuration name.
devices (list) –
Gets the devices configured.
(dict) –
Lists all the devices under test
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
intendedForQualification (boolean) –
Gets the tests intended for qualification in a suite.
rootGroup (string) –
Gets test suite root group.
devicePermissionRoleArn (string) –
Gets device permission arn.
createdAt (datetime) –
Gets the timestamp of the time suite was created with GetSuiteDefinition API call.
lastModifiedAt (datetime) –
Gets the timestamp of the time suite was modified with GetSuiteDefinition API call.
tags (dict) –
Tags attached to the suite definition.
(string) –
(string) –
Exceptions
get_suite_run
(**kwargs)¶Gets information about a Device Advisor test suite run.
See also: AWS API Documentation
Request Syntax
response = client.get_suite_run(
suiteDefinitionId='string',
suiteRunId='string'
)
suiteDefinitionId (string) –
[REQUIRED]
Requests the information about Device Advisor test suite run based on suite definition Id.
suiteRunId (string) –
[REQUIRED]
Requests the information about Device Advisor test suite run based on suite run Id.
dict
Response Syntax
{
'suiteDefinitionId': 'string',
'suiteDefinitionVersion': 'string',
'suiteRunId': 'string',
'suiteRunArn': 'string',
'suiteRunConfiguration': {
'primaryDevice': {
'thingArn': 'string',
'certificateArn': 'string'
},
'secondaryDevice': {
'thingArn': 'string',
'certificateArn': 'string'
},
'selectedTestList': [
'string',
]
},
'testResult': {
'groups': [
{
'groupId': 'string',
'groupName': 'string',
'tests': [
{
'testCaseRunId': 'string',
'testCaseDefinitionId': 'string',
'testCaseDefinitionName': 'string',
'status': 'PASS'|'FAIL'|'CANCELED'|'PENDING'|'RUNNING'|'PASS_WITH_WARNINGS'|'ERROR',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'logUrl': 'string',
'warnings': 'string',
'failure': 'string'
},
]
},
]
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'PASS'|'FAIL'|'CANCELED'|'PENDING'|'RUNNING'|'PASS_WITH_WARNINGS'|'ERROR',
'errorReason': 'string',
'tags': {
'string': 'string'
}
}
Response Structure
(dict) –
suiteDefinitionId (string) –
Gets the information about Device Advisor test suite run based on suite definition Id.
suiteDefinitionVersion (string) –
Gets the information about Device Advisor test suite run based on suite definition version.
suiteRunId (string) –
Gets the information about Device Advisor test suite run based on suite run Id.
suiteRunArn (string) –
The ARN of the suite run.
suiteRunConfiguration (dict) –
Gets the information about Device Advisor test suite run based on suite configuration.
primaryDevice (dict) –
Gets the primary device for suite run.
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
secondaryDevice (dict) –
Gets the secondary device for suite run.
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
selectedTestList (list) –
Gets test case list.
(string) –
testResult (dict) –
Gets the information about Device Advisor test suite run based on test case runs.
groups (list) –
Show each group of test results.
(dict) –
Show Group Result.
groupId (string) –
Show Group Result Id.
groupName (string) –
Show Group Result Name.
tests (list) –
Show Group Result.
(dict) –
Provides test case run.
testCaseRunId (string) –
Provides test case run Id.
testCaseDefinitionId (string) –
Provides test case run definition Id.
testCaseDefinitionName (string) –
Provides test case run definition Name.
status (string) –
Provides test case run status.
startTime (datetime) –
Provides test case run start time.
endTime (datetime) –
Provides test case run end time.
logUrl (string) –
Provides test case run log Url.
warnings (string) –
Provides test case run warnings.
failure (string) –
Provides test case run failure result.
startTime (datetime) –
Gets the information about Device Advisor test suite run based on start time.
endTime (datetime) –
Gets the information about Device Advisor test suite run based on end time.
status (string) –
Gets the information about Device Advisor test suite run based on its status.
errorReason (string) –
Gets the information about Device Advisor test suite run based on error.
tags (dict) –
The tags attached to the suite run.
(string) –
(string) –
Exceptions
get_suite_run_report
(**kwargs)¶Gets a report download link for a successful Device Advisor qualifying test suite run.
See also: AWS API Documentation
Request Syntax
response = client.get_suite_run_report(
suiteDefinitionId='string',
suiteRunId='string'
)
suiteDefinitionId (string) –
[REQUIRED]
Device Advisor suite definition Id.
suiteRunId (string) –
[REQUIRED]
Device Advisor suite run Id.
dict
Response Syntax
{
'qualificationReportDownloadUrl': 'string'
}
Response Structure
(dict) –
qualificationReportDownloadUrl (string) –
Gets the download URL of the qualification report.
Exceptions
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
waiter_name (str) – The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
The specified waiter object.
botocore.waiter.Waiter
list_suite_definitions
(**kwargs)¶Lists the Device Advisor test suites you have created.
See also: AWS API Documentation
Request Syntax
response = client.list_suite_definitions(
maxResults=123,
nextToken='string'
)
maxResults (integer) – Request the list of all the Device Advisor test suites.
nextToken (string) – Requests the Device Advisor test suites next token.
dict
Response Syntax
{
'suiteDefinitionInformationList': [
{
'suiteDefinitionId': 'string',
'suiteDefinitionName': 'string',
'defaultDevices': [
{
'thingArn': 'string',
'certificateArn': 'string'
},
],
'intendedForQualification': True|False,
'createdAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) –
suiteDefinitionInformationList (list) –
Lists test suite information using List suite definition.
(dict) –
Get suite definition information.
suiteDefinitionId (string) –
Get suite definition Id.
suiteDefinitionName (string) –
Get test suite name.
defaultDevices (list) –
Specifies the devices under test.
(dict) –
Lists all the devices under test
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
intendedForQualification (boolean) –
Gets the test suites which will be used for qualification.
createdAt (datetime) –
Gets the information of when the test suite was created.
nextToken (string) –
Creates a Device Advisor test suite.
Exceptions
list_suite_runs
(**kwargs)¶Lists the runs of the specified Device Advisor test suite. You can list all runs of the test suite, or the runs of a specific version of the test suite.
See also: AWS API Documentation
Request Syntax
response = client.list_suite_runs(
suiteDefinitionId='string',
suiteDefinitionVersion='string',
maxResults=123,
nextToken='string'
)
suiteDefinitionId (string) – Lists the runs of the specified Device Advisor test suite based on suite definition Id.
suiteDefinitionVersion (string) – Lists the runs of the specified Device Advisor test suite based on suite definition version.
maxResults (integer) – MaxResults for list suite run API request.
nextToken (string) – Next pagination token for list suite run request.
dict
Response Syntax
{
'suiteRunsList': [
{
'suiteDefinitionId': 'string',
'suiteDefinitionVersion': 'string',
'suiteDefinitionName': 'string',
'suiteRunId': 'string',
'createdAt': datetime(2015, 1, 1),
'startedAt': datetime(2015, 1, 1),
'endAt': datetime(2015, 1, 1),
'status': 'PASS'|'FAIL'|'CANCELED'|'PENDING'|'RUNNING'|'PASS_WITH_WARNINGS'|'ERROR',
'passed': 123,
'failed': 123
},
],
'nextToken': 'string'
}
Response Structure
(dict) –
suiteRunsList (list) –
Lists the runs of the specified Device Advisor test suite.
(dict) –
Get suite run information.
suiteDefinitionId (string) –
Get suite run information based on suite definition Id.
suiteDefinitionVersion (string) –
Get suite run information based on suite definition version.
suiteDefinitionName (string) –
Get suite run information based on suite definition name.
suiteRunId (string) –
Get suite run information based on suite run Id.
createdAt (datetime) –
Get suite run information based on time suite was created.
startedAt (datetime) –
Get suite run information based on start time of the run.
endAt (datetime) –
Get suite run information based on end time of the run.
status (string) –
Get suite run information based on test run status.
passed (integer) –
Get suite run information based on result of the test suite run.
failed (integer) –
Get suite run information based on result of the test suite run.
nextToken (string) –
Next pagination token for list suite run response.
Exceptions
Lists the tags attached to an IoT Device Advisor resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
resourceArn (string) –
[REQUIRED]
The ARN of the IoT Device Advisor resource.
dict
Response Syntax
{
'tags': {
'string': 'string'
}
}
Response Structure
(dict) –
tags (dict) –
The tags attached to the IoT Device Advisor resource.
(string) –
(string) –
Exceptions
list_test_cases
(**kwargs)¶Lists all the test cases in the test suite.
See also: AWS API Documentation
Request Syntax
response = client.list_test_cases(
intendedForQualification=True|False,
maxResults=123,
nextToken='string'
)
intendedForQualification (boolean) – Lists all the qualification test cases in the test suite.
maxResults (integer) – Requests the test cases max results.
nextToken (string) – Requests the test cases next token.
dict
Response Syntax
{
'categories': [
{
'name': 'string',
'tests': [
{
'name': 'string',
'configuration': {
'string': 'string'
},
'test': {
'id': 'string',
'testCaseVersion': 'string'
}
},
]
},
],
'rootGroupConfiguration': {
'string': 'string'
},
'groupConfiguration': {
'string': 'string'
},
'nextToken': 'string'
}
Response Structure
(dict) –
categories (list) –
Gets the category of test case.
(dict) –
Gets the test case category.
name (string) –
Lists all the tests name in the specified category.
tests (list) –
Lists all the tests in the specified category.
(dict) –
Shows tests in a test group.
name (string) –
Shows test case name.
configuration (dict) –
Shows test case configuration.
(string) –
(string) –
test (dict) –
Specifies a test.
id (string) –
Provides test case definition Id.
testCaseVersion (string) –
Provides test case definition version.
rootGroupConfiguration (dict) –
Gets the configuration of root test group.
(string) –
(string) –
groupConfiguration (dict) –
Gets the configuration of test group.
(string) –
(string) –
nextToken (string) –
Test cases next token response.
Exceptions
start_suite_run
(**kwargs)¶Starts a Device Advisor test suite run.
See also: AWS API Documentation
Request Syntax
response = client.start_suite_run(
suiteDefinitionId='string',
suiteDefinitionVersion='string',
suiteRunConfiguration={
'primaryDevice': {
'thingArn': 'string',
'certificateArn': 'string'
},
'secondaryDevice': {
'thingArn': 'string',
'certificateArn': 'string'
},
'selectedTestList': [
'string',
]
},
tags={
'string': 'string'
}
)
suiteDefinitionId (string) –
[REQUIRED]
Request to start suite run based on suite definition Id.
suiteDefinitionVersion (string) – Request to start suite run based on suite definition version.
suiteRunConfiguration (dict) –
Request to start suite run based on suite configuration.
primaryDevice (dict) –
Gets the primary device for suite run.
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
secondaryDevice (dict) –
Gets the secondary device for suite run.
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
selectedTestList (list) –
Gets test case list.
(string) –
tags (dict) –
The tags to be attached to the suite run.
(string) –
(string) –
dict
Response Syntax
{
'suiteRunId': 'string',
'suiteRunArn': 'string',
'createdAt': datetime(2015, 1, 1)
}
Response Structure
(dict) –
suiteRunId (string) –
Starts a Device Advisor test suite run based on suite Run Id.
suiteRunArn (string) –
Starts a Device Advisor test suite run based on suite run arn.
createdAt (datetime) –
Starts a Device Advisor test suite run based on suite create time.
Exceptions
tag_resource
(**kwargs)¶Adds to and modifies existing tags of an IoT Device Advisor resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
resourceArn (string) –
[REQUIRED]
The resource ARN of an IoT Device Advisor resource.
tags (dict) –
[REQUIRED]
The tags to be attached to the IoT Device Advisor resource.
(string) –
(string) –
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
untag_resource
(**kwargs)¶Removes tags from an IoT Device Advisor resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
resourceArn (string) –
[REQUIRED]
The resource ARN of an IoT Device Advisor resource.
tagKeys (list) –
[REQUIRED]
List of tag keys to remove from the IoT Device Advisor resource.
(string) –
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
update_suite_definition
(**kwargs)¶Updates a Device Advisor test suite.
See also: AWS API Documentation
Request Syntax
response = client.update_suite_definition(
suiteDefinitionId='string',
suiteDefinitionConfiguration={
'suiteDefinitionName': 'string',
'devices': [
{
'thingArn': 'string',
'certificateArn': 'string'
},
],
'intendedForQualification': True|False,
'rootGroup': 'string',
'devicePermissionRoleArn': 'string'
}
)
suiteDefinitionId (string) –
[REQUIRED]
Updates a Device Advisor test suite with suite definition id.
suiteDefinitionConfiguration (dict) –
Updates a Device Advisor test suite with suite definition configuration.
suiteDefinitionName (string) –
Gets Suite Definition Configuration name.
devices (list) –
Gets the devices configured.
(dict) –
Lists all the devices under test
thingArn (string) –
Lists devices thing arn
certificateArn (string) –
Lists devices certificate arn
intendedForQualification (boolean) –
Gets the tests intended for qualification in a suite.
rootGroup (string) –
Gets test suite root group.
devicePermissionRoleArn (string) –
Gets device permission arn.
dict
Response Syntax
{
'suiteDefinitionId': 'string',
'suiteDefinitionArn': 'string',
'suiteDefinitionName': 'string',
'suiteDefinitionVersion': 'string',
'createdAt': datetime(2015, 1, 1),
'lastUpdatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) –
suiteDefinitionId (string) –
Updates a Device Advisor test suite with suite UUID.
suiteDefinitionArn (string) –
Updates a Device Advisor test suite with Amazon Resource name.
suiteDefinitionName (string) –
Updates a Device Advisor test suite with suite definition name.
suiteDefinitionVersion (string) –
Updates a Device Advisor test suite with suite definition version.
createdAt (datetime) –
Updates a Device Advisor test suite with TimeStamp of when it was created.
lastUpdatedAt (datetime) –
Updates a Device Advisor test suite with TimeStamp of when it was updated.
Exceptions
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
IoTDeviceAdvisor.Client.exceptions.
ConflictException
¶Sends Conflict Exception.
Example
try:
...
except client.exceptions.ConflictException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Sends Conflict Exception.
message (string) –
Sends Conflict Exception message.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
IoTDeviceAdvisor.Client.exceptions.
InternalServerException
¶Sends Internal Failure Exception.
Example
try:
...
except client.exceptions.InternalServerException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Sends Internal Failure Exception.
message (string) –
Sends Internal Failure Exception message.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
IoTDeviceAdvisor.Client.exceptions.
ResourceNotFoundException
¶Sends Resource Not Found Exception.
Example
try:
...
except client.exceptions.ResourceNotFoundException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Sends Resource Not Found Exception.
message (string) –
Sends Resource Not Found Exception message.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
IoTDeviceAdvisor.Client.exceptions.
ValidationException
¶Sends invalid request exception.
Example
try:
...
except client.exceptions.ValidationException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Sends invalid request exception.
message (string) –
Sends invalid request exception message.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
The available paginators are: