The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Paws::IoT - Perl Interface to AWS AWS IoT

SYNOPSIS

  use Paws;

  my $obj = Paws->service('IoT');
  my $res = $obj->Method(
    Arg1 => $val1,
    Arg2 => [ 'V1', 'V2' ],
    # if Arg3 is an object, the HashRef will be used as arguments to the constructor
    # of the arguments type
    Arg3 => { Att1 => 'Val1' },
    # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
    # the constructor of the arguments type
    Arg4 => [ { Att1 => 'Val1'  }, { Att1 => 'Val2' } ],
  );

DESCRIPTION

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.

METHODS

AcceptCertificateTransfer(CertificateId => Str, [SetAsActive => Bool])

Each argument is described in detail in: Paws::IoT::AcceptCertificateTransfer

Returns: nothing

  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.

AttachPrincipalPolicy(PolicyName => Str, Principal => Str)

Each argument is described in detail in: Paws::IoT::AttachPrincipalPolicy

Returns: nothing

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

AttachThingPrincipal(Principal => Str, ThingName => Str)

Each argument is described in detail in: Paws::IoT::AttachThingPrincipal

Returns: a Paws::IoT::AttachThingPrincipalResponse instance

  Attaches the specified principal to the specified thing.

CancelCertificateTransfer(CertificateId => Str)

Each argument is described in detail in: Paws::IoT::CancelCertificateTransfer

Returns: nothing

  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.

CreateCertificateFromCsr(CertificateSigningRequest => Str, [SetAsActive => Bool])

Each argument is described in detail in: Paws::IoT::CreateCertificateFromCsr

Returns: a Paws::IoT::CreateCertificateFromCsrResponse instance

  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"

CreateKeysAndCertificate([SetAsActive => Bool])

Each argument is described in detail in: Paws::IoT::CreateKeysAndCertificate

Returns: a Paws::IoT::CreateKeysAndCertificateResponse instance

  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.

CreatePolicy(PolicyDocument => Str, PolicyName => Str)

Each argument is described in detail in: Paws::IoT::CreatePolicy

Returns: a Paws::IoT::CreatePolicyResponse instance

  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.

CreatePolicyVersion(PolicyDocument => Str, PolicyName => Str, [SetAsDefault => Bool])

Each argument is described in detail in: Paws::IoT::CreatePolicyVersion

Returns: a Paws::IoT::CreatePolicyVersionResponse instance

  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).

CreateThing(ThingName => Str, [AttributePayload => Paws::IoT::AttributePayload, ThingTypeName => Str])

Each argument is described in detail in: Paws::IoT::CreateThing

Returns: a Paws::IoT::CreateThingResponse instance

  Creates a thing record in the thing registry.

CreateThingType(ThingTypeName => Str, [ThingTypeProperties => Paws::IoT::ThingTypeProperties])

Each argument is described in detail in: Paws::IoT::CreateThingType

Returns: a Paws::IoT::CreateThingTypeResponse instance

  Creates a new thing type.

CreateTopicRule(RuleName => Str, TopicRulePayload => Paws::IoT::TopicRulePayload)

Each argument is described in detail in: Paws::IoT::CreateTopicRule

Returns: nothing

  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.

DeleteCACertificate(CertificateId => Str)

Each argument is described in detail in: Paws::IoT::DeleteCACertificate

Returns: a Paws::IoT::DeleteCACertificateResponse instance

  Deletes a registered CA certificate.

DeleteCertificate(CertificateId => Str)

Each argument is described in detail in: Paws::IoT::DeleteCertificate

Returns: nothing

  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.

DeletePolicy(PolicyName => Str)

Each argument is described in detail in: Paws::IoT::DeletePolicy

Returns: nothing

  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.

DeletePolicyVersion(PolicyName => Str, PolicyVersionId => Str)

Each argument is described in detail in: Paws::IoT::DeletePolicyVersion

Returns: nothing

  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.

DeleteRegistrationCode()

Each argument is described in detail in: Paws::IoT::DeleteRegistrationCode

Returns: a Paws::IoT::DeleteRegistrationCodeResponse instance

  Deletes a CA certificate registration code.

DeleteThing(ThingName => Str, [ExpectedVersion => Int])

Each argument is described in detail in: Paws::IoT::DeleteThing

Returns: a Paws::IoT::DeleteThingResponse instance

  Deletes the specified thing.

DeleteThingType(ThingTypeName => Str)

Each argument is described in detail in: Paws::IoT::DeleteThingType

Returns: a Paws::IoT::DeleteThingTypeResponse instance

  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.

DeleteTopicRule(RuleName => Str)

Each argument is described in detail in: Paws::IoT::DeleteTopicRule

Returns: nothing

  Deletes the specified rule.

DeprecateThingType(ThingTypeName => Str, [UndoDeprecate => Bool])

Each argument is described in detail in: Paws::IoT::DeprecateThingType

Returns: a Paws::IoT::DeprecateThingTypeResponse instance

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

DescribeCACertificate(CertificateId => Str)

Each argument is described in detail in: Paws::IoT::DescribeCACertificate

Returns: a Paws::IoT::DescribeCACertificateResponse instance

  Describes a registered CA certificate.

DescribeCertificate(CertificateId => Str)

Each argument is described in detail in: Paws::IoT::DescribeCertificate

Returns: a Paws::IoT::DescribeCertificateResponse instance

  Gets information about the specified certificate.

DescribeEndpoint()

Each argument is described in detail in: Paws::IoT::DescribeEndpoint

Returns: a Paws::IoT::DescribeEndpointResponse instance

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

DescribeThing(ThingName => Str)

Each argument is described in detail in: Paws::IoT::DescribeThing

Returns: a Paws::IoT::DescribeThingResponse instance

  Gets information about the specified thing.

DescribeThingType(ThingTypeName => Str)

Each argument is described in detail in: Paws::IoT::DescribeThingType

Returns: a Paws::IoT::DescribeThingTypeResponse instance

  Gets information about the specified thing type.

DetachPrincipalPolicy(PolicyName => Str, Principal => Str)

Each argument is described in detail in: Paws::IoT::DetachPrincipalPolicy

Returns: nothing

  Removes the specified policy from the specified certificate.

DetachThingPrincipal(Principal => Str, ThingName => Str)

Each argument is described in detail in: Paws::IoT::DetachThingPrincipal

Returns: a Paws::IoT::DetachThingPrincipalResponse instance

  Detaches the specified principal from the specified thing.

DisableTopicRule(RuleName => Str)

Each argument is described in detail in: Paws::IoT::DisableTopicRule

Returns: nothing

  Disables the specified rule.

EnableTopicRule(RuleName => Str)

Each argument is described in detail in: Paws::IoT::EnableTopicRule

Returns: nothing

  Enables the specified rule.

GetLoggingOptions()

Each argument is described in detail in: Paws::IoT::GetLoggingOptions

Returns: a Paws::IoT::GetLoggingOptionsResponse instance

  Gets the logging options.

GetPolicy(PolicyName => Str)

Each argument is described in detail in: Paws::IoT::GetPolicy

Returns: a Paws::IoT::GetPolicyResponse instance

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

GetPolicyVersion(PolicyName => Str, PolicyVersionId => Str)

Each argument is described in detail in: Paws::IoT::GetPolicyVersion

Returns: a Paws::IoT::GetPolicyVersionResponse instance

  Gets information about the specified policy version.

GetRegistrationCode()

Each argument is described in detail in: Paws::IoT::GetRegistrationCode

Returns: a Paws::IoT::GetRegistrationCodeResponse instance

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

GetTopicRule(RuleName => Str)

Each argument is described in detail in: Paws::IoT::GetTopicRule

Returns: a Paws::IoT::GetTopicRuleResponse instance

  Gets information about the specified rule.

ListCACertificates([AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListCACertificates

Returns: a Paws::IoT::ListCACertificatesResponse instance

  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.

ListCertificates([AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListCertificates

Returns: a Paws::IoT::ListCertificatesResponse instance

  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.

ListCertificatesByCA(CaCertificateId => Str, [AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListCertificatesByCA

Returns: a Paws::IoT::ListCertificatesByCAResponse instance

  List the device certificates signed by the specified CA certificate.

ListOutgoingCertificates([AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListOutgoingCertificates

Returns: a Paws::IoT::ListOutgoingCertificatesResponse instance

  Lists certificates that are being transfered but not yet accepted.

ListPolicies([AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListPolicies

Returns: a Paws::IoT::ListPoliciesResponse instance

  Lists your policies.

ListPolicyPrincipals(PolicyName => Str, [AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListPolicyPrincipals

Returns: a Paws::IoT::ListPolicyPrincipalsResponse instance

  Lists the principals associated with the specified policy.

ListPolicyVersions(PolicyName => Str)

Each argument is described in detail in: Paws::IoT::ListPolicyVersions

Returns: a Paws::IoT::ListPolicyVersionsResponse instance

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

ListPrincipalPolicies(Principal => Str, [AscendingOrder => Bool, Marker => Str, PageSize => Int])

Each argument is described in detail in: Paws::IoT::ListPrincipalPolicies

Returns: a Paws::IoT::ListPrincipalPoliciesResponse instance

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

ListPrincipalThings(Principal => Str, [MaxResults => Int, NextToken => Str])

Each argument is described in detail in: Paws::IoT::ListPrincipalThings

Returns: a Paws::IoT::ListPrincipalThingsResponse instance

  Lists the things associated with the specified principal.

ListThingPrincipals(ThingName => Str)

Each argument is described in detail in: Paws::IoT::ListThingPrincipals

Returns: a Paws::IoT::ListThingPrincipalsResponse instance

  Lists the principals associated with the specified thing.

ListThings([AttributeName => Str, AttributeValue => Str, MaxResults => Int, NextToken => Str, ThingTypeName => Str])

Each argument is described in detail in: Paws::IoT::ListThings

Returns: a Paws::IoT::ListThingsResponse instance

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

ListThingTypes([MaxResults => Int, NextToken => Str, ThingTypeName => Str])

Each argument is described in detail in: Paws::IoT::ListThingTypes

Returns: a Paws::IoT::ListThingTypesResponse instance

  Lists the existing thing types.

ListTopicRules([MaxResults => Int, NextToken => Str, RuleDisabled => Bool, Topic => Str])

Each argument is described in detail in: Paws::IoT::ListTopicRules

Returns: a Paws::IoT::ListTopicRulesResponse instance

  Lists the rules for the specific topic.

RegisterCACertificate(CaCertificate => Str, VerificationCertificate => Str, [AllowAutoRegistration => Bool, SetAsActive => Bool])

Each argument is described in detail in: Paws::IoT::RegisterCACertificate

Returns: a Paws::IoT::RegisterCACertificateResponse instance

  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.

RegisterCertificate(CertificatePem => Str, [CaCertificatePem => Str, SetAsActive => Bool, Status => Str])

Each argument is described in detail in: Paws::IoT::RegisterCertificate

Returns: a Paws::IoT::RegisterCertificateResponse instance

  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.

RejectCertificateTransfer(CertificateId => Str, [RejectReason => Str])

Each argument is described in detail in: Paws::IoT::RejectCertificateTransfer

Returns: nothing

  Rejects a pending certificate transfer. After AWS IoT rejects a
certificate transfer, the certificate status changes from
B<PENDING_TRANSFER> to B<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.

ReplaceTopicRule(RuleName => Str, TopicRulePayload => Paws::IoT::TopicRulePayload)

Each argument is described in detail in: Paws::IoT::ReplaceTopicRule

Returns: nothing

  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.

SetDefaultPolicyVersion(PolicyName => Str, PolicyVersionId => Str)

Each argument is described in detail in: Paws::IoT::SetDefaultPolicyVersion

Returns: nothing

  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.

SetLoggingOptions(LoggingOptionsPayload => Paws::IoT::LoggingOptionsPayload)

Each argument is described in detail in: Paws::IoT::SetLoggingOptions

Returns: nothing

  Sets the logging options.

TransferCertificate(CertificateId => Str, TargetAwsAccount => Str, [TransferMessage => Str])

Each argument is described in detail in: Paws::IoT::TransferCertificate

Returns: a Paws::IoT::TransferCertificateResponse instance

  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.

UpdateCACertificate(CertificateId => Str, [NewAutoRegistrationStatus => Str, NewStatus => Str])

Each argument is described in detail in: Paws::IoT::UpdateCACertificate

Returns: nothing

  Updates a registered CA certificate.

UpdateCertificate(CertificateId => Str, NewStatus => Str)

Each argument is described in detail in: Paws::IoT::UpdateCertificate

Returns: nothing

  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.

UpdateThing(ThingName => Str, [AttributePayload => Paws::IoT::AttributePayload, ExpectedVersion => Int, RemoveThingType => Bool, ThingTypeName => Str])

Each argument is described in detail in: Paws::IoT::UpdateThing

Returns: a Paws::IoT::UpdateThingResponse instance

  Updates the data for a thing.

PAGINATORS

Paginator methods are helpers that repetively call methods that return partial results

SEE ALSO

This service class forms part of Paws

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues