awscli 1.38.8__py3-none-any.whl → 1.38.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of awscli might be problematic. Click here for more details.

Files changed (46) hide show
  1. awscli/__init__.py +1 -1
  2. awscli/examples/codecommit/get-merge-commit.rst +1 -2
  3. awscli/examples/cognito-idp/get-identity-provider-by-identifier.rst +35 -0
  4. awscli/examples/cognito-idp/get-log-delivery-configuration.rst +32 -0
  5. awscli/examples/cognito-idp/get-signing-certificate.rst +14 -13
  6. awscli/examples/cognito-idp/get-ui-customization.rst +22 -19
  7. awscli/examples/cognito-idp/get-user-attribute-verification-code.rst +19 -0
  8. awscli/examples/cognito-idp/get-user-auth-factors.rst +20 -0
  9. awscli/examples/cognito-idp/get-user-pool-mfa-config.rst +33 -0
  10. awscli/examples/cognito-idp/get-user.rst +56 -0
  11. awscli/examples/cognito-idp/global-sign-out.rst +10 -0
  12. awscli/examples/cognito-idp/initiate-auth.rst +27 -0
  13. awscli/examples/cognito-idp/list-devices.rst +23 -25
  14. awscli/examples/cognito-idp/list-groups.rst +32 -0
  15. awscli/examples/cognito-idp/list-identity-providers.rst +29 -0
  16. awscli/examples/cognito-idp/list-resource-servers.rst +43 -0
  17. awscli/examples/cognito-idp/list-tags-for-resource.rst +17 -0
  18. awscli/examples/cognito-idp/list-user-import-jobs.rst +61 -57
  19. awscli/examples/cognito-idp/list-user-pool-clients.rst +32 -0
  20. awscli/examples/cognito-idp/list-user-pools.rst +48 -22
  21. awscli/examples/cognito-idp/list-users.rst +98 -35
  22. awscli/examples/cognito-idp/list-web-authn-credentials.rst +22 -0
  23. awscli/examples/cognito-idp/respond-to-auth-challenge.rst +78 -27
  24. awscli/examples/cognito-idp/revoke-token.rst +11 -0
  25. awscli/examples/cognito-idp/set-log-delivery-configuration.rst +33 -0
  26. awscli/examples/cognito-idp/set-risk-configuration.rst +136 -23
  27. awscli/examples/cognito-idp/set-ui-customization.rst +45 -18
  28. awscli/examples/cognito-idp/set-user-mfa-preference.rst +6 -5
  29. awscli/examples/cognito-idp/set-user-pool-mfa-config.rst +38 -0
  30. awscli/examples/cognito-idp/start-user-import-job.rst +27 -29
  31. awscli/examples/cognito-idp/start-web-authn-registration.rst +47 -0
  32. awscli/examples/cognito-idp/stop-user-import-job.rst +29 -31
  33. awscli/examples/ecs/create-cluster.rst +46 -42
  34. awscli/examples/ecs/put-account-setting.rst +8 -5
  35. awscli/examples/ecs/update-cluster-settings.rst +6 -6
  36. awscli/examples/ecs/update-service.rst +235 -7
  37. {awscli-1.38.8.dist-info → awscli-1.38.10.dist-info}/METADATA +2 -2
  38. {awscli-1.38.8.dist-info → awscli-1.38.10.dist-info}/RECORD +46 -28
  39. {awscli-1.38.8.data → awscli-1.38.10.data}/scripts/aws +0 -0
  40. {awscli-1.38.8.data → awscli-1.38.10.data}/scripts/aws.cmd +0 -0
  41. {awscli-1.38.8.data → awscli-1.38.10.data}/scripts/aws_bash_completer +0 -0
  42. {awscli-1.38.8.data → awscli-1.38.10.data}/scripts/aws_completer +0 -0
  43. {awscli-1.38.8.data → awscli-1.38.10.data}/scripts/aws_zsh_completer.sh +0 -0
  44. {awscli-1.38.8.dist-info → awscli-1.38.10.dist-info}/LICENSE.txt +0 -0
  45. {awscli-1.38.8.dist-info → awscli-1.38.10.dist-info}/WHEEL +0 -0
  46. {awscli-1.38.8.dist-info → awscli-1.38.10.dist-info}/top_level.txt +0 -0
@@ -1,57 +1,61 @@
1
- **To list user import jobs**
2
-
3
- This example lists user import jobs.
4
-
5
- For more information about importing users, see `Importing Users into User Pools From a CSV File`_.
6
-
7
- Command::
8
-
9
- aws cognito-idp list-user-import-jobs --user-pool-id us-west-2_aaaaaaaaa --max-results 20
10
-
11
- Output::
12
-
13
- {
14
- "UserImportJobs": [
15
- {
16
- "JobName": "Test2",
17
- "JobId": "import-d0OnwGA3mV",
18
- "UserPoolId": "us-west-2_aaaaaaaaa",
19
- "PreSignedUrl": "PRE_SIGNED_URL",
20
- "CreationDate": 1548272793.069,
21
- "Status": "Created",
22
- "CloudWatchLogsRoleArn": "arn:aws:iam::111111111111:role/CognitoCloudWatchLogsRole",
23
- "ImportedUsers": 0,
24
- "SkippedUsers": 0,
25
- "FailedUsers": 0
26
- },
27
- {
28
- "JobName": "Test1",
29
- "JobId": "import-qQ0DCt2fRh",
30
- "UserPoolId": "us-west-2_aaaaaaaaa",
31
- "PreSignedUrl": "PRE_SIGNED_URL",
32
- "CreationDate": 1548271795.471,
33
- "Status": "Created",
34
- "CloudWatchLogsRoleArn": "arn:aws:iam::111111111111:role/CognitoCloudWatchLogsRole",
35
- "ImportedUsers": 0,
36
- "SkippedUsers": 0,
37
- "FailedUsers": 0
38
- },
39
- {
40
- "JobName": "import-Test1",
41
- "JobId": "import-TZqNQvDRnW",
42
- "UserPoolId": "us-west-2_aaaaaaaaa",
43
- "PreSignedUrl": "PRE_SIGNED_URL",
44
- "CreationDate": 1548271708.512,
45
- "StartDate": 1548277247.962,
46
- "CompletionDate": 1548277248.912,
47
- "Status": "Failed",
48
- "CloudWatchLogsRoleArn": "arn:aws:iam::111111111111:role/CognitoCloudWatchLogsRole",
49
- "ImportedUsers": 0,
50
- "SkippedUsers": 0,
51
- "FailedUsers": 1,
52
- "CompletionMessage": "Too many users have failed or been skipped during the import."
53
- }
54
- ]
55
- }
56
-
57
- .. _`Importing Users into User Pools From a CSV File`: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-using-import-tool.html
1
+ **To list user import jobs and statuses**
2
+
3
+ The following ``list-user-import-jobs`` example lists first three user import jobs and their details in the requested user pool. ::
4
+
5
+ aws cognito-idp list-user-import-jobs \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --max-results 3
8
+
9
+ Output::
10
+
11
+ {
12
+ "PaginationToken": "us-west-2_EXAMPLE#import-example3#1667948397084",
13
+ "UserImportJobs": [
14
+ {
15
+ "CloudWatchLogsRoleArn": "arn:aws:iam::123456789012:role/service-role/Cognito-UserImport-Role",
16
+ "CompletionDate": 1735329786.142,
17
+ "CompletionMessage": "The user import job has expired.",
18
+ "CreationDate": 1735241621.022,
19
+ "FailedUsers": 0,
20
+ "ImportedUsers": 0,
21
+ "JobId": "import-example1",
22
+ "JobName": "Test-import-job-1",
23
+ "PreSignedUrl": "https://aws-cognito-idp-user-import-pdx.s3.us-west-2.amazonaws.com/123456789012/us-west-2_EXAMPLE/import-mAgUtd8PMm?X-Amz-Security-Token=[token]&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241226T193341Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption&X-Amz-Expires=899&X-Amz-Credential=[credential]&X-Amz-Signature=[signature]",
24
+ "SkippedUsers": 0,
25
+ "Status": "Expired",
26
+ "UserPoolId": "us-west-2_EXAMPLE"
27
+ },
28
+ {
29
+ "CloudWatchLogsRoleArn": "arn:aws:iam::123456789012:role/service-role/Cognito-UserImport-Role",
30
+ "CompletionDate": 1681509058.408,
31
+ "CompletionMessage": "Too many users have failed or been skipped during the import.",
32
+ "CreationDate": 1681509001.477,
33
+ "FailedUsers": 1,
34
+ "ImportedUsers": 0,
35
+ "JobId": "import-example2",
36
+ "JobName": "Test-import-job-2",
37
+ "PreSignedUrl": "https://aws-cognito-idp-user-import-pdx.s3.us-west-2.amazonaws.com/123456789012/us-west-2_EXAMPLE/import-mAgUtd8PMm?X-Amz-Security-Token=[token]&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241226T193341Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption&X-Amz-Expires=899&X-Amz-Credential=[credential]&X-Amz-Signature=[signature]",
38
+ "SkippedUsers": 0,
39
+ "StartDate": 1681509057.965,
40
+ "Status": "Failed",
41
+ "UserPoolId": "us-west-2_EXAMPLE"
42
+ },
43
+ {
44
+ "CloudWatchLogsRoleArn": "arn:aws:iam::123456789012:role/service-role/Cognito-UserImport-Role",
45
+ "CompletionDate": 1.667864578676E9,
46
+ "CompletionMessage": "Import Job Completed Successfully.",
47
+ "CreationDate": 1.667864480281E9,
48
+ "FailedUsers": 0,
49
+ "ImportedUsers": 6,
50
+ "JobId": "import-example3",
51
+ "JobName": "Test-import-job-3",
52
+ "PreSignedUrl": "https://aws-cognito-idp-user-import-pdx.s3.us-west-2.amazonaws.com/123456789012/us-west-2_EXAMPLE/import-mAgUtd8PMm?X-Amz-Security-Token=[token]&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241226T193341Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption&X-Amz-Expires=899&X-Amz-Credential=[credential]&X-Amz-Signature=[signature]",
53
+ "SkippedUsers": 0,
54
+ "StartDate": 1.667864578167E9,
55
+ "Status": "Succeeded",
56
+ "UserPoolId": "us-west-2_EXAMPLE"
57
+ }
58
+ ]
59
+ }
60
+
61
+ For more information, see `Importing users from a CSV file <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-using-import-tool.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,32 @@
1
+ **To list app clients**
2
+
3
+ The following ``list-user-pool-clients`` example lists the first three app clients in the requested user pool. ::
4
+
5
+ aws cognito-idp list-user-pool-clients \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --max-results 3
8
+
9
+ Output::
10
+
11
+ {
12
+ "NextToken": "[Pagination token]",
13
+ "UserPoolClients": [
14
+ {
15
+ "ClientId": "1example23456789",
16
+ "ClientName": "app-client-1",
17
+ "UserPoolId": "us-west-2_EXAMPLE"
18
+ },
19
+ {
20
+ "ClientId": "2example34567890",
21
+ "ClientName": "app-client-2",
22
+ "UserPoolId": "us-west-2_EXAMPLE"
23
+ },
24
+ {
25
+ "ClientId": "3example45678901",
26
+ "ClientName": "app-client-3",
27
+ "UserPoolId": "us-west-2_EXAMPLE"
28
+ }
29
+ ]
30
+ }
31
+
32
+ For more information, see `App clients <https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,22 +1,48 @@
1
- **To list user pools**
2
-
3
- This example lists up to 20 user pools.
4
-
5
- Command::
6
-
7
- aws cognito-idp list-user-pools --max-results 20
8
-
9
- Output::
10
-
11
- {
12
- "UserPools": [
13
- {
14
- "CreationDate": 1547763720.822,
15
- "LastModifiedDate": 1547763720.822,
16
- "LambdaConfig": {},
17
- "Id": "us-west-2_aaaaaaaaa",
18
- "Name": "MyUserPool"
19
- }
20
- ]
21
- }
22
-
1
+ **To list user pools**
2
+
3
+ The following ``list-user-pools`` example lists 3 of the available user pools in the AWS account of the current CLI credentials. ::
4
+
5
+ aws cognito-idp list-user-pools \
6
+ --max-results 3
7
+
8
+ Output::
9
+
10
+ {
11
+ "NextToken": "[Pagination token]",
12
+ "UserPools": [
13
+ {
14
+ "CreationDate": 1681502497.741,
15
+ "Id": "us-west-2_EXAMPLE1",
16
+ "LambdaConfig": {
17
+ "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
18
+ "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
19
+ "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
20
+ "PreTokenGenerationConfig": {
21
+ "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
22
+ "LambdaVersion": "V1_0"
23
+ }
24
+ },
25
+ "LastModifiedDate": 1681502497.741,
26
+ "Name": "user pool 1"
27
+ },
28
+ {
29
+ "CreationDate": 1686064178.717,
30
+ "Id": "us-west-2_EXAMPLE2",
31
+ "LambdaConfig": {
32
+ },
33
+ "LastModifiedDate": 1686064178.873,
34
+ "Name": "user pool 2"
35
+ },
36
+ {
37
+ "CreationDate": 1627681712.237,
38
+ "Id": "us-west-2_EXAMPLE3",
39
+ "LambdaConfig": {
40
+ "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
41
+ },
42
+ "LastModifiedDate": 1678486942.479,
43
+ "Name": "user pool 3"
44
+ }
45
+ ]
46
+ }
47
+
48
+ For more information, see `Amazon Cognito user pools <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,35 +1,98 @@
1
- **To list users**
2
-
3
- This example lists up to 20 users.
4
-
5
- Command::
6
-
7
- aws cognito-idp list-users --user-pool-id us-west-2_aaaaaaaaa --limit 20
8
-
9
- Output::
10
-
11
- {
12
- "Users": [
13
- {
14
- "Username": "22704aa3-fc10-479a-97eb-2af5806bd327",
15
- "Enabled": true,
16
- "UserStatus": "FORCE_CHANGE_PASSWORD",
17
- "UserCreateDate": 1548089817.683,
18
- "UserLastModifiedDate": 1548089817.683,
19
- "Attributes": [
20
- {
21
- "Name": "sub",
22
- "Value": "22704aa3-fc10-479a-97eb-2af5806bd327"
23
- },
24
- {
25
- "Name": "email_verified",
26
- "Value": "true"
27
- },
28
- {
29
- "Name": "email",
30
- "Value": "mary@example.com"
31
- }
32
- ]
33
- }
34
- ]
35
- }
1
+ **Example 1: To list users with a server-side filter**
2
+
3
+ The following ``list-users`` example lists 3 users in the requested user pool whose email addresses begin with ``testuser``. ::
4
+
5
+ aws cognito-idp list-users \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --filter email^=\"testuser\" \
8
+ --max-items 3
9
+
10
+ Output::
11
+
12
+ {
13
+ "PaginationToken": "efgh5678EXAMPLE",
14
+ "Users": [
15
+ {
16
+ "Attributes": [
17
+ {
18
+ "Name": "sub",
19
+ "Value": "eaad0219-2117-439f-8d46-4db20e59268f"
20
+ },
21
+ {
22
+ "Name": "email",
23
+ "Value": "testuser@example.com"
24
+ }
25
+ ],
26
+ "Enabled": true,
27
+ "UserCreateDate": 1682955829.578,
28
+ "UserLastModifiedDate": 1689030181.63,
29
+ "UserStatus": "CONFIRMED",
30
+ "Username": "testuser"
31
+ },
32
+ {
33
+ "Attributes": [
34
+ {
35
+ "Name": "sub",
36
+ "Value": "3b994cfd-0b07-4581-be46-3c82f9a70c90"
37
+ },
38
+ {
39
+ "Name": "email",
40
+ "Value": "testuser2@example.com"
41
+ }
42
+ ],
43
+ "Enabled": true,
44
+ "UserCreateDate": 1684427979.201,
45
+ "UserLastModifiedDate": 1684427979.201,
46
+ "UserStatus": "UNCONFIRMED",
47
+ "Username": "testuser2"
48
+ },
49
+ {
50
+ "Attributes": [
51
+ {
52
+ "Name": "sub",
53
+ "Value": "5929e0d1-4c34-42d1-9b79-a5ecacfe66f7"
54
+ },
55
+ {
56
+ "Name": "email",
57
+ "Value": "testuser3@example.com"
58
+ }
59
+ ],
60
+ "Enabled": true,
61
+ "UserCreateDate": 1684427823.641,
62
+ "UserLastModifiedDate": 1684427823.641,
63
+ "UserStatus": "UNCONFIRMED",
64
+ "Username": "testuser3@example.com"
65
+ }
66
+ ]
67
+ }
68
+
69
+ For more information, see `Managing and searching for users <https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html>`__ in the *Amazon Cognito Developer Guide*.
70
+
71
+ **Example 2: To list users with a client-side filter**
72
+
73
+ The following ``list-users`` example lists the attributes of three users who have an attribute, in this case their email address, that contains the email domain "@example.com". If other attributes contained this string, they would also be displayed. The second user has no attributes that match the query and is excluded from the displayed output, but not from the server response. ::
74
+
75
+ aws cognito-idp list-users \
76
+ --user-pool-id us-west-2_EXAMPLE \
77
+ --max-items 3
78
+ --query Users\[\*\].Attributes\[\?Value\.contains\(\@\,\'@example.com\'\)\]
79
+
80
+ Output::
81
+
82
+ [
83
+ [
84
+ {
85
+ "Name": "email",
86
+ "Value": "admin@example.com"
87
+ }
88
+ ],
89
+ [],
90
+ [
91
+ {
92
+ "Name": "email",
93
+ "Value": "operator@example.com"
94
+ }
95
+ ]
96
+ ]
97
+
98
+ For more information, see `Managing and searching for users <https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,22 @@
1
+ **To list passkey credentials**
2
+
3
+ The following ``list-web-authn-credentials`` example lists passkey, or WebAuthn, credentials for the current user. They have one registered device. ::
4
+
5
+ aws cognito-idp list-web-authn-credentials \
6
+ --access-token eyJra456defEXAMPLE
7
+
8
+ Output::
9
+
10
+ {
11
+ "Credentials": [
12
+ {
13
+ "AuthenticatorAttachment": "cross-platform",
14
+ "CreatedAt": 1736293876.115,
15
+ "CredentialId": "8LApgk4-lNUFHbhm2w6Und7-uxcc8coJGsPxiogvHoItc64xWQc3r4CEXAMPLE",
16
+ "FriendlyCredentialName": "Roaming passkey",
17
+ "RelyingPartyId": "auth.example.com"
18
+ }
19
+ ]
20
+ }
21
+
22
+ For more information, see `Passkey sign-in <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow-methods.html#amazon-cognito-user-pools-authentication-flow-methods-passkey>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,27 +1,78 @@
1
- **To respond to an authorization challenge**
2
-
3
- This example responds to an authorization challenge initiated with `initiate-auth`_. It is a response to the NEW_PASSWORD_REQUIRED challenge.
4
- It sets a password for user jane@example.com.
5
-
6
- Command::
7
-
8
- aws cognito-idp respond-to-auth-challenge --client-id 3n4b5urk1ft4fl3mg5e62d9ado --challenge-name NEW_PASSWORD_REQUIRED --challenge-responses USERNAME=jane@example.com,NEW_PASSWORD="password" --session "SESSION_TOKEN"
9
-
10
- Output::
11
-
12
- {
13
- "ChallengeParameters": {},
14
- "AuthenticationResult": {
15
- "AccessToken": "ACCESS_TOKEN",
16
- "ExpiresIn": 3600,
17
- "TokenType": "Bearer",
18
- "RefreshToken": "REFRESH_TOKEN",
19
- "IdToken": "ID_TOKEN",
20
- "NewDeviceMetadata": {
21
- "DeviceKey": "us-west-2_fec070d2-fa88-424a-8ec8-b26d7198eb23",
22
- "DeviceGroupKey": "-wt2ha1Zd"
23
- }
24
- }
25
- }
26
-
27
- .. _`initiate-auth`: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/initiate-auth.html
1
+ **Example 1: To respond to a NEW_PASSWORD_REQUIRED challenge**
2
+
3
+ The following ``respond-to-auth-challenge`` example responds to a NEW_PASSWORD_REQUIRED challenge that `initiate-auth`_ returned. It sets a password for the user ``jane@example.com``. ::
4
+
5
+ aws cognito-idp respond-to-auth-challenge \
6
+ --client-id 1example23456789 \
7
+ --challenge-name NEW_PASSWORD_REQUIRED \
8
+ --challenge-responses USERNAME=jane@example.com,NEW_PASSWORD=[Password] \
9
+ --session AYABeEv5HklEXAMPLE
10
+
11
+ Output::
12
+
13
+ {
14
+ "ChallengeParameters": {},
15
+ "AuthenticationResult": {
16
+ "AccessToken": "ACCESS_TOKEN",
17
+ "ExpiresIn": 3600,
18
+ "TokenType": "Bearer",
19
+ "RefreshToken": "REFRESH_TOKEN",
20
+ "IdToken": "ID_TOKEN",
21
+ "NewDeviceMetadata": {
22
+ "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
23
+ "DeviceGroupKey": "-wt2ha1Zd"
24
+ }
25
+ }
26
+ }
27
+
28
+ For more information, see `Authentication <https://docs.aws.amazon.com/cognito/latest/developerguide/authentication.html>`__ in the *Amazon Cognito Developer Guide*.
29
+
30
+ **Example 2: To respond to a SELECT_MFA_TYPE challenge**
31
+
32
+ The following ``respond-to-auth-challenge`` example chooses TOTP MFA as the MFA option for the current user. The user was prompted to select an MFA type and will next be prompted to enter their MFA code. ::
33
+
34
+ aws cognito-idp respond-to-auth-challenge \
35
+ --client-id 1example23456789
36
+ --session AYABeEv5HklEXAMPLE
37
+ --challenge-name SELECT_MFA_TYPE
38
+ --challenge-responses USERNAME=testuser,ANSWER=SOFTWARE_TOKEN_MFA
39
+
40
+ Output::
41
+
42
+ {
43
+ "ChallengeName": "SOFTWARE_TOKEN_MFA",
44
+ "Session": "AYABeEv5HklEXAMPLE",
45
+ "ChallengeParameters": {
46
+ "FRIENDLY_DEVICE_NAME": "transparent"
47
+ }
48
+ }
49
+
50
+ For more information, see `Adding MFA <https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html>`__ in the *Amazon Cognito Developer Guide*.
51
+
52
+ **Example 3: To respond to a SOFTWARE_TOKEN_MFA challenge**
53
+
54
+ The following ``respond-to-auth-challenge`` example provides a TOTP MFA code and completes sign-in. ::
55
+
56
+ aws cognito-idp respond-to-auth-challenge \
57
+ --client-id 1example23456789 \
58
+ --session AYABeEv5HklEXAMPLE \
59
+ --challenge-name SOFTWARE_TOKEN_MFA \
60
+ --challenge-responses USERNAME=testuser,SOFTWARE_TOKEN_MFA_CODE=123456
61
+
62
+ Output::
63
+
64
+ {
65
+ "AuthenticationResult": {
66
+ "AccessToken": "eyJra456defEXAMPLE",
67
+ "ExpiresIn": 3600,
68
+ "TokenType": "Bearer",
69
+ "RefreshToken": "eyJra123abcEXAMPLE",
70
+ "IdToken": "eyJra789ghiEXAMPLE",
71
+ "NewDeviceMetadata": {
72
+ "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
73
+ "DeviceGroupKey": "-v7w9UcY6"
74
+ }
75
+ }
76
+ }
77
+
78
+ For more information, see `Adding MFA <https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,11 @@
1
+ **To revoke a refresh token**
2
+
3
+ The following ``revoke-token`` revokes the requested refresh token and associated access tokens. ::
4
+
5
+ aws cognito-idp revoke-token \
6
+ --token eyJjd123abcEXAMPLE \
7
+ --client-id 1example23456789
8
+
9
+ This command produces no output.
10
+
11
+ For more information, see `Revoking tokens <https://docs.aws.amazon.com/cognito/latest/developerguide/token-revocation.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,33 @@
1
+ **To set up log export from a user pool**
2
+
3
+ The following ``set-log-delivery-configuration`` example configures the requested user pool with user-notification error logging to a log group and user-authentication info logging to an S3 bucket. ::
4
+
5
+ aws cognito-idp set-log-delivery-configuration \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --log-configurations LogLevel=ERROR,EventSource=userNotification,CloudWatchLogsConfiguration={LogGroupArn=arn:aws:logs:us-west-2:123456789012:log-group:cognito-exported} LogLevel=INFO,EventSource=userAuthEvents,S3Configuration={BucketArn=arn:aws:s3:::amzn-s3-demo-bucket1}
8
+
9
+ Output::
10
+
11
+ {
12
+ "LogDeliveryConfiguration": {
13
+ "LogConfigurations": [
14
+ {
15
+ "CloudWatchLogsConfiguration": {
16
+ "LogGroupArn": "arn:aws:logs:us-west-2:123456789012:log-group:cognito-exported"
17
+ },
18
+ "EventSource": "userNotification",
19
+ "LogLevel": "ERROR"
20
+ },
21
+ {
22
+ "EventSource": "userAuthEvents",
23
+ "LogLevel": "INFO",
24
+ "S3Configuration": {
25
+ "BucketArn": "arn:aws:s3:::amzn-s3-demo-bucket1"
26
+ }
27
+ }
28
+ ],
29
+ "UserPoolId": "us-west-2_EXAMPLE"
30
+ }
31
+ }
32
+
33
+ For more information, see `Exporting user pool logs <https://docs.aws.amazon.com/cognito/latest/developerguide/exporting-quotas-and-usage.html>`__ in the *Amazon Cognito Developer Guide*.