# WARNING: DO NOT EDIT, AUTO-GENERATED CODE! # See https://github.com/aws-beam/aws-codegen for more details. defmodule AWS.IotDeviceAdvisor do @moduledoc """ 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. """ alias AWS.Client alias AWS.Request def metadata do %AWS.ServiceMetadata{ abbreviation: nil, api_version: "2020-09-18", content_type: "application/x-amz-json-1.1", credential_scope: nil, endpoint_prefix: "api.iotdeviceadvisor", global?: false, protocol: "rest-json", service_id: "IotDeviceAdvisor", signature_version: "v4", signing_name: "iotdeviceadvisor", target_prefix: nil } end @doc """ Creates a Device Advisor test suite. """ def create_suite_definition(%Client{} = client, input, options \\ []) do url_path = "/suiteDefinitions" headers = [] query_params = [] Request.request_rest( client, metadata(), :post, url_path, query_params, headers, input, options, nil ) end @doc """ Deletes a Device Advisor test suite. """ def delete_suite_definition(%Client{} = client, suite_definition_id, input, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}" headers = [] query_params = [] Request.request_rest( client, metadata(), :delete, url_path, query_params, headers, input, options, nil ) end @doc """ Gets information about a Device Advisor test suite. """ def get_suite_definition( %Client{} = client, suite_definition_id, suite_definition_version \\ nil, options \\ [] ) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}" headers = [] query_params = [] query_params = if !is_nil(suite_definition_version) do [{"suiteDefinitionVersion", suite_definition_version} | query_params] else query_params end Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ Gets information about a Device Advisor test suite run. """ def get_suite_run(%Client{} = client, suite_definition_id, suite_run_id, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}/suiteRuns/#{AWS.Util.encode_uri(suite_run_id)}" headers = [] query_params = [] Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ Gets a report download link for a successful Device Advisor qualifying test suite run. """ def get_suite_run_report(%Client{} = client, suite_definition_id, suite_run_id, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}/suiteRuns/#{AWS.Util.encode_uri(suite_run_id)}/report" headers = [] query_params = [] Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ Lists the Device Advisor test suites you have created. """ def list_suite_definitions( %Client{} = client, max_results \\ nil, next_token \\ nil, options \\ [] ) do url_path = "/suiteDefinitions" headers = [] query_params = [] query_params = if !is_nil(next_token) do [{"nextToken", next_token} | query_params] else query_params end query_params = if !is_nil(max_results) do [{"maxResults", max_results} | query_params] else query_params end Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ 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. """ def list_suite_runs( %Client{} = client, max_results \\ nil, next_token \\ nil, suite_definition_id \\ nil, suite_definition_version \\ nil, options \\ [] ) do url_path = "/suiteRuns" headers = [] query_params = [] query_params = if !is_nil(suite_definition_version) do [{"suiteDefinitionVersion", suite_definition_version} | query_params] else query_params end query_params = if !is_nil(suite_definition_id) do [{"suiteDefinitionId", suite_definition_id} | query_params] else query_params end query_params = if !is_nil(next_token) do [{"nextToken", next_token} | query_params] else query_params end query_params = if !is_nil(max_results) do [{"maxResults", max_results} | query_params] else query_params end Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ Lists the tags attached to an IoT Device Advisor resource. """ def list_tags_for_resource(%Client{} = client, resource_arn, options \\ []) do url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}" headers = [] query_params = [] Request.request_rest( client, metadata(), :get, url_path, query_params, headers, nil, options, nil ) end @doc """ Starts a Device Advisor test suite run. """ def start_suite_run(%Client{} = client, suite_definition_id, input, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}/suiteRuns" headers = [] query_params = [] Request.request_rest( client, metadata(), :post, url_path, query_params, headers, input, options, nil ) end @doc """ Stops a Device Advisor test suite run that is currently running. """ def stop_suite_run(%Client{} = client, suite_definition_id, suite_run_id, input, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}/suiteRuns/#{AWS.Util.encode_uri(suite_run_id)}/stop" headers = [] query_params = [] Request.request_rest( client, metadata(), :post, url_path, query_params, headers, input, options, nil ) end @doc """ Adds to and modifies existing tags of an IoT Device Advisor resource. """ def tag_resource(%Client{} = client, resource_arn, input, options \\ []) do url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}" headers = [] query_params = [] Request.request_rest( client, metadata(), :post, url_path, query_params, headers, input, options, nil ) end @doc """ Removes tags from an IoT Device Advisor resource. """ def untag_resource(%Client{} = client, resource_arn, input, options \\ []) do url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}" headers = [] {query_params, input} = [ {"tagKeys", "tagKeys"} ] |> Request.build_params(input) Request.request_rest( client, metadata(), :delete, url_path, query_params, headers, input, options, nil ) end @doc """ Updates a Device Advisor test suite. """ def update_suite_definition(%Client{} = client, suite_definition_id, input, options \\ []) do url_path = "/suiteDefinitions/#{AWS.Util.encode_uri(suite_definition_id)}" headers = [] query_params = [] Request.request_rest( client, metadata(), :patch, url_path, query_params, headers, input, options, nil ) end end