AWSIoT Class Reference

Inherits from AWSService : NSObject
Declared in AWSIoTService.h
AWSIoTService.m

Overview

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.

  configuration

The service configuration used to instantiate this service client.

@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

Discussion

Warning: Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSIoTService.h

+ defaultIoT

Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

+ (instancetype)defaultIoT

Return Value

The default service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
    AWSServiceManager.default().defaultServiceConfiguration = configuration

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                      identityPoolId:@"YourIdentityPoolId"];
      AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                           credentialsProvider:credentialsProvider];
      [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

      return YES;
  }

Then call the following to get the default service client:

Swift

 let IoT = AWSIoT.default()

Objective-C

 AWSIoT *IoT = [AWSIoT defaultIoT];

Declared In

AWSIoTService.h

+ registerIoTWithConfiguration:forKey:

Creates a service client with the given service configuration and registers it for the key.

+ (void)registerIoTWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key

Parameters

configuration

A service configuration object.

key

A string to identify the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSIoT.register(with: configuration!, forKey: "USWest2IoT")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSIoT registerIoTWithConfiguration:configuration forKey:@"USWest2IoT"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let IoT = AWSIoT(forKey: "USWest2IoT")

Objective-C

 AWSIoT *IoT = [AWSIoT IoTForKey:@"USWest2IoT"];

Warning: After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSIoTService.h

+ IoTForKey:

Retrieves the service client associated with the key. You need to call + registerIoTWithConfiguration:forKey: before invoking this method.

+ (instancetype)IoTForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Return Value

An instance of the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSIoT.register(with: configuration!, forKey: "USWest2IoT")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSIoT registerIoTWithConfiguration:configuration forKey:@"USWest2IoT"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let IoT = AWSIoT(forKey: "USWest2IoT")

Objective-C

 AWSIoT *IoT = [AWSIoT IoTForKey:@"USWest2IoT"];

Declared In

AWSIoTService.h

+ removeIoTForKey:

Removes the service client associated with the key and release it.

+ (void)removeIoTForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Discussion

Warning: Before calling this method, make sure no method is running on this client.

Declared In

AWSIoTService.h

– acceptCertificateTransfer:

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.

- (AWSTask *)acceptCertificateTransfer:(AWSIoTAcceptCertificateTransferRequest *)request

Parameters

request

A container for the necessary parameters to execute the AcceptCertificateTransfer service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– acceptCertificateTransfer:completionHandler:

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.

- (void)acceptCertificateTransfer:(AWSIoTAcceptCertificateTransferRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the AcceptCertificateTransfer service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– attachPrincipalPolicy:

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

- (AWSTask *)attachPrincipalPolicy:(AWSIoTAttachPrincipalPolicyRequest *)request

Parameters

request

A container for the necessary parameters to execute the AttachPrincipalPolicy service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorLimitExceeded.

Declared In

AWSIoTService.h

– attachPrincipalPolicy:completionHandler:

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

- (void)attachPrincipalPolicy:(AWSIoTAttachPrincipalPolicyRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the AttachPrincipalPolicy service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorLimitExceeded.

Declared In

AWSIoTService.h

– attachThingPrincipal:

Attaches the specified principal to the specified thing.

- (AWSTask<AWSIoTAttachThingPrincipalResponse*> *)attachThingPrincipal:(AWSIoTAttachThingPrincipalRequest *)request

Parameters

request

A container for the necessary parameters to execute the AttachThingPrincipal service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTAttachThingPrincipalResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– attachThingPrincipal:completionHandler:

Attaches the specified principal to the specified thing.

- (void)attachThingPrincipal:(AWSIoTAttachThingPrincipalRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTAttachThingPrincipalResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the AttachThingPrincipal service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– cancelCertificateTransfer:

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.

- (AWSTask *)cancelCertificateTransfer:(AWSIoTCancelCertificateTransferRequest *)request

Parameters

request

A container for the necessary parameters to execute the CancelCertificateTransfer service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– cancelCertificateTransfer:completionHandler:

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.

- (void)cancelCertificateTransfer:(AWSIoTCancelCertificateTransferRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CancelCertificateTransfer service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createCertificateFromCsr:

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”

- (AWSTask<AWSIoTCreateCertificateFromCsrResponse*> *)createCertificateFromCsr:(AWSIoTCreateCertificateFromCsrRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreateCertificateFromCsr service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTCreateCertificateFromCsrResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createCertificateFromCsr:completionHandler:

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”

- (void)createCertificateFromCsr:(AWSIoTCreateCertificateFromCsrRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTCreateCertificateFromCsrResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateCertificateFromCsr service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createKeysAndCertificate:

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.

- (AWSTask<AWSIoTCreateKeysAndCertificateResponse*> *)createKeysAndCertificate:(AWSIoTCreateKeysAndCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreateKeysAndCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTCreateKeysAndCertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createKeysAndCertificate:completionHandler:

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.

- (void)createKeysAndCertificate:(AWSIoTCreateKeysAndCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTCreateKeysAndCertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateKeysAndCertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createPolicy:

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.

- (AWSTask<AWSIoTCreatePolicyResponse*> *)createPolicy:(AWSIoTCreatePolicyRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreatePolicy service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTCreatePolicyResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorMalformedPolicy, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createPolicy:completionHandler:

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.

- (void)createPolicy:(AWSIoTCreatePolicyRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTCreatePolicyResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreatePolicy service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorMalformedPolicy, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createPolicyVersion:

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

- (AWSTask<AWSIoTCreatePolicyVersionResponse*> *)createPolicyVersion:(AWSIoTCreatePolicyVersionRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreatePolicyVersion service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTCreatePolicyVersionResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorMalformedPolicy, AWSIoTErrorVersionsLimitExceeded, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createPolicyVersion:completionHandler:

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

- (void)createPolicyVersion:(AWSIoTCreatePolicyVersionRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTCreatePolicyVersionResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreatePolicyVersion service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorMalformedPolicy, AWSIoTErrorVersionsLimitExceeded, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– createThing:

Creates a thing in the Thing Registry.

- (AWSTask<AWSIoTCreateThingResponse*> *)createThing:(AWSIoTCreateThingRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreateThing service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTCreateThingResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceAlreadyExists.

Declared In

AWSIoTService.h

– createThing:completionHandler:

Creates a thing in the Thing Registry.

- (void)createThing:(AWSIoTCreateThingRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTCreateThingResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateThing service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceAlreadyExists.

Declared In

AWSIoTService.h

– createTopicRule:

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.

- (AWSTask *)createTopicRule:(AWSIoTCreateTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreateTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorSqlParse, AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorResourceAlreadyExists, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– createTopicRule:completionHandler:

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.

- (void)createTopicRule:(AWSIoTCreateTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorSqlParse, AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorResourceAlreadyExists, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– deleteCACertificate:

Deletes a registered CA certificate.

- (AWSTask<AWSIoTDeleteCACertificateResponse*> *)deleteCACertificate:(AWSIoTDeleteCACertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteCACertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDeleteCACertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateState, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– deleteCACertificate:completionHandler:

Deletes a registered CA certificate.

- (void)deleteCACertificate:(AWSIoTDeleteCACertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDeleteCACertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteCACertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateState, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– deleteCertificate:

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.

- (AWSTask *)deleteCertificate:(AWSIoTDeleteCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorCertificateState, AWSIoTErrorDeleteConflict, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– deleteCertificate:completionHandler:

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.

- (void)deleteCertificate:(AWSIoTDeleteCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteCertificate service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorCertificateState, AWSIoTErrorDeleteConflict, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– deletePolicy:

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.

- (AWSTask *)deletePolicy:(AWSIoTDeletePolicyRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeletePolicy service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorDeleteConflict, AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deletePolicy:completionHandler:

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.

- (void)deletePolicy:(AWSIoTDeletePolicyRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeletePolicy service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorDeleteConflict, AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deletePolicyVersion:

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.

- (AWSTask *)deletePolicyVersion:(AWSIoTDeletePolicyVersionRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeletePolicyVersion service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorDeleteConflict, AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deletePolicyVersion:completionHandler:

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.

- (void)deletePolicyVersion:(AWSIoTDeletePolicyVersionRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeletePolicyVersion service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorDeleteConflict, AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deleteRegistrationCode:

Deletes a CA certificate registration code.

- (AWSTask<AWSIoTDeleteRegistrationCodeResponse*> *)deleteRegistrationCode:(AWSIoTDeleteRegistrationCodeRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteRegistrationCode service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDeleteRegistrationCodeResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorThrottling, AWSIoTErrorResourceNotFound, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deleteRegistrationCode:completionHandler:

Deletes a CA certificate registration code.

- (void)deleteRegistrationCode:(AWSIoTDeleteRegistrationCodeRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDeleteRegistrationCodeResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteRegistrationCode service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorThrottling, AWSIoTErrorResourceNotFound, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deleteThing:

Deletes the specified thing from the Thing Registry.

- (AWSTask<AWSIoTDeleteThingResponse*> *)deleteThing:(AWSIoTDeleteThingRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteThing service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDeleteThingResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deleteThing:completionHandler:

Deletes the specified thing from the Thing Registry.

- (void)deleteThing:(AWSIoTDeleteThingRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDeleteThingResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteThing service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– deleteTopicRule:

Deletes the specified rule.

- (AWSTask *)deleteTopicRule:(AWSIoTDeleteTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– deleteTopicRule:completionHandler:

Deletes the specified rule.

- (void)deleteTopicRule:(AWSIoTDeleteTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– describeCACertificate:

Describes a registered CA certificate.

- (AWSTask<AWSIoTDescribeCACertificateResponse*> *)describeCACertificate:(AWSIoTDescribeCACertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the DescribeCACertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDescribeCACertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– describeCACertificate:completionHandler:

Describes a registered CA certificate.

- (void)describeCACertificate:(AWSIoTDescribeCACertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDescribeCACertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeCACertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– describeCertificate:

Gets information about the specified certificate.

- (AWSTask<AWSIoTDescribeCertificateResponse*> *)describeCertificate:(AWSIoTDescribeCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the DescribeCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDescribeCertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– describeCertificate:completionHandler:

Gets information about the specified certificate.

- (void)describeCertificate:(AWSIoTDescribeCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDescribeCertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeCertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– describeEndpoint:

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.

- (AWSTask<AWSIoTDescribeEndpointResponse*> *)describeEndpoint:(AWSIoTDescribeEndpointRequest *)request

Parameters

request

A container for the necessary parameters to execute the DescribeEndpoint service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDescribeEndpointResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternalFailure, AWSIoTErrorUnauthorized, AWSIoTErrorThrottling.

Declared In

AWSIoTService.h

– describeEndpoint:completionHandler:

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.

- (void)describeEndpoint:(AWSIoTDescribeEndpointRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDescribeEndpointResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeEndpoint service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternalFailure, AWSIoTErrorUnauthorized, AWSIoTErrorThrottling.

Declared In

AWSIoTService.h

– describeThing:

Gets information about the specified thing.

- (AWSTask<AWSIoTDescribeThingResponse*> *)describeThing:(AWSIoTDescribeThingRequest *)request

Parameters

request

A container for the necessary parameters to execute the DescribeThing service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDescribeThingResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– describeThing:completionHandler:

Gets information about the specified thing.

- (void)describeThing:(AWSIoTDescribeThingRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDescribeThingResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeThing service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– detachPrincipalPolicy:

Removes the specified policy from the specified certificate.

- (AWSTask *)detachPrincipalPolicy:(AWSIoTDetachPrincipalPolicyRequest *)request

Parameters

request

A container for the necessary parameters to execute the DetachPrincipalPolicy service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– detachPrincipalPolicy:completionHandler:

Removes the specified policy from the specified certificate.

- (void)detachPrincipalPolicy:(AWSIoTDetachPrincipalPolicyRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DetachPrincipalPolicy service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– detachThingPrincipal:

Detaches the specified principal from the specified thing.

- (AWSTask<AWSIoTDetachThingPrincipalResponse*> *)detachThingPrincipal:(AWSIoTDetachThingPrincipalRequest *)request

Parameters

request

A container for the necessary parameters to execute the DetachThingPrincipal service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTDetachThingPrincipalResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– detachThingPrincipal:completionHandler:

Detaches the specified principal from the specified thing.

- (void)detachThingPrincipal:(AWSIoTDetachThingPrincipalRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTDetachThingPrincipalResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DetachThingPrincipal service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– disableTopicRule:

Disables the specified rule.

- (AWSTask *)disableTopicRule:(AWSIoTDisableTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the DisableTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– disableTopicRule:completionHandler:

Disables the specified rule.

- (void)disableTopicRule:(AWSIoTDisableTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DisableTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– enableTopicRule:

Enables the specified rule.

- (AWSTask *)enableTopicRule:(AWSIoTEnableTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the EnableTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– enableTopicRule:completionHandler:

Enables the specified rule.

- (void)enableTopicRule:(AWSIoTEnableTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the EnableTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– getLoggingOptions:

Gets the logging options.

- (AWSTask<AWSIoTGetLoggingOptionsResponse*> *)getLoggingOptions:(AWSIoTGetLoggingOptionsRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetLoggingOptions service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTGetLoggingOptionsResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– getLoggingOptions:completionHandler:

Gets the logging options.

- (void)getLoggingOptions:(AWSIoTGetLoggingOptionsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTGetLoggingOptionsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetLoggingOptions service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– getPolicy:

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

- (AWSTask<AWSIoTGetPolicyResponse*> *)getPolicy:(AWSIoTGetPolicyRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetPolicy service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTGetPolicyResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getPolicy:completionHandler:

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

- (void)getPolicy:(AWSIoTGetPolicyRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTGetPolicyResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetPolicy service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getPolicyVersion:

Gets information about the specified policy version.

- (AWSTask<AWSIoTGetPolicyVersionResponse*> *)getPolicyVersion:(AWSIoTGetPolicyVersionRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetPolicyVersion service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTGetPolicyVersionResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getPolicyVersion:completionHandler:

Gets information about the specified policy version.

- (void)getPolicyVersion:(AWSIoTGetPolicyVersionRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTGetPolicyVersionResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetPolicyVersion service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getRegistrationCode:

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

- (AWSTask<AWSIoTGetRegistrationCodeResponse*> *)getRegistrationCode:(AWSIoTGetRegistrationCodeRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetRegistrationCode service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTGetRegistrationCodeResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getRegistrationCode:completionHandler:

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

- (void)getRegistrationCode:(AWSIoTGetRegistrationCodeRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTGetRegistrationCodeResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetRegistrationCode service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– getTopicRule:

Gets information about the specified rule.

- (AWSTask<AWSIoTGetTopicRuleResponse*> *)getTopicRule:(AWSIoTGetTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTGetTopicRuleResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– getTopicRule:completionHandler:

Gets information about the specified rule.

- (void)getTopicRule:(AWSIoTGetTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTGetTopicRuleResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– listCACertificates:

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.

- (AWSTask<AWSIoTListCACertificatesResponse*> *)listCACertificates:(AWSIoTListCACertificatesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListCACertificates service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListCACertificatesResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listCACertificates:completionHandler:

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.

- (void)listCACertificates:(AWSIoTListCACertificatesRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListCACertificatesResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListCACertificates service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listCertificates:

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.

- (AWSTask<AWSIoTListCertificatesResponse*> *)listCertificates:(AWSIoTListCertificatesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListCertificates service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListCertificatesResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listCertificates:completionHandler:

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.

- (void)listCertificates:(AWSIoTListCertificatesRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListCertificatesResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListCertificates service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listCertificatesByCA:

List the device certificates signed by the specified CA certificate.

- (AWSTask<AWSIoTListCertificatesByCAResponse*> *)listCertificatesByCA:(AWSIoTListCertificatesByCARequest *)request

Parameters

request

A container for the necessary parameters to execute the ListCertificatesByCA service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListCertificatesByCAResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listCertificatesByCA:completionHandler:

List the device certificates signed by the specified CA certificate.

- (void)listCertificatesByCA:(AWSIoTListCertificatesByCARequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListCertificatesByCAResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListCertificatesByCA service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPolicies:

Lists your policies.

- (AWSTask<AWSIoTListPoliciesResponse*> *)listPolicies:(AWSIoTListPoliciesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListPolicies service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListPoliciesResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPolicies:completionHandler:

Lists your policies.

- (void)listPolicies:(AWSIoTListPoliciesRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListPoliciesResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListPolicies service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPolicyVersions:

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

- (AWSTask<AWSIoTListPolicyVersionsResponse*> *)listPolicyVersions:(AWSIoTListPolicyVersionsRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListPolicyVersions service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListPolicyVersionsResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPolicyVersions:completionHandler:

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

- (void)listPolicyVersions:(AWSIoTListPolicyVersionsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListPolicyVersionsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListPolicyVersions service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPrincipalPolicies:

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

- (AWSTask<AWSIoTListPrincipalPoliciesResponse*> *)listPrincipalPolicies:(AWSIoTListPrincipalPoliciesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListPrincipalPolicies service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListPrincipalPoliciesResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPrincipalPolicies:completionHandler:

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

- (void)listPrincipalPolicies:(AWSIoTListPrincipalPoliciesRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListPrincipalPoliciesResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListPrincipalPolicies service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPrincipalThings:

Lists the things associated with the specified principal.

- (AWSTask<AWSIoTListPrincipalThingsResponse*> *)listPrincipalThings:(AWSIoTListPrincipalThingsRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListPrincipalThings service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListPrincipalThingsResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listPrincipalThings:completionHandler:

Lists the things associated with the specified principal.

- (void)listPrincipalThings:(AWSIoTListPrincipalThingsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListPrincipalThingsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListPrincipalThings service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listThingPrincipals:

Lists the principals associated with the specified thing.

- (AWSTask<AWSIoTListThingPrincipalsResponse*> *)listThingPrincipals:(AWSIoTListThingPrincipalsRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListThingPrincipals service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListThingPrincipalsResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listThingPrincipals:completionHandler:

Lists the principals associated with the specified thing.

- (void)listThingPrincipals:(AWSIoTListThingPrincipalsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListThingPrincipalsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListThingPrincipals service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listThings:

Lists your things. You can pass an AttributeName or AttributeValue to filter your things (for example, "ListThings where AttributeName=Color and AttributeValue=Red").

- (AWSTask<AWSIoTListThingsResponse*> *)listThings:(AWSIoTListThingsRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListThings service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListThingsResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listThings:completionHandler:

Lists your things. You can pass an AttributeName or AttributeValue to filter your things (for example, "ListThings where AttributeName=Color and AttributeValue=Red").

- (void)listThings:(AWSIoTListThingsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListThingsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListThings service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– listTopicRules:

Lists the rules for the specific topic.

- (AWSTask<AWSIoTListTopicRulesResponse*> *)listTopicRules:(AWSIoTListTopicRulesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListTopicRules service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTListTopicRulesResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– listTopicRules:completionHandler:

Lists the rules for the specific topic.

- (void)listTopicRules:(AWSIoTListTopicRulesRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTListTopicRulesResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListTopicRules service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– registerCACertificate:

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.

- (AWSTask<AWSIoTRegisterCACertificateResponse*> *)registerCACertificate:(AWSIoTRegisterCACertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the RegisterCACertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTRegisterCACertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorRegistrationCodeValidation, AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateValidation, AWSIoTErrorThrottling, AWSIoTErrorLimitExceeded, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– registerCACertificate:completionHandler:

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.

- (void)registerCACertificate:(AWSIoTRegisterCACertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTRegisterCACertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the RegisterCACertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorRegistrationCodeValidation, AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateValidation, AWSIoTErrorThrottling, AWSIoTErrorLimitExceeded, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– registerCertificate:

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.

- (AWSTask<AWSIoTRegisterCertificateResponse*> *)registerCertificate:(AWSIoTRegisterCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the RegisterCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTRegisterCertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateValidation, AWSIoTErrorCertificateState, AWSIoTErrorCertificateConflict, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– registerCertificate:completionHandler:

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.

- (void)registerCertificate:(AWSIoTRegisterCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTRegisterCertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the RegisterCertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceAlreadyExists, AWSIoTErrorInvalidRequest, AWSIoTErrorCertificateValidation, AWSIoTErrorCertificateState, AWSIoTErrorCertificateConflict, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– rejectCertificateTransfer:

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.

- (AWSTask *)rejectCertificateTransfer:(AWSIoTRejectCertificateTransferRequest *)request

Parameters

request

A container for the necessary parameters to execute the RejectCertificateTransfer service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– rejectCertificateTransfer:completionHandler:

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.

- (void)rejectCertificateTransfer:(AWSIoTRejectCertificateTransferRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the RejectCertificateTransfer service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorTransferAlreadyCompleted, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– replaceTopicRule:

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.

- (AWSTask *)replaceTopicRule:(AWSIoTReplaceTopicRuleRequest *)request

Parameters

request

A container for the necessary parameters to execute the ReplaceTopicRule service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorSqlParse, AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– replaceTopicRule:completionHandler:

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.

- (void)replaceTopicRule:(AWSIoTReplaceTopicRuleRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ReplaceTopicRule service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorSqlParse, AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable, AWSIoTErrorUnauthorized.

Declared In

AWSIoTService.h

– setDefaultPolicyVersion:

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.

- (AWSTask *)setDefaultPolicyVersion:(AWSIoTSetDefaultPolicyVersionRequest *)request

Parameters

request

A container for the necessary parameters to execute the SetDefaultPolicyVersion service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– setDefaultPolicyVersion:completionHandler:

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.

- (void)setDefaultPolicyVersion:(AWSIoTSetDefaultPolicyVersionRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the SetDefaultPolicyVersion service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– setLoggingOptions:

Sets the logging options.

- (AWSTask *)setLoggingOptions:(AWSIoTSetLoggingOptionsRequest *)request

Parameters

request

A container for the necessary parameters to execute the SetLoggingOptions service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– setLoggingOptions:completionHandler:

Sets the logging options.

- (void)setLoggingOptions:(AWSIoTSetLoggingOptionsRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the SetLoggingOptions service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInternal, AWSIoTErrorInvalidRequest, AWSIoTErrorServiceUnavailable.

Declared In

AWSIoTService.h

– transferCertificate:

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.

- (AWSTask<AWSIoTTransferCertificateResponse*> *)transferCertificate:(AWSIoTTransferCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the TransferCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTTransferCertificateResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorResourceNotFound, AWSIoTErrorCertificateState, AWSIoTErrorTransferConflict, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– transferCertificate:completionHandler:

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.

- (void)transferCertificate:(AWSIoTTransferCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTTransferCertificateResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the TransferCertificate service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorResourceNotFound, AWSIoTErrorCertificateState, AWSIoTErrorTransferConflict, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– updateCACertificate:

Updates a registered CA certificate.

- (AWSTask *)updateCACertificate:(AWSIoTUpdateCACertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the UpdateCACertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– updateCACertificate:completionHandler:

Updates a registered CA certificate.

- (void)updateCACertificate:(AWSIoTUpdateCACertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateCACertificate service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– updateCertificate:

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.

- (AWSTask *)updateCertificate:(AWSIoTUpdateCertificateRequest *)request

Parameters

request

A container for the necessary parameters to execute the UpdateCertificate service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorCertificateState, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– updateCertificate:completionHandler:

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.

- (void)updateCertificate:(AWSIoTUpdateCertificateRequest *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateCertificate service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorResourceNotFound, AWSIoTErrorCertificateState, AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure.

Declared In

AWSIoTService.h

– updateThing:

Updates the data for a thing.

- (AWSTask<AWSIoTUpdateThingResponse*> *)updateThing:(AWSIoTUpdateThingRequest *)request

Parameters

request

A container for the necessary parameters to execute the UpdateThing service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSIoTUpdateThingResponse. On failed execution, task.error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h

– updateThing:completionHandler:

Updates the data for a thing.

- (void)updateThing:(AWSIoTUpdateThingRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSIoTUpdateThingResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateThing service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSIoTErrorDomain domain and the following error code: AWSIoTErrorInvalidRequest, AWSIoTErrorThrottling, AWSIoTErrorUnauthorized, AWSIoTErrorServiceUnavailable, AWSIoTErrorInternalFailure, AWSIoTErrorResourceNotFound.

Declared In

AWSIoTService.h