Skip to content

Commit ae04573

Browse files
committed
[aws-android-sdk-core-sts] Update models to latest
1 parent 8205f71 commit ae04573

File tree

1 file changed

+116
-40
lines changed

1 file changed

+116
-40
lines changed

aws-android-sdk-core/src/main/java/com/amazonaws/services/securitytoken/AWSSecurityTokenServiceClient.java

Lines changed: 116 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,29 @@ public AWSSecurityTokenServiceClient(ClientConfiguration clientConfiguration) {
206206
* Constructs a new client to invoke service methods on
207207
* AWSSecurityTokenService using the specified AWS account credentials.
208208
* <p>
209-
* If AWS session credentials are passed in, then those credentials will be
210-
* used to authenticate requests. Otherwise, if AWS long-term credentials
211-
* are passed in, then session management will be handled automatically by
212-
* the SDK. Callers are encouraged to use long-term credentials and let the
213-
* SDK handle starting and renewing sessions.
214-
* <p>
215-
* Automatically managed sessions will be shared among all clients that use
216-
* the same credentials and service endpoint. To opt out of this behavior,
217-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
218-
* returns {@link AWSSessionCredentials}.
209+
* The client requests are authenticated using the {@link AWSCredentials}
210+
* provided in this constructor. Static AWSCredentials can be passed for
211+
* quick testing. However, it is strongly recommended to use Amazon Cognito
212+
* vended temporary credentials for use in production. This can be achieved
213+
* by using {@link AWSMobileClient}. Please see
214+
* https://aws-amplify.github.io/docs/android/authentication for
215+
* instructions on how to enable {@link AWSMobileClient}.
216+
*
217+
* <pre>
218+
* {@code
219+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
220+
* @Override
221+
* public void onResult(final UserStateDetails details) {
222+
* AWSSecurityTokenServiceClient client = new AWSSecurityTokenServiceClient(AWSMobileClient.getInstance());
223+
* }
224+
*
225+
* @Override
226+
* public void onError(final Exception e) {
227+
* e.printStackTrace();
228+
* }
229+
* });
230+
* }
231+
* </pre>
219232
* <p>
220233
* All service calls made using this new client object are blocking, and
221234
* will not return until the service call completes.
@@ -232,16 +245,29 @@ public AWSSecurityTokenServiceClient(AWSCredentials awsCredentials) {
232245
* AWSSecurityTokenService using the specified AWS account credentials and
233246
* client configuration options.
234247
* <p>
235-
* If AWS session credentials are passed in, then those credentials will be
236-
* used to authenticate requests. Otherwise, if AWS long-term credentials
237-
* are passed in, then session management will be handled automatically by
238-
* the SDK. Callers are encouraged to use long-term credentials and let the
239-
* SDK handle starting and renewing sessions.
240-
* <p>
241-
* Automatically managed sessions will be shared among all clients that use
242-
* the same credentials and service endpoint. To opt out of this behavior,
243-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
244-
* returns {@link AWSSessionCredentials}.
248+
* The client requests are authenticated using the {@link AWSCredentials}
249+
* provided in this constructor. Static AWSCredentials can be passed for
250+
* quick testing. However, it is strongly recommended to use Amazon Cognito
251+
* vended temporary credentials for use in production. This can be achieved
252+
* by using {@link AWSMobileClient}. Please see
253+
* https://aws-amplify.github.io/docs/android/authentication for
254+
* instructions on how to enable {@link AWSMobileClient}.
255+
*
256+
* <pre>
257+
* {@code
258+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
259+
* @Override
260+
* public void onResult(final UserStateDetails details) {
261+
* AWSSecurityTokenServiceClient client = new AWSSecurityTokenServiceClient(AWSMobileClient.getInstance());
262+
* }
263+
*
264+
* @Override
265+
* public void onError(final Exception e) {
266+
* e.printStackTrace();
267+
* }
268+
* });
269+
* }
270+
* </pre>
245271
* <p>
246272
* All service calls made using this new client object are blocking, and
247273
* will not return until the service call completes.
@@ -262,16 +288,29 @@ public AWSSecurityTokenServiceClient(AWSCredentials awsCredentials,
262288
* AWSSecurityTokenService using the specified AWS account credentials
263289
* provider.
264290
* <p>
265-
* If AWS session credentials are passed in, then those credentials will be
266-
* used to authenticate requests. Otherwise, if AWS long-term credentials
267-
* are passed in, then session management will be handled automatically by
268-
* the SDK. Callers are encouraged to use long-term credentials and let the
269-
* SDK handle starting and renewing sessions.
270-
* <p>
271-
* Automatically managed sessions will be shared among all clients that use
272-
* the same credentials and service endpoint. To opt out of this behavior,
273-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
274-
* returns {@link AWSSessionCredentials}.
291+
* The client requests are authenticated using the {@link AWSCredentials}
292+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
293+
* be passed for quick testing. However, it is strongly recommended to use
294+
* Amazon Cognito vended temporary credentials for use in production. This
295+
* can be achieved by using {@link AWSMobileClient}. Please see
296+
* https://aws-amplify.github.io/docs/android/authentication for
297+
* instructions on how to enable {@link AWSMobileClient}.
298+
*
299+
* <pre>
300+
* {@code
301+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
302+
* @Override
303+
* public void onResult(final UserStateDetails details) {
304+
* AWSSecurityTokenServiceClient client = new AWSSecurityTokenServiceClient(AWSMobileClient.getInstance());
305+
* }
306+
*
307+
* @Override
308+
* public void onError(final Exception e) {
309+
* e.printStackTrace();
310+
* }
311+
* });
312+
* }
313+
* </pre>
275314
* <p>
276315
* All service calls made using this new client object are blocking, and
277316
* will not return until the service call completes.
@@ -289,16 +328,29 @@ public AWSSecurityTokenServiceClient(AWSCredentialsProvider awsCredentialsProvid
289328
* AWSSecurityTokenService using the specified AWS account credentials
290329
* provider and client configuration options.
291330
* <p>
292-
* If AWS session credentials are passed in, then those credentials will be
293-
* used to authenticate requests. Otherwise, if AWS long-term credentials
294-
* are passed in, then session management will be handled automatically by
295-
* the SDK. Callers are encouraged to use long-term credentials and let the
296-
* SDK handle starting and renewing sessions.
297-
* <p>
298-
* Automatically managed sessions will be shared among all clients that use
299-
* the same credentials and service endpoint. To opt out of this behavior,
300-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
301-
* returns {@link AWSSessionCredentials}.
331+
* The client requests are authenticated using the {@link AWSCredentials}
332+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
333+
* be passed for quick testing. However, it is strongly recommended to use
334+
* Amazon Cognito vended temporary credentials for use in production. This
335+
* can be achieved by using {@link AWSMobileClient}. Please see
336+
* https://aws-amplify.github.io/docs/android/authentication for
337+
* instructions on how to enable {@link AWSMobileClient}.
338+
*
339+
* <pre>
340+
* {@code
341+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
342+
* @Override
343+
* public void onResult(final UserStateDetails details) {
344+
* AWSSecurityTokenServiceClient client = new AWSSecurityTokenServiceClient(AWSMobileClient.getInstance());
345+
* }
346+
*
347+
* @Override
348+
* public void onError(final Exception e) {
349+
* e.printStackTrace();
350+
* }
351+
* });
352+
* }
353+
* </pre>
302354
* <p>
303355
* All service calls made using this new client object are blocking, and
304356
* will not return until the service call completes.
@@ -347,6 +399,30 @@ public AWSSecurityTokenServiceClient(AWSCredentialsProvider awsCredentialsProvid
347399
* AWSSecurityTokenService using the specified AWS account credentials
348400
* provider, client configuration options and request metric collector.
349401
* <p>
402+
* The client requests are authenticated using the {@link AWSCredentials}
403+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
404+
* be passed for quick testing. However, it is strongly recommended to use
405+
* Amazon Cognito vended temporary credentials for use in production. This
406+
* can be achieved by using {@link AWSMobileClient}. Please see
407+
* https://aws-amplify.github.io/docs/android/authentication for
408+
* instructions on how to enable {@link AWSMobileClient}.
409+
*
410+
* <pre>
411+
* {@code
412+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
413+
* @Override
414+
* public void onResult(final UserStateDetails details) {
415+
* AWSSecurityTokenServiceClient client = new AWSSecurityTokenServiceClient(AWSMobileClient.getInstance());
416+
* }
417+
*
418+
* @Override
419+
* public void onError(final Exception e) {
420+
* e.printStackTrace();
421+
* }
422+
* });
423+
* }
424+
* </pre>
425+
* <p>
350426
* All service calls made using this new client object are blocking, and
351427
* will not return until the service call completes.
352428
*

0 commit comments

Comments
 (0)