logo
pub struct IotClient { /* private fields */ }
Expand description

A client for the AWS IoT API.

Implementations

Creates a client backed by the default tokio event loop.

The client will use the default credentials provider and tls client.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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.

Adds a thing to a billing group.

Adds a thing to a thing group.

Associates a group with a continuous job. The following criteria must be met:

  • The job must have been created with the targetSelection field set to "CONTINUOUS".

  • The job status must currently be "IN_PROGRESS".

  • The total number of targets associated with a job must not exceed 100.

Attaches a policy to the specified target.

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

Note: This API is deprecated. Please use AttachPolicy instead.

Associates a Device Defender security profile with a thing group or this account. Each thing group or account can have up to five security profiles associated with it.

Attaches the specified principal to the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException occurs.

Cancels an audit that is in progress. The audit can be either scheduled or on demand. If the audit isn't in progress, an "InvalidRequestException" occurs.

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.

Cancels a Device Defender ML Detect mitigation action.

Cancels a job.

Cancels the execution of a job for a given thing.

Clears the default authorizer.

Confirms a topic rule destination. When you create a rule requiring a destination, AWS IoT sends a confirmation message to the endpoint or base address you specify. The message includes a token which you pass back when calling ConfirmTopicRuleDestination to confirm that you own or have access to the endpoint.

Creates a Device Defender audit suppression.

Creates an authorizer.

Creates a billing group.

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"

Use this API to define a Custom Metric published by your devices to Device Defender.

Create a dimension that you can use to limit the scope of a metric used in a security profile for AWS IoT Device Defender. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.

Creates a domain configuration.

Creates a dynamic thing group.

Creates a job.

Creates a job template.

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key. You can also call CreateKeysAndCertificate over MQTT from a device, for more information, see Provisioning MQTT API.

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.

Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change.

Creates an AWS IoT OTAUpdate on a target group of things or groups.

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 provisioning claim.

Creates a fleet provisioning template.

Creates a new version of a fleet provisioning template.

Creates a role alias.

Creates a scheduled audit that is run at a specified time interval.

Creates a Device Defender security profile.

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream.

Creates a thing record in the registry. If this call is made multiple times using the same thing name and configuration, the call will succeed. If this call is made with the same thing name but different configuration a ResourceAlreadyExistsException is thrown.

This is a control plane operation. See Authorization for information about authorizing control plane actions.

Create a thing group.

This is a control plane operation. See Authorization for information about authorizing control plane actions.

Creates a new thing type.

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.

Creates a topic rule destination. The destination must be confirmed prior to use.

Restores the default settings for Device Defender audits for this account. Any configuration data you entered is deleted and all audit checks are reset to disabled.

Deletes a Device Defender audit suppression.

Deletes an authorizer.

Deletes the billing group.

Deletes a registered CA certificate.

Deletes the specified certificate.

A certificate cannot be deleted if it has a policy or IoT thing 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.

Before you can delete a custom metric, you must first remove the custom metric from all security profiles it's a part of. The security profile associated with the custom metric can be found using the ListSecurityProfiles API with metricName set to your custom metric name.

Deletes a Device Defender detect custom metric.

Removes the specified dimension from your AWS account.

Deletes the specified domain configuration.

Deletes a dynamic thing group.

Deletes a job and its related job executions.

Deleting a job may take time, depending on the number of job executions created for the job and various other factors. While the job is being deleted, the status of the job will be shown as "DELETION_IN_PROGRESS". Attempting to delete or cancel a job whose status is already "DELETION_IN_PROGRESS" will result in an error.

Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or a LimitExceededException will occur.

Deletes a job execution.

Deletes the specified job template.

Deletes a defined mitigation action from your AWS account.

Delete an OTA update.

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 a fleet provisioning template.

Deletes a fleet provisioning template version.

Deletes a CA certificate registration code.

Deletes a role alias

Deletes a scheduled audit.

Deletes a Device Defender security profile.

Deletes a stream.

Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a thing that doesn't exist.

Deletes a thing group.

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.

Deletes the rule.

Deletes a topic rule destination.

Deletes a logging level.

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

Gets information about the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and the start time when the audit that returned the finding.

Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. Properties include the actions being applied, the audit checks to which they're being applied, the task status, and aggregated task statistics.

Gets information about a Device Defender audit suppression.

Gets information about a Device Defender audit.

Describes an authorizer.

Returns information about a billing group.

Describes a registered CA certificate.

Gets information about the specified certificate.

Gets information about a Device Defender detect custom metric.

Describes the default authorizer.

Gets information about a Device Defender ML Detect mitigation action.

Provides details about a dimension that is defined in your AWS account.

Gets summary information about a domain configuration.

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

Describes event configurations.

Describes a search index.

Describes a job.

Describes a job execution.

Returns information about a job template.

Gets information about a mitigation action.

Returns information about a fleet provisioning template.

Returns information about a fleet provisioning template version.

Describes a role alias.

Gets information about a scheduled audit.

Gets information about a Device Defender security profile.

Gets information about a stream.

Gets information about the specified thing.

Describe a thing group.

Describes a bulk thing provisioning task.

Gets information about the specified thing type.

Detaches a policy from the specified target.

Removes the specified policy from the specified certificate.

Note: This API is deprecated. Please use DetachPolicy instead.

Disassociates a Device Defender security profile from a thing group or from this account.

Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

This call is asynchronous. It might take several seconds for the detachment to propagate.

Disables the rule.

Enables the rule.

Returns a Device Defender's ML Detect Security Profile training model's status.

Returns the approximate count of unique values that match the query.

Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the AWS IoT device gateway.

Gets the indexing configuration.

Gets a job document.

Gets the logging options.

NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead.

Gets an OTA update.

Groups the aggregated values that match the query into percentile groupings. The default percentile groupings are: 1,5,25,50,75,95,99, although you can specify your own when you call GetPercentiles. This function returns a value for each percentile group specified (or the default percentile groupings). The percentile group "1" contains the aggregated field value that occurs in approximately one percent of the values that match the query. The percentile group "5" contains the aggregated field value that occurs in approximately five percent of the values that match the query, and so on. The result is an approximation, the more values that match the query, the more accurate the percentile values.

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.

Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String, only the count statistic is returned.

Gets information about the rule.

Gets information about a topic rule destination.

Gets the fine grained logging options.

Lists the active violations for a given Device Defender security profile.

Lists the policies attached to the specified thing group.

Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time period. (Findings are retained for 90 days.)

Gets the status of audit mitigation action tasks that were executed.

Gets a list of audit mitigation action tasks that match the specified filters.

Lists your Device Defender audit listings.

Lists the Device Defender audits that have been performed during a given time period.

Lists the authorizers registered in your account.

Lists the billing groups you have created.

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 your Device Defender detect custom metrics.

Lists mitigation actions executions for a Device Defender ML Detect Security Profile.

List of Device Defender ML Detect mitigation actions tasks.

List the set of dimensions that are defined for your AWS account.

Gets a list of domain configurations for the user. This list is sorted alphabetically by domain configuration name.

Lists the search indices.

Lists the job executions for a job.

Lists the job executions for the specified thing.

Returns a list of job templates.

Lists jobs.

Gets a list of all mitigation actions that match the specified filter criteria.

Lists OTA updates.

Lists certificates that are being transferred but not yet accepted.

Lists your policies.

Lists the principals associated with the specified policy.

Note: This API is deprecated. Please use ListTargetsForPolicy instead.

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.

Note: This API is deprecated. Please use ListAttachedPolicies instead.

Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

A list of fleet provisioning template versions.

Lists the fleet provisioning templates in your AWS account.

Lists the role aliases registered in your account.

Lists all of your scheduled audits.

Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or custom metric.

dimensionName and metricName cannot be used in the same request.

Lists the Device Defender security profiles attached to a target (thing group).

Lists all of the streams in your AWS account.

Lists the tags (metadata) you have assigned to the resource.

List targets for the specified policy.

Lists the targets (thing groups) associated with a given Device Defender security profile.

List the thing groups in your account.

List the thing groups to which the specified thing belongs.

Lists the principals associated with the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Information about the thing registration tasks.

List bulk thing provisioning tasks.

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.

You will not be charged for calling this API if an Access denied error is returned. You will also not be charged if no attributes or pagination token was provided in request and no pagination token and no results were returned.

Lists the things you have added to the given billing group.

Lists the things in the specified group.

Lists all the topic rule destinations in your AWS account.

Lists the rules for the specific topic.

Lists logging levels.

Lists the Device Defender security profile violations discovered during the given time period. You can use filters to limit the results to those alerts issued for a particular security profile, behavior, or thing (device).

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.

Register a certificate that does not have a certificate authority (CA).

Provisions a thing in the device registry. RegisterThing calls other AWS IoT control plane APIs. These calls might exceed your account level AWS IoT Throttling Limits and cause throttle errors. Please contact AWS Customer Support to raise your throttling limits if necessary.

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.

Removes the given thing from the billing group.

Remove the specified thing from the specified group.

You must specify either a thingGroupArn or a thingGroupName to identify the thing group and either a thingArn or a thingName to identify the thing to remove from the thing group.

Replaces the 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.

The query search index.

Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer.

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.

NOTE: use of this command is not recommended. Use SetV2LoggingOptions instead.

Sets the logging level.

Sets the logging options for the V2 logging service.

Starts a task that applies a set of mitigation actions to the specified target.

Starts a Device Defender ML Detect mitigation actions task.

Starts an on-demand Device Defender audit.

Creates a bulk thing provisioning task.

Cancels a bulk thing provisioning task.

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

Tests if a specified principal is authorized to perform an AWS IoT action on a specified resource. Use this to test and debug the authorization behavior of devices that connect to the AWS IoT device gateway.

Tests a custom authorization behavior by invoking a specified custom authorizer. Use this to test and debug the custom authorization behavior of devices that connect to the AWS IoT device gateway.

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.

Removes the given tags (metadata) from the resource.

Configures or reconfigures the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Updates a Device Defender audit suppression.

Updates an authorizer.

Updates information about the billing group.

Updates a registered CA certificate.

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

Certificates must be in the ACTIVE state to authenticate devices that use a certificate to connect to AWS IoT.

Within a few minutes of updating a certificate from the ACTIVE state to any other state, AWS IoT disconnects all devices that used that certificate to connect. Devices cannot use a certificate that is not in the ACTIVE state to reconnect.

Updates a Device Defender detect custom metric.

Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and recreate it).

Updates values stored in the domain configuration. Domain configurations for default endpoints can't be updated.

Updates a dynamic thing group.

Updates the event configurations.

Updates the search configuration.

Updates supported fields of the specified job.

Updates the definition for the specified mitigation action.

Updates a fleet provisioning template.

Updates a role alias.

Updates a scheduled audit, including which checks are performed and how often the audit takes place.

Updates a Device Defender security profile.

Updates an existing stream. The stream version will be incremented by one.

Updates the data for a thing.

Update a thing group.

Updates the groups to which the thing belongs.

Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination.

Validates a Device Defender security profile behaviors specification.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more