Skip to content

Conversation

@dagnir
Copy link
Contributor

@dagnir dagnir commented Nov 5, 2025

Motivation and Context

As customers move from V1 (which exposes these operations), to V2, they may not be able to move to the recommended operations because of external constraints such as IAM policies that only allow certain operations.

Note: IoT is not the only service that has suppressed operations. We will unsuppress them on need basis to avoid cluttering clients unnecessarily.

Modifications

Testing

mvn clean install -pl :iot

Verified the diffs of the generated clients (see comments).

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

As customers move from V1 (which exposes these operations), to V2, they
may not be able to move to the recommended operations because of
external constraints such as IAM policies that only allow certain
operations.

Note: IoT is not the only service that has suppressed operations. We
will unsuppress them on need basis to avoid cluttering clients
unnecessarily.
@dagnir dagnir requested a review from a team as a code owner November 5, 2025 22:23
@dagnir
Copy link
Contributor Author

dagnir commented Nov 5, 2025

Sync client diff

--- ./iot-old/generated-sources/sdk/software/amazon/awssdk/services/iot/IotClient.java	2025-11-05 14:08:24
+++ ./iot-new/generated-sources/sdk/software/amazon/awssdk/services/iot/IotClient.java	2025-11-05 14:10:19
@@ -33,6 +33,8 @@
 import software.amazon.awssdk.services.iot.model.AssociateTargetsWithJobResponse;
 import software.amazon.awssdk.services.iot.model.AttachPolicyRequest;
 import software.amazon.awssdk.services.iot.model.AttachPolicyResponse;
+import software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyRequest;
+import software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyResponse;
 import software.amazon.awssdk.services.iot.model.AttachSecurityProfileRequest;
 import software.amazon.awssdk.services.iot.model.AttachSecurityProfileResponse;
 import software.amazon.awssdk.services.iot.model.AttachThingPrincipalRequest;
@@ -269,6 +271,8 @@
 import software.amazon.awssdk.services.iot.model.DescribeThingTypeResponse;
 import software.amazon.awssdk.services.iot.model.DetachPolicyRequest;
 import software.amazon.awssdk.services.iot.model.DetachPolicyResponse;
+import software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyRequest;
+import software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyResponse;
 import software.amazon.awssdk.services.iot.model.DetachSecurityProfileRequest;
 import software.amazon.awssdk.services.iot.model.DetachSecurityProfileResponse;
 import software.amazon.awssdk.services.iot.model.DetachThingPrincipalRequest;
@@ -402,8 +406,12 @@
 import software.amazon.awssdk.services.iot.model.ListPackagesResponse;
 import software.amazon.awssdk.services.iot.model.ListPoliciesRequest;
 import software.amazon.awssdk.services.iot.model.ListPoliciesResponse;
+import software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest;
+import software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse;
 import software.amazon.awssdk.services.iot.model.ListPolicyVersionsRequest;
 import software.amazon.awssdk.services.iot.model.ListPolicyVersionsResponse;
+import software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest;
+import software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsRequest;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsResponse;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsV2Request;
@@ -625,6 +633,8 @@
 import software.amazon.awssdk.services.iot.paginators.ListPackageVersionsIterable;
 import software.amazon.awssdk.services.iot.paginators.ListPackagesIterable;
 import software.amazon.awssdk.services.iot.paginators.ListPoliciesIterable;
+import software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable;
+import software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable;
 import software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsIterable;
 import software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsV2Iterable;
 import software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsIterable;
@@ -1250,10 +1260,117 @@
             ServiceUnavailableException, InternalFailureException, LimitExceededException, AwsServiceException,
             SdkClientException, IotException {
         return attachPolicy(AttachPolicyRequest.builder().applyMutation(attachPolicyRequest).build());
+    }
+
+    /**
+     * <p>
+     * Attaches the specified policy to the specified principal (certificate or other credential).
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>AttachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >AttachPrincipalPolicy</a> action.
+     * </p>
+     *
+     * @param attachPrincipalPolicyRequest
+     *        The input for the AttachPrincipalPolicy operation.
+     * @return Result of the AttachPrincipalPolicy operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws LimitExceededException
+     *         A limit has been exceeded.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.AttachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default AttachPrincipalPolicyResponse attachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, LimitExceededException, AwsServiceException,
+            SdkClientException, IotException {
+        throw new UnsupportedOperationException();
     }
 
     /**
      * <p>
+     * Attaches the specified policy to the specified principal (certificate or other credential).
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>AttachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >AttachPrincipalPolicy</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link AttachPrincipalPolicyRequest.Builder} avoiding the
+     * need to create one manually via {@link AttachPrincipalPolicyRequest#builder()}
+     * </p>
+     *
+     * @param attachPrincipalPolicyRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyRequest.Builder} to create a
+     *        request. The input for the AttachPrincipalPolicy operation.
+     * @return Result of the AttachPrincipalPolicy operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws LimitExceededException
+     *         A limit has been exceeded.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.AttachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default AttachPrincipalPolicyResponse attachPrincipalPolicy(
+            Consumer<AttachPrincipalPolicyRequest.Builder> attachPrincipalPolicyRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException {
+        return attachPrincipalPolicy(AttachPrincipalPolicyRequest.builder().applyMutation(attachPrincipalPolicyRequest).build());
+    }
+
+    /**
+     * <p>
      * Associates a Device Defender security profile with a thing group or this account. Each thing group or account can
      * have up to five security profiles associated with it.
      * </p>
@@ -11616,10 +11733,112 @@
             throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
             InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException {
         return detachPolicy(DetachPolicyRequest.builder().applyMutation(detachPolicyRequest).build());
+    }
+
+    /**
+     * <p>
+     * Removes the specified policy from the specified certificate.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>DetachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >DetachPrincipalPolicy</a> action.
+     * </p>
+     *
+     * @param detachPrincipalPolicyRequest
+     *        The input for the DetachPrincipalPolicy operation.
+     * @return Result of the DetachPrincipalPolicy operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.DetachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default DetachPrincipalPolicyResponse detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        throw new UnsupportedOperationException();
     }
 
     /**
      * <p>
+     * Removes the specified policy from the specified certificate.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>DetachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >DetachPrincipalPolicy</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link DetachPrincipalPolicyRequest.Builder} avoiding the
+     * need to create one manually via {@link DetachPrincipalPolicyRequest#builder()}
+     * </p>
+     *
+     * @param detachPrincipalPolicyRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyRequest.Builder} to create a
+     *        request. The input for the DetachPrincipalPolicy operation.
+     * @return Result of the DetachPrincipalPolicy operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.DetachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default DetachPrincipalPolicyResponse detachPrincipalPolicy(
+            Consumer<DetachPrincipalPolicyRequest.Builder> detachPrincipalPolicyRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return detachPrincipalPolicy(DetachPrincipalPolicyRequest.builder().applyMutation(detachPrincipalPolicyRequest).build());
+    }
+
+    /**
+     * <p>
      * Disassociates a Device Defender security profile from a thing group or from this account.
      * </p>
      * <p>
@@ -23677,10 +23896,301 @@
             throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
             InternalFailureException, AwsServiceException, SdkClientException, IotException {
         return listPoliciesPaginator(ListPoliciesRequest.builder().applyMutation(listPoliciesRequest).build());
+    }
+
+    /**
+     * <p>
+     * Lists the principals associated with the specified policy.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListTargetsForPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPolicyPrincipals</a> action.
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        The input for the ListPolicyPrincipals operation.
+     * @return Result of the ListPolicyPrincipals operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsResponse listPolicyPrincipals(ListPolicyPrincipalsRequest listPolicyPrincipalsRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        throw new UnsupportedOperationException();
     }
 
     /**
      * <p>
+     * Lists the principals associated with the specified policy.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListTargetsForPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPolicyPrincipals</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPolicyPrincipalsRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPolicyPrincipalsRequest#builder()}
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest.Builder} to create a request.
+     *        The input for the ListPolicyPrincipals operation.
+     * @return Result of the ListPolicyPrincipals operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsResponse listPolicyPrincipals(
+            Consumer<ListPolicyPrincipalsRequest.Builder> listPolicyPrincipalsRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return listPolicyPrincipals(ListPolicyPrincipalsRequest.builder().applyMutation(listPolicyPrincipalsRequest).build());
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)} operation.
+     * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
+     * handle making service calls for you.
+     * </p>
+     * <p>
+     * When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
+     * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
+     * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
+     * request, you will see the failures only after you start iterating through the iterable.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to iterate through the response pages:
+     * </p>
+     * 1) Using a Stream
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client.listPolicyPrincipalsPaginator(request);
+     * responses.stream().forEach(....);
+     * }
+     * </pre>
+     *
+     * 2) Using For loop
+     * 
+     * <pre>
+     * {
+     *     &#064;code
+     *     software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client
+     *             .listPolicyPrincipalsPaginator(request);
+     *     for (software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse response : responses) {
+     *         // do something;
+     *     }
+     * }
+     * </pre>
+     *
+     * 3) Use iterator directly
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client.listPolicyPrincipalsPaginator(request);
+     * responses.iterator().forEachRemaining(....);
+     * }
+     * </pre>
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)}
+     * operation.</b>
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A custom iterable that can be used to iterate through all the response pages.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsIterable listPolicyPrincipalsPaginator(ListPolicyPrincipalsRequest listPolicyPrincipalsRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return new ListPolicyPrincipalsIterable(this, listPolicyPrincipalsRequest);
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)} operation.
+     * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
+     * handle making service calls for you.
+     * </p>
+     * <p>
+     * When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
+     * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
+     * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
+     * request, you will see the failures only after you start iterating through the iterable.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to iterate through the response pages:
+     * </p>
+     * 1) Using a Stream
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client.listPolicyPrincipalsPaginator(request);
+     * responses.stream().forEach(....);
+     * }
+     * </pre>
+     *
+     * 2) Using For loop
+     * 
+     * <pre>
+     * {
+     *     &#064;code
+     *     software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client
+     *             .listPolicyPrincipalsPaginator(request);
+     *     for (software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse response : responses) {
+     *         // do something;
+     *     }
+     * }
+     * </pre>
+     *
+     * 3) Use iterator directly
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsIterable responses = client.listPolicyPrincipalsPaginator(request);
+     * responses.iterator().forEachRemaining(....);
+     * }
+     * </pre>
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)}
+     * operation.</b>
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPolicyPrincipalsRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPolicyPrincipalsRequest#builder()}
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest.Builder} to create a request.
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A custom iterable that can be used to iterate through all the response pages.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsIterable listPolicyPrincipalsPaginator(
+            Consumer<ListPolicyPrincipalsRequest.Builder> listPolicyPrincipalsRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return listPolicyPrincipalsPaginator(ListPolicyPrincipalsRequest.builder().applyMutation(listPolicyPrincipalsRequest)
+                .build());
+    }
+
+    /**
+     * <p>
      * Lists the versions of the specified policy and identifies the default version.
      * </p>
      * <p>
@@ -23768,6 +24278,303 @@
 
     /**
      * <p>
+     * Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in <a
+     * href=
+     * "https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax"
+     * >AmazonCognito Identity format</a>.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListAttachedPolicies</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPrincipalPolicies</a> action.
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        The input for the ListPrincipalPolicies operation.
+     * @return Result of the ListPrincipalPolicies operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesResponse listPrincipalPolicies(ListPrincipalPoliciesRequest listPrincipalPoliciesRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * <p>
+     * Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in <a
+     * href=
+     * "https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax"
+     * >AmazonCognito Identity format</a>.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListAttachedPolicies</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPrincipalPolicies</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPrincipalPoliciesRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPrincipalPoliciesRequest#builder()}
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest.Builder} to create a
+     *        request. The input for the ListPrincipalPolicies operation.
+     * @return Result of the ListPrincipalPolicies operation returned by the service.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesResponse listPrincipalPolicies(
+            Consumer<ListPrincipalPoliciesRequest.Builder> listPrincipalPoliciesRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return listPrincipalPolicies(ListPrincipalPoliciesRequest.builder().applyMutation(listPrincipalPoliciesRequest).build());
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)} operation.
+     * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
+     * handle making service calls for you.
+     * </p>
+     * <p>
+     * When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
+     * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
+     * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
+     * request, you will see the failures only after you start iterating through the iterable.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to iterate through the response pages:
+     * </p>
+     * 1) Using a Stream
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client.listPrincipalPoliciesPaginator(request);
+     * responses.stream().forEach(....);
+     * }
+     * </pre>
+     *
+     * 2) Using For loop
+     * 
+     * <pre>
+     * {
+     *     &#064;code
+     *     software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client
+     *             .listPrincipalPoliciesPaginator(request);
+     *     for (software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse response : responses) {
+     *         // do something;
+     *     }
+     * }
+     * </pre>
+     *
+     * 3) Use iterator directly
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client.listPrincipalPoliciesPaginator(request);
+     * responses.iterator().forEachRemaining(....);
+     * }
+     * </pre>
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)}
+     * operation.</b>
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        The input for the ListPrincipalPolicies operation.
+     * @return A custom iterable that can be used to iterate through all the response pages.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesIterable listPrincipalPoliciesPaginator(ListPrincipalPoliciesRequest listPrincipalPoliciesRequest)
+            throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
+            ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return new ListPrincipalPoliciesIterable(this, listPrincipalPoliciesRequest);
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)} operation.
+     * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
+     * handle making service calls for you.
+     * </p>
+     * <p>
+     * When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
+     * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
+     * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
+     * request, you will see the failures only after you start iterating through the iterable.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to iterate through the response pages:
+     * </p>
+     * 1) Using a Stream
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client.listPrincipalPoliciesPaginator(request);
+     * responses.stream().forEach(....);
+     * }
+     * </pre>
+     *
+     * 2) Using For loop
+     * 
+     * <pre>
+     * {
+     *     &#064;code
+     *     software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client
+     *             .listPrincipalPoliciesPaginator(request);
+     *     for (software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse response : responses) {
+     *         // do something;
+     *     }
+     * }
+     * </pre>
+     *
+     * 3) Use iterator directly
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesIterable responses = client.listPrincipalPoliciesPaginator(request);
+     * responses.iterator().forEachRemaining(....);
+     * }
+     * </pre>
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)}
+     * operation.</b>
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPrincipalPoliciesRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPrincipalPoliciesRequest#builder()}
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest.Builder} to create a
+     *        request. The input for the ListPrincipalPolicies operation.
+     * @return A custom iterable that can be used to iterate through all the response pages.
+     * @throws ResourceNotFoundException
+     *         The specified resource does not exist.
+     * @throws InvalidRequestException
+     *         The request is not valid.
+     * @throws ThrottlingException
+     *         The rate exceeds the limit.
+     * @throws UnauthorizedException
+     *         You are not authorized to perform this operation.
+     * @throws ServiceUnavailableException
+     *         The service is temporarily unavailable.
+     * @throws InternalFailureException
+     *         An unexpected error has occurred.
+     * @throws SdkException
+     *         Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
+     *         catch all scenarios.
+     * @throws SdkClientException
+     *         If any client side error occurs such as an IO related failure, failure to get credentials, etc.
+     * @throws IotException
+     *         Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
+     * @sample IotClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesIterable listPrincipalPoliciesPaginator(
+            Consumer<ListPrincipalPoliciesRequest.Builder> listPrincipalPoliciesRequest) throws ResourceNotFoundException,
+            InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
+            InternalFailureException, AwsServiceException, SdkClientException, IotException {
+        return listPrincipalPoliciesPaginator(ListPrincipalPoliciesRequest.builder().applyMutation(listPrincipalPoliciesRequest)
+                .build());
+    }
+
+    /**
+     * <p>
      * Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users,
      * groups, and roles, Amazon Cognito identities or federated identities.
      * </p>

@dagnir
Copy link
Contributor Author

dagnir commented Nov 5, 2025

Async client diff

--- ./iot-old/generated-sources/sdk/software/amazon/awssdk/services/iot/IotAsyncClient.java	2025-11-05 14:08:24
+++ ./iot-new/generated-sources/sdk/software/amazon/awssdk/services/iot/IotAsyncClient.java	2025-11-05 14:10:18
@@ -31,6 +31,8 @@
 import software.amazon.awssdk.services.iot.model.AssociateTargetsWithJobResponse;
 import software.amazon.awssdk.services.iot.model.AttachPolicyRequest;
 import software.amazon.awssdk.services.iot.model.AttachPolicyResponse;
+import software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyRequest;
+import software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyResponse;
 import software.amazon.awssdk.services.iot.model.AttachSecurityProfileRequest;
 import software.amazon.awssdk.services.iot.model.AttachSecurityProfileResponse;
 import software.amazon.awssdk.services.iot.model.AttachThingPrincipalRequest;
@@ -261,6 +263,8 @@
 import software.amazon.awssdk.services.iot.model.DescribeThingTypeResponse;
 import software.amazon.awssdk.services.iot.model.DetachPolicyRequest;
 import software.amazon.awssdk.services.iot.model.DetachPolicyResponse;
+import software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyRequest;
+import software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyResponse;
 import software.amazon.awssdk.services.iot.model.DetachSecurityProfileRequest;
 import software.amazon.awssdk.services.iot.model.DetachSecurityProfileResponse;
 import software.amazon.awssdk.services.iot.model.DetachThingPrincipalRequest;
@@ -383,8 +387,12 @@
 import software.amazon.awssdk.services.iot.model.ListPackagesResponse;
 import software.amazon.awssdk.services.iot.model.ListPoliciesRequest;
 import software.amazon.awssdk.services.iot.model.ListPoliciesResponse;
+import software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest;
+import software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse;
 import software.amazon.awssdk.services.iot.model.ListPolicyVersionsRequest;
 import software.amazon.awssdk.services.iot.model.ListPolicyVersionsResponse;
+import software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest;
+import software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsRequest;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsResponse;
 import software.amazon.awssdk.services.iot.model.ListPrincipalThingsV2Request;
@@ -589,6 +597,8 @@
 import software.amazon.awssdk.services.iot.paginators.ListPackageVersionsPublisher;
 import software.amazon.awssdk.services.iot.paginators.ListPackagesPublisher;
 import software.amazon.awssdk.services.iot.paginators.ListPoliciesPublisher;
+import software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsPublisher;
+import software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesPublisher;
 import software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsPublisher;
 import software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsV2Publisher;
 import software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsPublisher;
@@ -1182,6 +1192,103 @@
      */
     default CompletableFuture<AttachPolicyResponse> attachPolicy(Consumer<AttachPolicyRequest.Builder> attachPolicyRequest) {
         return attachPolicy(AttachPolicyRequest.builder().applyMutation(attachPolicyRequest).build());
+    }
+
+    /**
+     * <p>
+     * Attaches the specified policy to the specified principal (certificate or other credential).
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>AttachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >AttachPrincipalPolicy</a> action.
+     * </p>
+     *
+     * @param attachPrincipalPolicyRequest
+     *        The input for the AttachPrincipalPolicy operation.
+     * @return A Java Future containing the result of the AttachPrincipalPolicy operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>LimitExceededException A limit has been exceeded.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.AttachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<AttachPrincipalPolicyResponse> attachPrincipalPolicy(
+            AttachPrincipalPolicyRequest attachPrincipalPolicyRequest) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * <p>
+     * Attaches the specified policy to the specified principal (certificate or other credential).
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>AttachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >AttachPrincipalPolicy</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link AttachPrincipalPolicyRequest.Builder} avoiding the
+     * need to create one manually via {@link AttachPrincipalPolicyRequest#builder()}
+     * </p>
+     *
+     * @param attachPrincipalPolicyRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.AttachPrincipalPolicyRequest.Builder} to create a
+     *        request. The input for the AttachPrincipalPolicy operation.
+     * @return A Java Future containing the result of the AttachPrincipalPolicy operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>LimitExceededException A limit has been exceeded.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.AttachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<AttachPrincipalPolicyResponse> attachPrincipalPolicy(
+            Consumer<AttachPrincipalPolicyRequest.Builder> attachPrincipalPolicyRequest) {
+        return attachPrincipalPolicy(AttachPrincipalPolicyRequest.builder().applyMutation(attachPrincipalPolicyRequest).build());
     }
 
     /**
@@ -10865,6 +10972,101 @@
      */
     default CompletableFuture<DetachPolicyResponse> detachPolicy(Consumer<DetachPolicyRequest.Builder> detachPolicyRequest) {
         return detachPolicy(DetachPolicyRequest.builder().applyMutation(detachPolicyRequest).build());
+    }
+
+    /**
+     * <p>
+     * Removes the specified policy from the specified certificate.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>DetachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >DetachPrincipalPolicy</a> action.
+     * </p>
+     *
+     * @param detachPrincipalPolicyRequest
+     *        The input for the DetachPrincipalPolicy operation.
+     * @return A Java Future containing the result of the DetachPrincipalPolicy operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.DetachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<DetachPrincipalPolicyResponse> detachPrincipalPolicy(
+            DetachPrincipalPolicyRequest detachPrincipalPolicyRequest) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * <p>
+     * Removes the specified policy from the specified certificate.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>DetachPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >DetachPrincipalPolicy</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link DetachPrincipalPolicyRequest.Builder} avoiding the
+     * need to create one manually via {@link DetachPrincipalPolicyRequest#builder()}
+     * </p>
+     *
+     * @param detachPrincipalPolicyRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.DetachPrincipalPolicyRequest.Builder} to create a
+     *        request. The input for the DetachPrincipalPolicy operation.
+     * @return A Java Future containing the result of the DetachPrincipalPolicy operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.DetachPrincipalPolicy
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<DetachPrincipalPolicyResponse> detachPrincipalPolicy(
+            Consumer<DetachPrincipalPolicyRequest.Builder> detachPrincipalPolicyRequest) {
+        return detachPrincipalPolicy(DetachPrincipalPolicyRequest.builder().applyMutation(detachPrincipalPolicyRequest).build());
     }
 
     /**
@@ -22374,6 +22576,278 @@
 
     /**
      * <p>
+     * Lists the principals associated with the specified policy.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListTargetsForPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPolicyPrincipals</a> action.
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A Java Future containing the result of the ListPolicyPrincipals operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<ListPolicyPrincipalsResponse> listPolicyPrincipals(
+            ListPolicyPrincipalsRequest listPolicyPrincipalsRequest) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * <p>
+     * Lists the principals associated with the specified policy.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListTargetsForPolicy</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPolicyPrincipals</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPolicyPrincipalsRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPolicyPrincipalsRequest#builder()}
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest.Builder} to create a request.
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A Java Future containing the result of the ListPolicyPrincipals operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<ListPolicyPrincipalsResponse> listPolicyPrincipals(
+            Consumer<ListPolicyPrincipalsRequest.Builder> listPolicyPrincipalsRequest) {
+        return listPolicyPrincipals(ListPolicyPrincipalsRequest.builder().applyMutation(listPolicyPrincipalsRequest).build());
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)} operation.
+     * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
+     * internally handle making service calls for you.
+     * </p>
+     * <p>
+     * When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
+     * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
+     * failures only after you start streaming the data. The subscribe method should be called as a request to start
+     * streaming data. For more info, see
+     * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
+     * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
+     * starting request.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to use the response class:
+     * </p>
+     * 1) Using the subscribe helper method
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsPublisher publisher = client.listPolicyPrincipalsPaginator(request);
+     * CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
+     * future.get();
+     * }
+     * </pre>
+     *
+     * 2) Using a custom subscriber
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsPublisher publisher = client.listPolicyPrincipalsPaginator(request);
+     * publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse>() {
+     * 
+     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
+     * 
+     * 
+     * public void onNext(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse response) { //... };
+     * });}
+     * </pre>
+     * 
+     * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)}
+     * operation.</b>
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsPublisher listPolicyPrincipalsPaginator(ListPolicyPrincipalsRequest listPolicyPrincipalsRequest) {
+        return new ListPolicyPrincipalsPublisher(this, listPolicyPrincipalsRequest);
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)} operation.
+     * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
+     * internally handle making service calls for you.
+     * </p>
+     * <p>
+     * When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
+     * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
+     * failures only after you start streaming the data. The subscribe method should be called as a request to start
+     * streaming data. For more info, see
+     * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
+     * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
+     * starting request.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to use the response class:
+     * </p>
+     * 1) Using the subscribe helper method
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsPublisher publisher = client.listPolicyPrincipalsPaginator(request);
+     * CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
+     * future.get();
+     * }
+     * </pre>
+     *
+     * 2) Using a custom subscriber
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPolicyPrincipalsPublisher publisher = client.listPolicyPrincipalsPaginator(request);
+     * publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse>() {
+     * 
+     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
+     * 
+     * 
+     * public void onNext(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsResponse response) { //... };
+     * });}
+     * </pre>
+     * 
+     * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPolicyPrincipals(software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest)}
+     * operation.</b>
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPolicyPrincipalsRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPolicyPrincipalsRequest#builder()}
+     * </p>
+     *
+     * @param listPolicyPrincipalsRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPolicyPrincipalsRequest.Builder} to create a request.
+     *        The input for the ListPolicyPrincipals operation.
+     * @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPolicyPrincipals
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPolicyPrincipalsPublisher listPolicyPrincipalsPaginator(
+            Consumer<ListPolicyPrincipalsRequest.Builder> listPolicyPrincipalsRequest) {
+        return listPolicyPrincipalsPaginator(ListPolicyPrincipalsRequest.builder().applyMutation(listPolicyPrincipalsRequest)
+                .build());
+    }
+
+    /**
+     * <p>
      * Lists the versions of the specified policy and identifies the default version.
      * </p>
      * <p>
@@ -22450,10 +22924,289 @@
     default CompletableFuture<ListPolicyVersionsResponse> listPolicyVersions(
             Consumer<ListPolicyVersionsRequest.Builder> listPolicyVersionsRequest) {
         return listPolicyVersions(ListPolicyVersionsRequest.builder().applyMutation(listPolicyVersionsRequest).build());
+    }
+
+    /**
+     * <p>
+     * Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in <a
+     * href=
+     * "https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax"
+     * >AmazonCognito Identity format</a>.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListAttachedPolicies</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPrincipalPolicies</a> action.
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        The input for the ListPrincipalPolicies operation.
+     * @return A Java Future containing the result of the ListPrincipalPolicies operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<ListPrincipalPoliciesResponse> listPrincipalPolicies(
+            ListPrincipalPoliciesRequest listPrincipalPoliciesRequest) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * <p>
+     * Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in <a
+     * href=
+     * "https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax"
+     * >AmazonCognito Identity format</a>.
+     * </p>
+     * <p>
+     * <b>Note:</b> This action is deprecated and works as expected for backward compatibility, but we won't add
+     * enhancements. Use <a>ListAttachedPolicies</a> instead.
+     * </p>
+     * <p>
+     * Requires permission to access the <a href=
+     * "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions"
+     * >ListPrincipalPolicies</a> action.
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPrincipalPoliciesRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPrincipalPoliciesRequest#builder()}
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest.Builder} to create a
+     *        request. The input for the ListPrincipalPolicies operation.
+     * @return A Java Future containing the result of the ListPrincipalPolicies operation returned by the service.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default CompletableFuture<ListPrincipalPoliciesResponse> listPrincipalPolicies(
+            Consumer<ListPrincipalPoliciesRequest.Builder> listPrincipalPoliciesRequest) {
+        return listPrincipalPolicies(ListPrincipalPoliciesRequest.builder().applyMutation(listPrincipalPoliciesRequest).build());
     }
 
     /**
      * <p>
+     * This is a variant of
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)} operation.
+     * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
+     * internally handle making service calls for you.
+     * </p>
+     * <p>
+     * When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
+     * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
+     * failures only after you start streaming the data. The subscribe method should be called as a request to start
+     * streaming data. For more info, see
+     * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
+     * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
+     * starting request.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to use the response class:
+     * </p>
+     * 1) Using the subscribe helper method
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesPublisher publisher = client.listPrincipalPoliciesPaginator(request);
+     * CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
+     * future.get();
+     * }
+     * </pre>
+     *
+     * 2) Using a custom subscriber
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesPublisher publisher = client.listPrincipalPoliciesPaginator(request);
+     * publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse>() {
+     * 
+     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
+     * 
+     * 
+     * public void onNext(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse response) { //... };
+     * });}
+     * </pre>
+     * 
+     * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)}
+     * operation.</b>
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        The input for the ListPrincipalPolicies operation.
+     * @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesPublisher listPrincipalPoliciesPaginator(
+            ListPrincipalPoliciesRequest listPrincipalPoliciesRequest) {
+        return new ListPrincipalPoliciesPublisher(this, listPrincipalPoliciesRequest);
+    }
+
+    /**
+     * <p>
+     * This is a variant of
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)} operation.
+     * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
+     * internally handle making service calls for you.
+     * </p>
+     * <p>
+     * When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
+     * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
+     * failures only after you start streaming the data. The subscribe method should be called as a request to start
+     * streaming data. For more info, see
+     * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
+     * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
+     * starting request.
+     * </p>
+     *
+     * <p>
+     * The following are few ways to use the response class:
+     * </p>
+     * 1) Using the subscribe helper method
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesPublisher publisher = client.listPrincipalPoliciesPaginator(request);
+     * CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
+     * future.get();
+     * }
+     * </pre>
+     *
+     * 2) Using a custom subscriber
+     * 
+     * <pre>
+     * {@code
+     * software.amazon.awssdk.services.iot.paginators.ListPrincipalPoliciesPublisher publisher = client.listPrincipalPoliciesPaginator(request);
+     * publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse>() {
+     * 
+     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
+     * 
+     * 
+     * public void onNext(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesResponse response) { //... };
+     * });}
+     * </pre>
+     * 
+     * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
+     * <p>
+     * <b>Please notice that the configuration of pageSize won't limit the number of results you get with the paginator.
+     * It only limits the number of results in each page.</b>
+     * </p>
+     * <p>
+     * <b>Note: If you prefer to have control on service calls, use the
+     * {@link #listPrincipalPolicies(software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest)}
+     * operation.</b>
+     * </p>
+     * <br/>
+     * <p>
+     * This is a convenience which creates an instance of the {@link ListPrincipalPoliciesRequest.Builder} avoiding the
+     * need to create one manually via {@link ListPrincipalPoliciesRequest#builder()}
+     * </p>
+     *
+     * @param listPrincipalPoliciesRequest
+     *        A {@link Consumer} that will call methods on
+     *        {@link software.amazon.awssdk.services.iot.model.ListPrincipalPoliciesRequest.Builder} to create a
+     *        request. The input for the ListPrincipalPolicies operation.
+     * @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
+     *         The CompletableFuture returned by this method can be completed exceptionally with the following
+     *         exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
+     *         {@link Throwable#getCause} to retrieve the underlying exception.
+     *         <ul>
+     *         <li>ResourceNotFoundException The specified resource does not exist.</li>
+     *         <li>InvalidRequestException The request is not valid.</li>
+     *         <li>ThrottlingException The rate exceeds the limit.</li>
+     *         <li>UnauthorizedException You are not authorized to perform this operation.</li>
+     *         <li>ServiceUnavailableException The service is temporarily unavailable.</li>
+     *         <li>InternalFailureException An unexpected error has occurred.</li>
+     *         <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
+     *         Can be used for catch all scenarios.</li>
+     *         <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get
+     *         credentials, etc.</li>
+     *         <li>IotException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
+     *         of this type.</li>
+     *         </ul>
+     * @sample IotAsyncClient.ListPrincipalPolicies
+     *
+     * @deprecated
+     */
+    @Deprecated
+    default ListPrincipalPoliciesPublisher listPrincipalPoliciesPaginator(
+            Consumer<ListPrincipalPoliciesRequest.Builder> listPrincipalPoliciesRequest) {
+        return listPrincipalPoliciesPaginator(ListPrincipalPoliciesRequest.builder().applyMutation(listPrincipalPoliciesRequest)
+                .build());
+    }
+
+    /**
+     * <p>
      * Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users,
      * groups, and roles, Amazon Cognito identities or federated identities.
      * </p>

@Fred1155
Copy link
Contributor

Fred1155 commented Nov 5, 2025

Can we add changelog for this?

@dagnir
Copy link
Contributor Author

dagnir commented Nov 5, 2025

Can we add changelog for this?

Oh good catch!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

@dagnir dagnir added this pull request to the merge queue Nov 5, 2025
Merged via the queue into master with commit f7847e5 Nov 6, 2025
37 checks passed
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants