baiji v0.6.11 Baiji.Iot

AWS IoT

AWS IoT provides secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate with, configure rules for data processing and integration with other services, organize resources associated with each thing (Thing Registry), configure logging, and create and manage policies and credentials to authenticate things.

For more information about how AWS IoT works, see the Developer Guide.

Link to this section Summary

Functions

Returns a map containing the input/output shapes for this endpoint

Outputs values common to all actions

Accepts a pending certificate transfer. The default state of the certificate is INACTIVE

Attaches the specified policy to the specified principal (certificate or other credential)

Attaches the specified principal to the specified thing

Cancels a pending transfer for the specified certificate

Creates an X.509 certificate using the specified certificate signing request

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key

Creates an AWS IoT policy

Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one

Creates a thing record in the thing registry

Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule

Deletes a registered CA certificate

Deletes the specified certificate

Deletes the specified policy

Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions

Deletes a CA certificate registration code

Deletes the specified thing

Deletes the specified thing type . You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type

Deprecates a thing type. You can not associate new things with deprecated thing type

Describes a registered CA certificate

Gets information about the specified certificate

Returns a unique endpoint specific to the AWS account making the call

Gets information about the specified thing

Gets information about the specified thing type

Removes the specified policy from the specified certificate

Detaches the specified principal from the specified thing

Gets information about the specified policy with the policy document of the default version

Gets information about the specified policy version

Gets a registration code used to register a CA certificate with AWS IoT

Gets information about the specified rule

Lists the CA certificates registered for your AWS account

Lists the certificates registered in your AWS account

List the device certificates signed by the specified CA certificate

Lists certificates that are being transfered but not yet accepted

Lists the principals associated with the specified policy

Lists the versions of the specified policy and identifies the default version

Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in AmazonCognito Identity format

Lists the things associated with the specified principal

Lists the principals associated with the specified thing

Lists the existing thing types

Lists your things. Use the attributeName and attributeValue parameters to filter your things. For example, calling ListThings with attributeName=Color and attributeValue=Red retrieves all things in the registry that contain an attribute Color with the value Red

Lists the rules for the specific topic

Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign device certificates, which can be then registered with AWS IoT. You can register up to 10 CA certificates per AWS account that have the same subject field. This enables you to have up to 10 certificate authorities sign your device certificates. If you have more than one CA certificate registered, make sure you pass the CA certificate when you register your device certificates with the RegisterCertificate API

Registers a device certificate with AWS IoT. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered

Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE

Replaces the specified rule. You must specify all parameters for the new rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule

Sets the specified version of the specified policy as the policy’s default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the ListPrincipalPolicy API

Transfers the specified certificate to the specified AWS account

Updates a registered CA certificate

Updates the status of the specified certificate. This operation is idempotent

Updates the data for a thing

Link to this section Functions

Returns a map containing the input/output shapes for this endpoint

Outputs values common to all actions

Link to this function accept_certificate_transfer(input \\ %{}, options \\ [])

Accepts a pending certificate transfer. The default state of the certificate is INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

Link to this function attach_principal_policy(input \\ %{}, options \\ [])

Attaches the specified policy to the specified principal (certificate or other credential).

Link to this function attach_thing_principal(input \\ %{}, options \\ [])

Attaches the specified principal to the specified thing.

Link to this function cancel_certificate_transfer(input \\ %{}, options \\ [])

Cancels a pending transfer for the specified certificate.

Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.

After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.

Link to this function create_certificate_from_csr(input \\ %{}, options \\ [])

Creates an X.509 certificate using the specified certificate signing request.

Note: The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 curves.

Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.

You can create multiple certificates in a batch by creating a directory, copying multiple .csr files into that directory, and then specifying that directory on the command line. The following commands show how to create a batch of certificates given a batch of CSRs.

Assuming a set of CSRs are located inside of the directory my-csr-directory:

On Linux and OS X, the command is:

$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr —certificate-signing-request file://my-csr-directory/{}

This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the aws iot create-certificate-from-csr AWS CLI command to create a certificate for the corresponding CSR.

The aws iot create-certificate-from-csr part of the command can also be run in parallel to speed up the certificate creation process:

$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr —certificate-signing-request file://my-csr-directory/{}

On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:

> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr —certificate-signing-request file://my-csr-directory/$_}

On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:

> forfiles /p my-csr-directory /c “cmd /c aws iot create-certificate-from-csr —certificate-signing-request file://@path”

Link to this function create_keys_and_certificate(input \\ %{}, options \\ [])

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key.

Note This is the only time AWS IoT issues the private key for this certificate, so it is important to keep it in a secure location.

Link to this function create_policy(input \\ %{}, options \\ [])

Creates an AWS IoT policy.

The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy’s default version.

Link to this function create_policy_version(input \\ %{}, options \\ [])

Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one.

Optionally, you can set the new version as the policy’s default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

Link to this function create_thing(input \\ %{}, options \\ [])

Creates a thing record in the thing registry.

Link to this function create_thing_type(input \\ %{}, options \\ [])

Creates a new thing type.

Link to this function create_topic_rule(input \\ %{}, options \\ [])

Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Link to this function delete_c_a_certificate(input \\ %{}, options \\ [])

Deletes a registered CA certificate.

Link to this function delete_certificate(input \\ %{}, options \\ [])

Deletes the specified certificate.

A certificate cannot be deleted if it has a policy attached to it or if its status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the UpdateCertificate API to set the certificate to the INACTIVE status.

Link to this function delete_policy(input \\ %{}, options \\ [])

Deletes the specified policy.

A policy cannot be deleted if it has non-default versions or it is attached to any certificate.

To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.

When a policy is deleted using DeletePolicy, its default version is deleted with it.

Link to this function delete_policy_version(input \\ %{}, options \\ [])

Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

Link to this function delete_registration_code(input \\ %{}, options \\ [])

Deletes a CA certificate registration code.

Link to this function delete_thing(input \\ %{}, options \\ [])

Deletes the specified thing.

Link to this function delete_thing_type(input \\ %{}, options \\ [])

Deletes the specified thing type . You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type.

Link to this function delete_topic_rule(input \\ %{}, options \\ [])

Deletes the specified rule.

Link to this function deprecate_thing_type(input \\ %{}, options \\ [])

Deprecates a thing type. You can not associate new things with deprecated thing type.

Link to this function describe_c_a_certificate(input \\ %{}, options \\ [])

Describes a registered CA certificate.

Link to this function describe_certificate(input \\ %{}, options \\ [])

Gets information about the specified certificate.

Link to this function describe_endpoint(input \\ %{}, options \\ [])

Returns a unique endpoint specific to the AWS account making the call.

Link to this function describe_thing(input \\ %{}, options \\ [])

Gets information about the specified thing.

Link to this function describe_thing_type(input \\ %{}, options \\ [])

Gets information about the specified thing type.

Link to this function detach_principal_policy(input \\ %{}, options \\ [])

Removes the specified policy from the specified certificate.

Link to this function detach_thing_principal(input \\ %{}, options \\ [])

Detaches the specified principal from the specified thing.

Link to this function disable_topic_rule(input \\ %{}, options \\ [])

Disables the specified rule.

Link to this function enable_topic_rule(input \\ %{}, options \\ [])

Enables the specified rule.

Link to this function get_logging_options(input \\ %{}, options \\ [])

Gets the logging options.

Link to this function get_policy(input \\ %{}, options \\ [])

Gets information about the specified policy with the policy document of the default version.

Link to this function get_policy_version(input \\ %{}, options \\ [])

Gets information about the specified policy version.

Link to this function get_registration_code(input \\ %{}, options \\ [])

Gets a registration code used to register a CA certificate with AWS IoT.

Link to this function get_topic_rule(input \\ %{}, options \\ [])

Gets information about the specified rule.

Link to this function list_c_a_certificates(input \\ %{}, options \\ [])

Lists the CA certificates registered for your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Link to this function list_certificates(input \\ %{}, options \\ [])

Lists the certificates registered in your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Link to this function list_certificates_by_c_a(input \\ %{}, options \\ [])

List the device certificates signed by the specified CA certificate.

Link to this function list_outgoing_certificates(input \\ %{}, options \\ [])

Lists certificates that are being transfered but not yet accepted.

Link to this function list_policies(input \\ %{}, options \\ [])

Lists your policies.

Link to this function list_policy_principals(input \\ %{}, options \\ [])

Lists the principals associated with the specified policy.

Link to this function list_policy_versions(input \\ %{}, options \\ [])

Lists the versions of the specified policy and identifies the default version.

Link to this function list_principal_policies(input \\ %{}, options \\ [])

Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in AmazonCognito Identity format.

Link to this function list_principal_things(input \\ %{}, options \\ [])

Lists the things associated with the specified principal.

Link to this function list_thing_principals(input \\ %{}, options \\ [])

Lists the principals associated with the specified thing.

Link to this function list_thing_types(input \\ %{}, options \\ [])

Lists the existing thing types.

Link to this function list_things(input \\ %{}, options \\ [])

Lists your things. Use the attributeName and attributeValue parameters to filter your things. For example, calling ListThings with attributeName=Color and attributeValue=Red retrieves all things in the registry that contain an attribute Color with the value Red.

Link to this function list_topic_rules(input \\ %{}, options \\ [])

Lists the rules for the specific topic.

Link to this function register_c_a_certificate(input \\ %{}, options \\ [])

Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign device certificates, which can be then registered with AWS IoT. You can register up to 10 CA certificates per AWS account that have the same subject field. This enables you to have up to 10 certificate authorities sign your device certificates. If you have more than one CA certificate registered, make sure you pass the CA certificate when you register your device certificates with the RegisterCertificate API.

Link to this function register_certificate(input \\ %{}, options \\ [])

Registers a device certificate with AWS IoT. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.

Link to this function reject_certificate_transfer(input \\ %{}, options \\ [])

Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

This operation can only be called by the transfer destination. After it is called, the certificate will be returned to the source’s account in the INACTIVE state.

Link to this function replace_topic_rule(input \\ %{}, options \\ [])

Replaces the specified rule. You must specify all parameters for the new rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Link to this function set_default_policy_version(input \\ %{}, options \\ [])

Sets the specified version of the specified policy as the policy’s default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the ListPrincipalPolicy API.

Link to this function set_logging_options(input \\ %{}, options \\ [])

Sets the logging options.

Link to this function transfer_certificate(input \\ %{}, options \\ [])

Transfers the specified certificate to the specified AWS account.

You can cancel the transfer until it is acknowledged by the recipient.

No notification is sent to the transfer destination’s account. It is up to the caller to notify the transfer target.

The certificate being transferred must not be in the ACTIVE state. You can use the UpdateCertificate API to deactivate it.

The certificate must not have any policies attached to it. You can use the DetachPrincipalPolicy API to detach them.

Link to this function update_c_a_certificate(input \\ %{}, options \\ [])

Updates a registered CA certificate.

Link to this function update_certificate(input \\ %{}, options \\ [])

Updates the status of the specified certificate. This operation is idempotent.

Moving a certificate from the ACTIVE state (including REVOKED) will not disconnect currently connected devices, but these devices will be unable to reconnect.

The ACTIVE state is required to authenticate devices connecting to AWS IoT using a certificate.

Link to this function update_thing(input \\ %{}, options \\ [])

Updates the data for a thing.