@@ -103,16 +103,29 @@ public AmazonPollyClient(ClientConfiguration clientConfiguration) {
103103 * Constructs a new client to invoke service methods on AmazonPolly using
104104 * the specified AWS account credentials.
105105 * <p>
106- * If AWS session credentials are passed in, then those credentials will be
107- * used to authenticate requests. Otherwise, if AWS long-term credentials
108- * are passed in, then session management will be handled automatically by
109- * the SDK. Callers are encouraged to use long-term credentials and let the
110- * SDK handle starting and renewing sessions.
111- * <p>
112- * Automatically managed sessions will be shared among all clients that use
113- * the same credentials and service endpoint. To opt out of this behavior,
114- * explicitly provide an instance of {@link AWSCredentialsProvider} that
115- * returns {@link AWSSessionCredentials}.
106+ * The client requests are authenticated using the {@link AWSCredentials}
107+ * provided in this constructor. Static AWSCredentials can be passed for
108+ * quick testing. However, it is strongly recommended to use Amazon Cognito
109+ * vended temporary credentials for use in production. This can be achieved
110+ * by using {@link AWSMobileClient}. Please see
111+ * https://aws-amplify.github.io/docs/android/authentication for
112+ * instructions on how to enable {@link AWSMobileClient}.
113+ *
114+ * <pre>
115+ * {@code
116+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
117+ * @Override
118+ * public void onResult(final UserStateDetails details) {
119+ * AmazonPollyClient client = new AmazonPollyClient(AWSMobileClient.getInstance());
120+ * }
121+ *
122+ * @Override
123+ * public void onError(final Exception e) {
124+ * e.printStackTrace();
125+ * }
126+ * });
127+ * }
128+ * </pre>
116129 * <p>
117130 * All service calls made using this new client object are blocking, and
118131 * will not return until the service call completes.
@@ -128,16 +141,29 @@ public AmazonPollyClient(AWSCredentials awsCredentials) {
128141 * Constructs a new client to invoke service methods on AmazonPolly using
129142 * the specified AWS account credentials and client configuration options.
130143 * <p>
131- * If AWS session credentials are passed in, then those credentials will be
132- * used to authenticate requests. Otherwise, if AWS long-term credentials
133- * are passed in, then session management will be handled automatically by
134- * the SDK. Callers are encouraged to use long-term credentials and let the
135- * SDK handle starting and renewing sessions.
136- * <p>
137- * Automatically managed sessions will be shared among all clients that use
138- * the same credentials and service endpoint. To opt out of this behavior,
139- * explicitly provide an instance of {@link AWSCredentialsProvider} that
140- * returns {@link AWSSessionCredentials}.
144+ * The client requests are authenticated using the {@link AWSCredentials}
145+ * provided in this constructor. Static AWSCredentials can be passed for
146+ * quick testing. However, it is strongly recommended to use Amazon Cognito
147+ * vended temporary credentials for use in production. This can be achieved
148+ * by using {@link AWSMobileClient}. Please see
149+ * https://aws-amplify.github.io/docs/android/authentication for
150+ * instructions on how to enable {@link AWSMobileClient}.
151+ *
152+ * <pre>
153+ * {@code
154+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
155+ * @Override
156+ * public void onResult(final UserStateDetails details) {
157+ * AmazonPollyClient client = new AmazonPollyClient(AWSMobileClient.getInstance());
158+ * }
159+ *
160+ * @Override
161+ * public void onError(final Exception e) {
162+ * e.printStackTrace();
163+ * }
164+ * });
165+ * }
166+ * </pre>
141167 * <p>
142168 * All service calls made using this new client object are blocking, and
143169 * will not return until the service call completes.
@@ -156,16 +182,29 @@ public AmazonPollyClient(AWSCredentials awsCredentials, ClientConfiguration clie
156182 * Constructs a new client to invoke service methods on AmazonPolly using
157183 * the specified AWS account credentials provider.
158184 * <p>
159- * If AWS session credentials are passed in, then those credentials will be
160- * used to authenticate requests. Otherwise, if AWS long-term credentials
161- * are passed in, then session management will be handled automatically by
162- * the SDK. Callers are encouraged to use long-term credentials and let the
163- * SDK handle starting and renewing sessions.
164- * <p>
165- * Automatically managed sessions will be shared among all clients that use
166- * the same credentials and service endpoint. To opt out of this behavior,
167- * explicitly provide an instance of {@link AWSCredentialsProvider} that
168- * returns {@link AWSSessionCredentials}.
185+ * The client requests are authenticated using the {@link AWSCredentials}
186+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
187+ * be passed for quick testing. However, it is strongly recommended to use
188+ * Amazon Cognito vended temporary credentials for use in production. This
189+ * can be achieved by using {@link AWSMobileClient}. Please see
190+ * https://aws-amplify.github.io/docs/android/authentication for
191+ * instructions on how to enable {@link AWSMobileClient}.
192+ *
193+ * <pre>
194+ * {@code
195+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
196+ * @Override
197+ * public void onResult(final UserStateDetails details) {
198+ * AmazonPollyClient client = new AmazonPollyClient(AWSMobileClient.getInstance());
199+ * }
200+ *
201+ * @Override
202+ * public void onError(final Exception e) {
203+ * e.printStackTrace();
204+ * }
205+ * });
206+ * }
207+ * </pre>
169208 * <p>
170209 * All service calls made using this new client object are blocking, and
171210 * will not return until the service call completes.
@@ -183,16 +222,29 @@ public AmazonPollyClient(AWSCredentialsProvider awsCredentialsProvider) {
183222 * the specified AWS account credentials provider and client configuration
184223 * options.
185224 * <p>
186- * If AWS session credentials are passed in, then those credentials will be
187- * used to authenticate requests. Otherwise, if AWS long-term credentials
188- * are passed in, then session management will be handled automatically by
189- * the SDK. Callers are encouraged to use long-term credentials and let the
190- * SDK handle starting and renewing sessions.
191- * <p>
192- * Automatically managed sessions will be shared among all clients that use
193- * the same credentials and service endpoint. To opt out of this behavior,
194- * explicitly provide an instance of {@link AWSCredentialsProvider} that
195- * returns {@link AWSSessionCredentials}.
225+ * The client requests are authenticated using the {@link AWSCredentials}
226+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
227+ * be passed for quick testing. However, it is strongly recommended to use
228+ * Amazon Cognito vended temporary credentials for use in production. This
229+ * can be achieved by using {@link AWSMobileClient}. Please see
230+ * https://aws-amplify.github.io/docs/android/authentication for
231+ * instructions on how to enable {@link AWSMobileClient}.
232+ *
233+ * <pre>
234+ * {@code
235+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
236+ * @Override
237+ * public void onResult(final UserStateDetails details) {
238+ * AmazonPollyClient client = new AmazonPollyClient(AWSMobileClient.getInstance());
239+ * }
240+ *
241+ * @Override
242+ * public void onError(final Exception e) {
243+ * e.printStackTrace();
244+ * }
245+ * });
246+ * }
247+ * </pre>
196248 * <p>
197249 * All service calls made using this new client object are blocking, and
198250 * will not return until the service call completes.
@@ -241,6 +293,30 @@ public AmazonPollyClient(AWSCredentialsProvider awsCredentialsProvider,
241293 * the specified AWS account credentials provider, client configuration
242294 * options and request metric collector.
243295 * <p>
296+ * The client requests are authenticated using the {@link AWSCredentials}
297+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
298+ * be passed for quick testing. However, it is strongly recommended to use
299+ * Amazon Cognito vended temporary credentials for use in production. This
300+ * can be achieved by using {@link AWSMobileClient}. Please see
301+ * https://aws-amplify.github.io/docs/android/authentication for
302+ * instructions on how to enable {@link AWSMobileClient}.
303+ *
304+ * <pre>
305+ * {@code
306+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
307+ * @Override
308+ * public void onResult(final UserStateDetails details) {
309+ * AmazonPollyClient client = new AmazonPollyClient(AWSMobileClient.getInstance());
310+ * }
311+ *
312+ * @Override
313+ * public void onError(final Exception e) {
314+ * e.printStackTrace();
315+ * }
316+ * });
317+ * }
318+ * </pre>
319+ * <p>
244320 * All service calls made using this new client object are blocking, and
245321 * will not return until the service call completes.
246322 *
0 commit comments