awscli 1.36.25__py3-none-any.whl → 1.36.26__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 (70) hide show
  1. awscli/__init__.py +1 -1
  2. awscli/examples/cloudfront/create-distribution.rst +118 -118
  3. awscli/examples/cloudfront/get-distribution-config.rst +6 -10
  4. awscli/examples/cloudfront/list-distributions.rst +29 -249
  5. awscli/examples/cloudfront/update-distribution.rst +16 -24
  6. awscli/examples/cognito-idp/admin-disable-provider-for-user.rst +9 -0
  7. awscli/examples/cognito-idp/admin-disable-user.rst +9 -0
  8. awscli/examples/cognito-idp/admin-enable-user.rst +9 -0
  9. awscli/examples/cognito-idp/admin-get-device.rst +51 -8
  10. awscli/examples/cognito-idp/admin-initiate-auth.rst +24 -25
  11. awscli/examples/cognito-idp/admin-link-provider-for-user.rst +10 -0
  12. awscli/examples/cognito-idp/admin-list-devices.rst +53 -7
  13. awscli/examples/cognito-idp/admin-list-user-auth-events.rst +40 -8
  14. awscli/examples/cognito-idp/admin-respond-to-auth-challenge.rst +29 -0
  15. awscli/examples/cognito-idp/admin-set-user-password.rst +13 -0
  16. awscli/examples/cognito-idp/admin-user-global-sign-out.rst +9 -0
  17. awscli/examples/cognito-idp/associate-software-token.rst +14 -0
  18. awscli/examples/cognito-idp/confirm-device.rst +16 -0
  19. awscli/examples/cognito-idp/create-identity-provider.rst +102 -0
  20. awscli/examples/cognito-idp/create-resource-server.rst +31 -0
  21. awscli/examples/cognito-idp/create-user-pool-client.rst +86 -18
  22. awscli/examples/cognito-idp/create-user-pool-domain.rst +23 -5
  23. awscli/examples/cognito-idp/delete-user-attributes.rst +8 -5
  24. awscli/examples/cognito-idp/describe-user-pool.rst +347 -238
  25. awscli/examples/cognito-idp/get-device.rst +50 -0
  26. awscli/examples/cognito-idp/get-group.rst +15 -12
  27. awscli/examples/cognito-idp/list-devices.rst +53 -0
  28. awscli/examples/ec2/describe-capacity-reservation-fleets.rst +3 -3
  29. awscli/examples/ec2/import-snapshot.rst +1 -1
  30. awscli/examples/ecr-public/batch-delete-image.rst +92 -0
  31. awscli/examples/ecr-public/create-repository.rst +3 -2
  32. awscli/examples/ecr-public/delete-repository-policy.rst +17 -0
  33. awscli/examples/ecr-public/delete-repository.rst +1 -1
  34. awscli/examples/ecr-public/describe-image-tags.rst +25 -0
  35. awscli/examples/ecr-public/describe-images.rst +82 -0
  36. awscli/examples/ecr-public/get-authorization-token.rst +32 -0
  37. awscli/examples/ecr-public/get-repository-policy.rst +17 -0
  38. awscli/examples/ecr-public/put-repository-catalog-data.rst +50 -0
  39. awscli/examples/ecr-public/set-repository-policy.rst +118 -0
  40. awscli/examples/ecs/capacity-provider-update.rst +33 -0
  41. awscli/examples/ecs/get-task-protection.rst +21 -0
  42. awscli/examples/ecs/update-cluster.rst +176 -0
  43. awscli/examples/ecs/update-task-protection.rst +46 -0
  44. awscli/examples/inspector2/associate-member.rst +14 -0
  45. awscli/examples/inspector2/disassociate-member.rst +14 -0
  46. awscli/examples/inspector2/get-member.rst +17 -0
  47. awscli/examples/inspector2/list-members.rst +83 -0
  48. awscli/examples/ivs-realtime/create-ingest-configuration.rst +25 -0
  49. awscli/examples/ivs-realtime/create-stage.rst +6 -2
  50. awscli/examples/ivs-realtime/delete-ingest-configuration.rst +22 -0
  51. awscli/examples/ivs-realtime/get-ingest-configuration.rst +24 -0
  52. awscli/examples/ivs-realtime/get-stage.rst +4 -2
  53. awscli/examples/ivs-realtime/list-ingest-configurations.rst +23 -0
  54. awscli/examples/ivs-realtime/update-ingest-configuration.rst +25 -0
  55. awscli/examples/ivs-realtime/update-stage.rst +3 -1
  56. awscli/examples/s3/sync.rst +1 -1
  57. awscli/examples/s3api/put-object.rst +15 -7
  58. awscli/examples/workmail/list-organizations.rst +1 -1
  59. {awscli-1.36.25.dist-info → awscli-1.36.26.dist-info}/METADATA +2 -2
  60. {awscli-1.36.25.dist-info → awscli-1.36.26.dist-info}/RECORD +68 -36
  61. awscli/examples/cognito-idp/admim-disable-user.rst +0 -8
  62. awscli/examples/cognito-idp/admim-enable-user.rst +0 -8
  63. {awscli-1.36.25.data → awscli-1.36.26.data}/scripts/aws +0 -0
  64. {awscli-1.36.25.data → awscli-1.36.26.data}/scripts/aws.cmd +0 -0
  65. {awscli-1.36.25.data → awscli-1.36.26.data}/scripts/aws_bash_completer +0 -0
  66. {awscli-1.36.25.data → awscli-1.36.26.data}/scripts/aws_completer +0 -0
  67. {awscli-1.36.25.data → awscli-1.36.26.data}/scripts/aws_zsh_completer.sh +0 -0
  68. {awscli-1.36.25.dist-info → awscli-1.36.26.dist-info}/LICENSE.txt +0 -0
  69. {awscli-1.36.25.dist-info → awscli-1.36.26.dist-info}/WHEEL +0 -0
  70. {awscli-1.36.25.dist-info → awscli-1.36.26.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
- **To update a CloudFront distribution's default root object**
1
+ **Example 1: To update a CloudFront distribution's default root object**
2
2
 
3
- The following example updates the default root object to ``index.html`` for the
4
- CloudFront distribution with the ID ``EDFDVBD6EXAMPLE``::
3
+ The following example updates the default root object to ``index.html`` for the CloudFront distribution with the ID ``EDFDVBD6EXAMPLE``. ::
5
4
 
6
- aws cloudfront update-distribution --id EDFDVBD6EXAMPLE \
5
+ aws cloudfront update-distribution \
6
+ --id EDFDVBD6EXAMPLE \
7
7
  --default-root-object index.html
8
8
 
9
9
  Output::
@@ -136,28 +136,20 @@ Output::
136
136
  }
137
137
  }
138
138
 
139
- **To update a CloudFront distribution**
140
-
141
- The following example disables the CloudFront distribution with the ID
142
- ``EMLARXS9EXAMPLE`` by providing the distribution configuration in a JSON file
143
- named ``dist-config-disable.json``. To update a distribution, you must use the
144
- ``--if-match`` option to provide the distribution's ``ETag``. To get the
145
- ``ETag``, use the `get-distribution <get-distribution.html>`_ or
146
- `get-distribution-config <get-distribution-config.html>`_ command.
139
+ **Example 2: To update a CloudFront distribution**
147
140
 
148
- After you use the following example to disable a distribution, you can use the
149
- `delete-distribution <delete-distribution.html>`_ command to delete it.
141
+ The following example disables the CloudFront distribution with the ID ``EMLARXS9EXAMPLE`` by providing the distribution configuration in a JSON file named ``dist-config-disable.json``. To update a distribution, you must use the ``--if-match`` option to provide the distribution's ``ETag``. To get the
142
+ ``ETag``, use the `get-distribution <get-distribution.html>`_ or `get-distribution-config <get-distribution-config.html>`_ command. Note that the ``Enabled`` field is set to
143
+ ``false`` in the JSON file.
150
144
 
151
- ::
145
+ After you use the following example to disable a distribution, you can use the `delete-distribution <delete-distribution.html>`_ command to delete it. ::
152
146
 
153
147
  aws cloudfront update-distribution \
154
148
  --id EMLARXS9EXAMPLE \
155
149
  --if-match E2QWRUHEXAMPLE \
156
150
  --distribution-config file://dist-config-disable.json
157
151
 
158
- The file ``dist-config-disable.json`` is a JSON document in the current folder
159
- that contains the following. Note that the ``Enabled`` field is set to
160
- ``false``::
152
+ Contents of ``dist-config-disable.json``::
161
153
 
162
154
  {
163
155
  "CallerReference": "cli-1574382155-496510",
@@ -169,8 +161,8 @@ that contains the following. Note that the ``Enabled`` field is set to
169
161
  "Quantity": 1,
170
162
  "Items": [
171
163
  {
172
- "Id": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
173
- "DomainName": "awsexamplebucket.s3.amazonaws.com",
164
+ "Id": "amzn-s3-demo-bucket.s3.amazonaws.com-1574382155-273939",
165
+ "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
174
166
  "OriginPath": "",
175
167
  "CustomHeaders": {
176
168
  "Quantity": 0
@@ -185,7 +177,7 @@ that contains the following. Note that the ``Enabled`` field is set to
185
177
  "Quantity": 0
186
178
  },
187
179
  "DefaultCacheBehavior": {
188
- "TargetOriginId": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
180
+ "TargetOriginId": "amzn-s3-demo-bucket.s3.amazonaws.com-1574382155-273939",
189
181
  "ForwardedValues": {
190
182
  "QueryString": false,
191
183
  "Cookies": {
@@ -283,8 +275,8 @@ Output::
283
275
  "Quantity": 1,
284
276
  "Items": [
285
277
  {
286
- "Id": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
287
- "DomainName": "awsexamplebucket.s3.amazonaws.com",
278
+ "Id": "amzn-s3-demo-bucket.s3.amazonaws.com-1574382155-273939",
279
+ "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
288
280
  "OriginPath": "",
289
281
  "CustomHeaders": {
290
282
  "Quantity": 0
@@ -299,7 +291,7 @@ Output::
299
291
  "Quantity": 0
300
292
  },
301
293
  "DefaultCacheBehavior": {
302
- "TargetOriginId": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
294
+ "TargetOriginId": "amzn-s3-demo-bucket.s3.amazonaws.com-1574382155-273939",
303
295
  "ForwardedValues": {
304
296
  "QueryString": false,
305
297
  "Cookies": {
@@ -0,0 +1,9 @@
1
+ **To unlink a federated user from a local user profile**
2
+
3
+ The following ``admin-disable-provider-for-user`` example disconnects a Google user from their linked local profile. ::
4
+
5
+ aws cognito-idp admin-disable-provider-for-user \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --user ProviderAttributeName=Cognito_Subject,ProviderAttributeValue=0000000000000000,ProviderName=Google
8
+
9
+ For more information, see `Linking federated users to an existing user profile <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,9 @@
1
+ **To prevent sign-in by a user**
2
+
3
+ The following ``admin-disable-user`` example prevents sign-in by the user ``diego@example.com``. ::
4
+
5
+ aws cognito-idp admin-disable-user \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego@example.com
8
+
9
+ For more information, see `Managing users <https://docs.aws.amazon.com/cognito/latest/developerguide/managing-users.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,9 @@
1
+ **To enable sign-in by a user**
2
+
3
+ The following ``admin-enable-user`` example enables sign-in by the user diego@example.com. ::
4
+
5
+ aws cognito-idp admin-enable-user \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego@example.com
8
+
9
+ For more information, see `Managing users <https://docs.aws.amazon.com/cognito/latest/developerguide/managing-users.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,8 +1,51 @@
1
- **To get a device**
2
-
3
- This example gets a device for username jane@example.com
4
-
5
- Command::
6
-
7
- aws cognito-idp admin-get-device --user-pool-id us-west-2_aaaaaaaaa --username jane@example.com --device-key us-west-2_abcd_1234-5678
8
-
1
+ **To get a device**
2
+
3
+ The following ``admin-get-device`` example displays one device for the user ``diego``. ::
4
+
5
+ aws cognito-idp admin-get-device \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego \
8
+ --device-key us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
9
+
10
+ Output::
11
+
12
+ {
13
+ "Device": {
14
+ "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
15
+ "DeviceAttributes": [
16
+ {
17
+ "Name": "device_status",
18
+ "Value": "valid"
19
+ },
20
+ {
21
+ "Name": "device_name",
22
+ "Value": "MyDevice"
23
+ },
24
+ {
25
+ "Name": "dev:device_arn",
26
+ "Value": "arn:aws:cognito-idp:us-west-2:123456789012:owner/diego.us-west-2_EXAMPLE/device/us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
27
+ },
28
+ {
29
+ "Name": "dev:device_owner",
30
+ "Value": "diego.us-west-2_EXAMPLE"
31
+ },
32
+ {
33
+ "Name": "last_ip_used",
34
+ "Value": "192.0.2.1"
35
+ },
36
+ {
37
+ "Name": "dev:device_remembered_status",
38
+ "Value": "remembered"
39
+ },
40
+ {
41
+ "Name": "dev:device_sdk",
42
+ "Value": "aws-sdk"
43
+ }
44
+ ],
45
+ "DeviceCreateDate": 1715100742.022,
46
+ "DeviceLastModifiedDate": 1723233651.167,
47
+ "DeviceLastAuthenticatedDate": 1715100742.0
48
+ }
49
+ }
50
+
51
+ For more information, see `Working with user devices in your user pool <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,25 +1,24 @@
1
- **To initiate authorization**
2
-
3
- This example initiates authorization using the ADMIN_NO_SRP_AUTH flow for username jane@example.com
4
-
5
- The client must have sign-in API for server-based authentication (ADMIN_NO_SRP_AUTH) enabled.
6
-
7
- Use the session information in the return value to call `admin-respond-to-auth-challenge`_.
8
-
9
- Command::
10
-
11
- aws cognito-idp admin-initiate-auth --user-pool-id us-west-2_aaaaaaaaa --client-id 3n4b5urk1ft4fl3mg5e62d9ado --auth-flow ADMIN_NO_SRP_AUTH --auth-parameters USERNAME=jane@example.com,PASSWORD=password
12
-
13
- Output::
14
-
15
- {
16
- "ChallengeName": "NEW_PASSWORD_REQUIRED",
17
- "Session": "SESSION",
18
- "ChallengeParameters": {
19
- "USER_ID_FOR_SRP": "84514837-dcbc-4af1-abff-f3c109334894",
20
- "requiredAttributes": "[]",
21
- "userAttributes": "{\"email_verified\":\"true\",\"phone_number_verified\":\"true\",\"phone_number\":\"+01xxx5550100\",\"email\":\"jane@example.com\"}"
22
- }
23
- }
24
-
25
- .. _`admin-respond-to-auth-challenge`: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-respond-to-auth-challenge.html
1
+ **To sign in a user as an admin**
2
+
3
+ The following ``admin-initiate-auth`` example signs in the user diego@example.com. This example also includes metadata for threat protection and ClientMetadata for Lambda triggers. The user is configured for TOTP MFA and receives a challenge to provide a code from their authenticator app before they can complete authentication. ::
4
+
5
+ aws cognito-idp admin-initiate-auth \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --client-id 1example23456789 \
8
+ --auth-flow ADMIN_USER_PASSWORD_AUTH \
9
+ --auth-parameters USERNAME=diego@example.com,PASSWORD="My@Example$Password3!",SECRET_HASH=ExampleEncodedClientIdSecretAndUsername= \
10
+ --context-data="{\"EncodedData\":\"abc123example\",\"HttpHeaders\":[{\"headerName\":\"UserAgent\",\"headerValue\":\"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0\"}],\"IpAddress\":\"192.0.2.1\",\"ServerName\":\"example.com\",\"ServerPath\":\"/login\"}" \
11
+ --client-metadata="{\"MyExampleKey\": \"MyExampleValue\"}"
12
+
13
+ Output::
14
+
15
+ {
16
+ "ChallengeName": "SOFTWARE_TOKEN_MFA",
17
+ "Session": "AYABeExample...",
18
+ "ChallengeParameters": {
19
+ "FRIENDLY_DEVICE_NAME": "MyAuthenticatorApp",
20
+ "USER_ID_FOR_SRP": "diego@example.com"
21
+ }
22
+ }
23
+
24
+ For more information, see `Admin authentication flow <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#amazon-cognito-user-pools-admin-authentication-flow>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,10 @@
1
+ **To link a local user to a federated user**
2
+
3
+ The following ``admin-link-provider-for-user`` example links the local user diego to a user who will do federated sign-in with Google. ::
4
+
5
+ aws cognito-idp admin-link-provider-for-user \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --destination-user ProviderName=Cognito,ProviderAttributeValue=diego \
8
+ --source-user ProviderAttributeName=Cognito_Subject,ProviderAttributeValue=0000000000000000,ProviderName=Google
9
+
10
+ For more information, see `Linking federated users to an existing user profile <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,7 +1,53 @@
1
- **To list devices for a user**
2
-
3
- This example lists devices for username jane@example.com.
4
-
5
- Command::
6
-
7
- aws cognito-idp admin-list-devices --user-pool-id us-west-2_aaaaaaaaa --username jane@example.com
1
+ **To list devices for a user**
2
+
3
+ The following ``admin-list-devices`` example lists devices for the user diego. ::
4
+
5
+ aws cognito-idp admin-list-devices \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego \
8
+ --limit 1
9
+
10
+ Output::
11
+
12
+ {
13
+ "Devices": [
14
+ {
15
+ "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
16
+ "DeviceAttributes": [
17
+ {
18
+ "Name": "device_status",
19
+ "Value": "valid"
20
+ },
21
+ {
22
+ "Name": "device_name",
23
+ "Value": "MyDevice"
24
+ },
25
+ {
26
+ "Name": "dev:device_arn",
27
+ "Value": "arn:aws:cognito-idp:us-west-2:123456789012:owner/diego.us-west-2_EXAMPLE/device/us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
28
+ },
29
+ {
30
+ "Name": "dev:device_owner",
31
+ "Value": "diego.us-west-2_EXAMPLE"
32
+ },
33
+ {
34
+ "Name": "last_ip_used",
35
+ "Value": "192.0.2.1"
36
+ },
37
+ {
38
+ "Name": "dev:device_remembered_status",
39
+ "Value": "remembered"
40
+ },
41
+ {
42
+ "Name": "dev:device_sdk",
43
+ "Value": "aws-sdk"
44
+ }
45
+ ],
46
+ "DeviceCreateDate": 1715100742.022,
47
+ "DeviceLastModifiedDate": 1723233651.167,
48
+ "DeviceLastAuthenticatedDate": 1715100742.0
49
+ }
50
+ ]
51
+ }
52
+
53
+ For more information, see `Working with user devices in your user pool <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -1,8 +1,40 @@
1
- **To list authorization events for a user**
2
-
3
- This example lists authorization events for username diego@example.com.
4
-
5
- Command::
6
-
7
- aws cognito-idp admin-list-user-auth-events --user-pool-id us-west-2_aaaaaaaaa --username diego@example.com
8
-
1
+ **To list authorization events for a user**
2
+
3
+ The following ``admin-list-user-auth-events`` example lists the most recent user activity log event for the user diego. ::
4
+
5
+ aws cognito-idp admin-list-user-auth-events \
6
+ --user-pool-id us-west-2_ywDJHlIfU \
7
+ --username brcotter+050123 \
8
+ --max-results 1
9
+
10
+ Output::
11
+
12
+ {
13
+ "AuthEvents": [
14
+ {
15
+ "EventId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
16
+ "EventType": "SignIn",
17
+ "CreationDate": 1726694203.495,
18
+ "EventResponse": "InProgress",
19
+ "EventRisk": {
20
+ "RiskDecision": "AccountTakeover",
21
+ "RiskLevel": "Medium",
22
+ "CompromisedCredentialsDetected": false
23
+ },
24
+ "ChallengeResponses": [
25
+ {
26
+ "ChallengeName": "Password",
27
+ "ChallengeResponse": "Success"
28
+ }
29
+ ],
30
+ "EventContextData": {
31
+ "IpAddress": "192.0.2.1",
32
+ "City": "Seattle",
33
+ "Country": "United States"
34
+ }
35
+ }
36
+ ],
37
+ "NextToken": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222#2024-09-18T21:16:43.495Z"
38
+ }
39
+
40
+ For more information, see `Viewing and exporting user event history <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-adaptive-authentication.html#user-pool-settings-adaptive-authentication-event-user-history>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,29 @@
1
+ **To respond to an authentication challenge**
2
+
3
+ There are many ways to respond to different authentication challenges, depending on your authentication flow, user pool configuration, and user settings. The following ``admin-respond-to-auth-challenge`` example provides a TOTP MFA code for diego@example.com and completes sign-in. This user pool has device remembering turned on, so the authentication result also returns a new device key. ::
4
+
5
+ aws cognito-idp admin-respond-to-auth-challenge \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --client-id 1example23456789 \
8
+ --challenge-name SOFTWARE_TOKEN_MFA \
9
+ --challenge-responses USERNAME=diego@example.com,SOFTWARE_TOKEN_MFA_CODE=000000 \
10
+ --session AYABeExample...
11
+
12
+ Output::
13
+
14
+ {
15
+ "ChallengeParameters": {},
16
+ "AuthenticationResult": {
17
+ "AccessToken": "eyJra456defEXAMPLE",
18
+ "ExpiresIn": 3600,
19
+ "TokenType": "Bearer",
20
+ "RefreshToken": "eyJra123abcEXAMPLE",
21
+ "IdToken": "eyJra789ghiEXAMPLE",
22
+ "NewDeviceMetadata": {
23
+ "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
24
+ "DeviceGroupKey": "-ExAmPlE1"
25
+ }
26
+ }
27
+ }
28
+
29
+ For more information, see `Admin authentication flow <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#amazon-cognito-user-pools-admin-authentication-flow>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,13 @@
1
+ **To set a user password as an admin**
2
+
3
+ The following ``admin-set-user-password`` example permanently sets the password for diego@example.com. ::
4
+
5
+ aws cognito-idp admin-set-user-password \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego@example.com \
8
+ --password MyExamplePassword1! \
9
+ --permanent
10
+
11
+ This command produces no output.
12
+
13
+ For more information, see `Passwords, password recovery, and password policies <https://docs.aws.amazon.com/cognito/latest/developerguide/managing-users-passwords.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,9 @@
1
+ **To sign out a user as an admin**
2
+
3
+ The following ``admin-user-global-sign-out`` example signs out the user diego@example.com. ::
4
+
5
+ aws cognito-idp admin-user-global-sign-out \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --username diego@example.com
8
+
9
+ For more information, see `Authentication with a user pool <https://docs.aws.amazon.com/cognito/latest/developerguide/authentication.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,14 @@
1
+ **To generate a secret key for an MFA authenticator app**
2
+
3
+ The following ``associate-software-token`` example generates a TOTP private key for a user who has signed in and received an access token. The resulting private key can be manually entered into an authenticator app, or applications can render it as a QR code that the user can scan. ::
4
+
5
+ aws cognito-idp associate-software-token \
6
+ --access-token eyJra456defEXAMPLE
7
+
8
+ Output::
9
+
10
+ {
11
+ "SecretCode": "QWERTYUIOP123456EXAMPLE"
12
+ }
13
+
14
+ For more information, see `TOTP software token MFA <https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-totp.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,16 @@
1
+ **To confirm a user device**
2
+
3
+ The following ``confirm-device`` example adds a new remembered device for the current user. ::
4
+
5
+ aws cognito-idp confirm-device \
6
+ --access-token eyJra456defEXAMPLE \
7
+ --device-key us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \
8
+ --device-secret-verifier-config PasswordVerifier=TXlWZXJpZmllclN0cmluZw,Salt=TXlTUlBTYWx0
9
+
10
+ Output::
11
+
12
+ {
13
+ "UserConfirmationNecessary": false
14
+ }
15
+
16
+ For more information, see `Working with user devices in your user pool <https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,102 @@
1
+ **Example 1: To create a user pool SAML identity provider (IdP) with a metadata URL**
2
+
3
+ The following ``create-identity-provider`` example creates a new SAML IdP with metadata from a public URL, attribute mapping, and two identifiers. ::
4
+
5
+ aws cognito-idp create-identity-provider \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --provider-name MySAML \
8
+ --provider-type SAML \
9
+ --provider-details IDPInit=true,IDPSignout=true,EncryptedResponses=true,MetadataURL=https://auth.example.com/sso/saml/metadata,RequestSigningAlgorithm=rsa-sha256 \
10
+ --attribute-mapping email=emailaddress,phone_number=phone,custom:111=department \
11
+ --idp-identifiers CorpSAML WestSAML
12
+
13
+ Output::
14
+
15
+ {
16
+ "IdentityProvider": {
17
+ "UserPoolId": "us-west-2_EXAMPLE",
18
+ "ProviderName": "MySAML",
19
+ "ProviderType": "SAML",
20
+ "ProviderDetails": {
21
+ "ActiveEncryptionCertificate": "MIICvTCCAaEXAMPLE",
22
+ "EncryptedResponses": "true",
23
+ "IDPInit": "true",
24
+ "IDPSignout": "true",
25
+ "MetadataURL": "https://auth.example.com/sso/saml/metadata",
26
+ "RequestSigningAlgorithm": "rsa-sha256",
27
+ "SLORedirectBindingURI": "https://auth.example.com/slo/saml",
28
+ "SSORedirectBindingURI": "https://auth.example.com/sso/saml"
29
+ },
30
+ "AttributeMapping": {
31
+ "custom:111": "department",
32
+ "emailaddress": "email",
33
+ "phone": "phone_number"
34
+ },
35
+ "IdpIdentifiers": [
36
+ "CorpSAML",
37
+ "WestSAML"
38
+ ],
39
+ "LastModifiedDate": 1726853833.977,
40
+ "CreationDate": 1726853833.977
41
+ }
42
+ }
43
+
44
+ For more information, see `Adding user pool sign-in through a third party <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html>`__ in the *Amazon Cognito Developer Guide*.
45
+
46
+ **Example 2: To create a user pool SAML identity provider (IdP) with a metadata file**
47
+
48
+ The following ``create-identity-provider`` example creates a new SAML IdP with metadata from a file, attribute mapping, and two identifiers. File syntax can differ between operating systems in the ``--provider-details`` parameter. It's easiest to create a JSON input file for this operation.::
49
+
50
+ aws cognito-idp create-identity-provider \
51
+ --cli-input-json file://.\SAML-identity-provider.json
52
+
53
+ Contents of ``SAML-identity-provider.json``::
54
+
55
+ {
56
+ "AttributeMapping": {
57
+ "email" : "idp_email",
58
+ "email_verified" : "idp_email_verified"
59
+ },
60
+ "IdpIdentifiers": [ "platform" ],
61
+ "ProviderDetails": {
62
+ "MetadataFile": "<md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"http://www.example.com/sso\"><md:IDPSSODescriptor WantAuthnRequestsSigned=\"false\" protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\"><md:KeyDescriptor use=\"signing\"><ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509Data><ds:X509Certificate>[IDP_CERTIFICATE_DATA]</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://www.example.com/slo/saml\"/><md:SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://www.example.com/slo/saml\"/><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat><md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://www.example.com/sso/saml\"/><md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://www.example.com/sso/saml\"/></md:IDPSSODescriptor></md:EntityDescriptor>",
63
+ "IDPSignout" : "true",
64
+ "RequestSigningAlgorithm" : "rsa-sha256",
65
+ "EncryptedResponses" : "true",
66
+ "IDPInit" : "true"
67
+ },
68
+ "ProviderName": "MySAML2",
69
+ "ProviderType": "SAML",
70
+ "UserPoolId": "us-west-2_EXAMPLE"
71
+ }
72
+
73
+ Output::
74
+
75
+ {
76
+ "IdentityProvider": {
77
+ "UserPoolId": "us-west-2_EXAMPLE",
78
+ "ProviderName": "MySAML2",
79
+ "ProviderType": "SAML",
80
+ "ProviderDetails": {
81
+ "ActiveEncryptionCertificate": "[USER_POOL_ENCRYPTION_CERTIFICATE_DATA]",
82
+ "EncryptedResponses": "true",
83
+ "IDPInit": "true",
84
+ "IDPSignout": "true",
85
+ "MetadataFile": "<md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"http://www.example.com/sso\"><md:IDPSSODescriptor WantAuthnRequestsSigned=\"false\" protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\"><md:KeyDescriptor use=\"signing\"><ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509Data><ds:X509Certificate>[IDP_CERTIFICATE_DATA]</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://www.example.com/slo/saml\"/><md:SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://www.example.com/slo/saml\"/><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat><md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://www.example.com/sso/saml\"/><md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://www.example.com/sso/saml\"/></md:IDPSSODescriptor></md:EntityDescriptor>",
86
+ "RequestSigningAlgorithm": "rsa-sha256",
87
+ "SLORedirectBindingURI": "https://www.example.com/slo/saml",
88
+ "SSORedirectBindingURI": "https://www.example.com/sso/saml"
89
+ },
90
+ "AttributeMapping": {
91
+ "email": "idp_email",
92
+ "email_verified": "idp_email_verified"
93
+ },
94
+ "IdpIdentifiers": [
95
+ "platform"
96
+ ],
97
+ "LastModifiedDate": 1726855290.731,
98
+ "CreationDate": 1726855290.731
99
+ }
100
+ }
101
+
102
+ For more information, see `Adding user pool sign-in through a third party <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html>`__ in the *Amazon Cognito Developer Guide*.
@@ -0,0 +1,31 @@
1
+ **To create a user pool client**
2
+
3
+ The following ``create-resource-server`` example creates a new resource server with custom scopes. ::
4
+
5
+ aws cognito-idp create-resource-server \
6
+ --user-pool-id us-west-2_EXAMPLE \
7
+ --identifier solar-system-data \
8
+ --name "Solar system object tracker" \
9
+ --scopes ScopeName=sunproximity.read,ScopeDescription="Distance in AU from Sol" ScopeName=asteroids.add,ScopeDescription="Enter a new asteroid"
10
+
11
+ Output::
12
+
13
+ {
14
+ "ResourceServer": {
15
+ "UserPoolId": "us-west-2_EXAMPLE",
16
+ "Identifier": "solar-system-data",
17
+ "Name": "Solar system object tracker",
18
+ "Scopes": [
19
+ {
20
+ "ScopeName": "sunproximity.read",
21
+ "ScopeDescription": "Distance in AU from Sol"
22
+ },
23
+ {
24
+ "ScopeName": "asteroids.add",
25
+ "ScopeDescription": "Enter a new asteroid"
26
+ }
27
+ ]
28
+ }
29
+ }
30
+
31
+ For more information, see `Scopes, M2M, and APIs with resource servers <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html>`__ in the *Amazon Cognito Developer Guide*.