aws-elixir v0.0.11 AWS.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.
Summary
Functions
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 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 from the Thing Registry
Deletes the specified rule
Describes a registered CA certificate
Gets information about the specified certificate
Returns a unique endpoint specific to the AWS account making the call. You specify the following URI when updating state information for your thing: https://*endpoint*/things/*thingName*/shadow
Gets information about the specified thing
Removes the specified policy from the specified certificate
Detaches the specified principal from the specified thing
Disables the specified rule
Enables the specified rule
Gets the logging options
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 your policies
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 your things. You can pass an AttributeName or AttributeValue to filter your things (for example, “ListThings where AttributeName=Color and AttributeValue=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 and public key. 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
Sets the logging options
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
Functions
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.
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.
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.
Creates an X.509 certificate using the specified certificate signing request.
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”
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.
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.
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).
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.
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.
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.
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 the specified thing from the Thing Registry.
Describes a registered CA certificate.
Gets information about the specified certificate.
Returns a unique endpoint specific to the AWS account making the call. You specify the following URI when updating state information for your thing: https://*endpoint*/things/*thingName*/shadow.
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.
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.
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.
List the device certificates signed by the specified CA certificate.
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 your things. You can pass an AttributeName or AttributeValue to filter your things (for example, “ListThings where AttributeName=Color and AttributeValue=Red”).
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 and public key. 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.
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.
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.
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.
Updates a registered CA certificate.
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.