awscli 1.38.8__py3-none-any.whl → 1.38.9__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.
- awscli/__init__.py +1 -1
- awscli/examples/codecommit/get-merge-commit.rst +1 -2
- awscli/examples/cognito-idp/get-identity-provider-by-identifier.rst +35 -0
- awscli/examples/cognito-idp/get-log-delivery-configuration.rst +32 -0
- awscli/examples/cognito-idp/get-signing-certificate.rst +14 -13
- awscli/examples/cognito-idp/get-ui-customization.rst +22 -19
- awscli/examples/cognito-idp/get-user-attribute-verification-code.rst +19 -0
- awscli/examples/cognito-idp/get-user-auth-factors.rst +20 -0
- awscli/examples/cognito-idp/get-user-pool-mfa-config.rst +33 -0
- awscli/examples/cognito-idp/get-user.rst +56 -0
- awscli/examples/cognito-idp/global-sign-out.rst +10 -0
- awscli/examples/cognito-idp/initiate-auth.rst +27 -0
- awscli/examples/cognito-idp/list-devices.rst +23 -25
- awscli/examples/cognito-idp/list-groups.rst +32 -0
- awscli/examples/cognito-idp/list-identity-providers.rst +29 -0
- awscli/examples/cognito-idp/list-resource-servers.rst +43 -0
- awscli/examples/cognito-idp/list-tags-for-resource.rst +17 -0
- awscli/examples/cognito-idp/list-user-import-jobs.rst +61 -57
- awscli/examples/cognito-idp/list-user-pool-clients.rst +32 -0
- awscli/examples/cognito-idp/list-user-pools.rst +48 -22
- awscli/examples/cognito-idp/list-users.rst +98 -35
- awscli/examples/cognito-idp/list-web-authn-credentials.rst +22 -0
- awscli/examples/cognito-idp/respond-to-auth-challenge.rst +78 -27
- awscli/examples/cognito-idp/revoke-token.rst +11 -0
- awscli/examples/cognito-idp/set-log-delivery-configuration.rst +33 -0
- awscli/examples/cognito-idp/set-risk-configuration.rst +136 -23
- awscli/examples/cognito-idp/set-ui-customization.rst +45 -18
- awscli/examples/cognito-idp/set-user-mfa-preference.rst +6 -5
- awscli/examples/cognito-idp/set-user-pool-mfa-config.rst +38 -0
- awscli/examples/cognito-idp/start-user-import-job.rst +27 -29
- awscli/examples/cognito-idp/start-web-authn-registration.rst +47 -0
- awscli/examples/cognito-idp/stop-user-import-job.rst +29 -31
- awscli/examples/ecs/create-cluster.rst +46 -42
- awscli/examples/ecs/put-account-setting.rst +8 -5
- awscli/examples/ecs/update-cluster-settings.rst +6 -6
- awscli/examples/ecs/update-service.rst +235 -7
- {awscli-1.38.8.dist-info → awscli-1.38.9.dist-info}/METADATA +2 -2
- {awscli-1.38.8.dist-info → awscli-1.38.9.dist-info}/RECORD +46 -28
- {awscli-1.38.8.data → awscli-1.38.9.data}/scripts/aws +0 -0
- {awscli-1.38.8.data → awscli-1.38.9.data}/scripts/aws.cmd +0 -0
- {awscli-1.38.8.data → awscli-1.38.9.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.38.8.data → awscli-1.38.9.data}/scripts/aws_completer +0 -0
- {awscli-1.38.8.data → awscli-1.38.9.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.38.8.dist-info → awscli-1.38.9.dist-info}/LICENSE.txt +0 -0
- {awscli-1.38.8.dist-info → awscli-1.38.9.dist-info}/WHEEL +0 -0
- {awscli-1.38.8.dist-info → awscli-1.38.9.dist-info}/top_level.txt +0 -0
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
**To list user import jobs**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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*.
|