@@ -115,16 +115,29 @@ public AmazonLexRuntimeClient(ClientConfiguration clientConfiguration) {
115115 * Constructs a new client to invoke service methods on AmazonLexRuntime
116116 * using the specified AWS account credentials.
117117 * <p>
118- * If AWS session credentials are passed in, then those credentials will be
119- * used to authenticate requests. Otherwise, if AWS long-term credentials
120- * are passed in, then session management will be handled automatically by
121- * the SDK. Callers are encouraged to use long-term credentials and let the
122- * SDK handle starting and renewing sessions.
123- * <p>
124- * Automatically managed sessions will be shared among all clients that use
125- * the same credentials and service endpoint. To opt out of this behavior,
126- * explicitly provide an instance of {@link AWSCredentialsProvider} that
127- * returns {@link AWSSessionCredentials}.
118+ * The client requests are authenticated using the {@link AWSCredentials}
119+ * provided in this constructor. Static AWSCredentials can be passed for
120+ * quick testing. However, it is strongly recommended to use Amazon Cognito
121+ * vended temporary credentials for use in production. This can be achieved
122+ * by using {@link AWSMobileClient}. Please see
123+ * https://aws-amplify.github.io/docs/android/authentication for
124+ * instructions on how to enable {@link AWSMobileClient}.
125+ *
126+ * <pre>
127+ * {@code
128+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
129+ * @Override
130+ * public void onResult(final UserStateDetails details) {
131+ * AmazonLexRuntimeClient client = new AmazonLexRuntimeClient(AWSMobileClient.getInstance());
132+ * }
133+ *
134+ * @Override
135+ * public void onError(final Exception e) {
136+ * e.printStackTrace();
137+ * }
138+ * });
139+ * }
140+ * </pre>
128141 * <p>
129142 * All service calls made using this new client object are blocking, and
130143 * will not return until the service call completes.
@@ -141,16 +154,29 @@ public AmazonLexRuntimeClient(AWSCredentials awsCredentials) {
141154 * using the specified AWS account credentials and client configuration
142155 * options.
143156 * <p>
144- * If AWS session credentials are passed in, then those credentials will be
145- * used to authenticate requests. Otherwise, if AWS long-term credentials
146- * are passed in, then session management will be handled automatically by
147- * the SDK. Callers are encouraged to use long-term credentials and let the
148- * SDK handle starting and renewing sessions.
149- * <p>
150- * Automatically managed sessions will be shared among all clients that use
151- * the same credentials and service endpoint. To opt out of this behavior,
152- * explicitly provide an instance of {@link AWSCredentialsProvider} that
153- * returns {@link AWSSessionCredentials}.
157+ * The client requests are authenticated using the {@link AWSCredentials}
158+ * provided in this constructor. Static AWSCredentials can be passed for
159+ * quick testing. However, it is strongly recommended to use Amazon Cognito
160+ * vended temporary credentials for use in production. This can be achieved
161+ * by using {@link AWSMobileClient}. Please see
162+ * https://aws-amplify.github.io/docs/android/authentication for
163+ * instructions on how to enable {@link AWSMobileClient}.
164+ *
165+ * <pre>
166+ * {@code
167+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
168+ * @Override
169+ * public void onResult(final UserStateDetails details) {
170+ * AmazonLexRuntimeClient client = new AmazonLexRuntimeClient(AWSMobileClient.getInstance());
171+ * }
172+ *
173+ * @Override
174+ * public void onError(final Exception e) {
175+ * e.printStackTrace();
176+ * }
177+ * });
178+ * }
179+ * </pre>
154180 * <p>
155181 * All service calls made using this new client object are blocking, and
156182 * will not return until the service call completes.
@@ -170,16 +196,29 @@ public AmazonLexRuntimeClient(AWSCredentials awsCredentials,
170196 * Constructs a new client to invoke service methods on AmazonLexRuntime
171197 * using the specified AWS account credentials provider.
172198 * <p>
173- * If AWS session credentials are passed in, then those credentials will be
174- * used to authenticate requests. Otherwise, if AWS long-term credentials
175- * are passed in, then session management will be handled automatically by
176- * the SDK. Callers are encouraged to use long-term credentials and let the
177- * SDK handle starting and renewing sessions.
178- * <p>
179- * Automatically managed sessions will be shared among all clients that use
180- * the same credentials and service endpoint. To opt out of this behavior,
181- * explicitly provide an instance of {@link AWSCredentialsProvider} that
182- * returns {@link AWSSessionCredentials}.
199+ * The client requests are authenticated using the {@link AWSCredentials}
200+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
201+ * be passed for quick testing. However, it is strongly recommended to use
202+ * Amazon Cognito vended temporary credentials for use in production. This
203+ * can be achieved by using {@link AWSMobileClient}. Please see
204+ * https://aws-amplify.github.io/docs/android/authentication for
205+ * instructions on how to enable {@link AWSMobileClient}.
206+ *
207+ * <pre>
208+ * {@code
209+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
210+ * @Override
211+ * public void onResult(final UserStateDetails details) {
212+ * AmazonLexRuntimeClient client = new AmazonLexRuntimeClient(AWSMobileClient.getInstance());
213+ * }
214+ *
215+ * @Override
216+ * public void onError(final Exception e) {
217+ * e.printStackTrace();
218+ * }
219+ * });
220+ * }
221+ * </pre>
183222 * <p>
184223 * All service calls made using this new client object are blocking, and
185224 * will not return until the service call completes.
@@ -197,16 +236,29 @@ public AmazonLexRuntimeClient(AWSCredentialsProvider awsCredentialsProvider) {
197236 * using the specified AWS account credentials provider and client
198237 * configuration options.
199238 * <p>
200- * If AWS session credentials are passed in, then those credentials will be
201- * used to authenticate requests. Otherwise, if AWS long-term credentials
202- * are passed in, then session management will be handled automatically by
203- * the SDK. Callers are encouraged to use long-term credentials and let the
204- * SDK handle starting and renewing sessions.
205- * <p>
206- * Automatically managed sessions will be shared among all clients that use
207- * the same credentials and service endpoint. To opt out of this behavior,
208- * explicitly provide an instance of {@link AWSCredentialsProvider} that
209- * returns {@link AWSSessionCredentials}.
239+ * The client requests are authenticated using the {@link AWSCredentials}
240+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
241+ * be passed for quick testing. However, it is strongly recommended to use
242+ * Amazon Cognito vended temporary credentials for use in production. This
243+ * can be achieved by using {@link AWSMobileClient}. Please see
244+ * https://aws-amplify.github.io/docs/android/authentication for
245+ * instructions on how to enable {@link AWSMobileClient}.
246+ *
247+ * <pre>
248+ * {@code
249+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
250+ * @Override
251+ * public void onResult(final UserStateDetails details) {
252+ * AmazonLexRuntimeClient client = new AmazonLexRuntimeClient(AWSMobileClient.getInstance());
253+ * }
254+ *
255+ * @Override
256+ * public void onError(final Exception e) {
257+ * e.printStackTrace();
258+ * }
259+ * });
260+ * }
261+ * </pre>
210262 * <p>
211263 * All service calls made using this new client object are blocking, and
212264 * will not return until the service call completes.
@@ -255,6 +307,30 @@ public AmazonLexRuntimeClient(AWSCredentialsProvider awsCredentialsProvider,
255307 * using the specified AWS account credentials provider, client
256308 * configuration options and request metric collector.
257309 * <p>
310+ * The client requests are authenticated using the {@link AWSCredentials}
311+ * provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
312+ * be passed for quick testing. However, it is strongly recommended to use
313+ * Amazon Cognito vended temporary credentials for use in production. This
314+ * can be achieved by using {@link AWSMobileClient}. Please see
315+ * https://aws-amplify.github.io/docs/android/authentication for
316+ * instructions on how to enable {@link AWSMobileClient}.
317+ *
318+ * <pre>
319+ * {@code
320+ * AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
321+ * @Override
322+ * public void onResult(final UserStateDetails details) {
323+ * AmazonLexRuntimeClient client = new AmazonLexRuntimeClient(AWSMobileClient.getInstance());
324+ * }
325+ *
326+ * @Override
327+ * public void onError(final Exception e) {
328+ * e.printStackTrace();
329+ * }
330+ * });
331+ * }
332+ * </pre>
333+ * <p>
258334 * All service calls made using this new client object are blocking, and
259335 * will not return until the service call completes.
260336 *
0 commit comments