Skip to content

Commit d2d80fd

Browse files
author
awstools
committed
feat(client-verifiedpermissions): Adds GroupConfiguration field to Identity Source API's
1 parent c349825 commit d2d80fd

File tree

8 files changed

+296
-28
lines changed

8 files changed

+296
-28
lines changed

clients/client-verifiedpermissions/src/commands/CreateIdentitySourceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export interface CreateIdentitySourceCommandOutput extends CreateIdentitySourceO
8282
* clientIds: [ // ClientIds
8383
* "STRING_VALUE",
8484
* ],
85+
* groupConfiguration: { // CognitoGroupConfiguration
86+
* groupEntityType: "STRING_VALUE", // required
87+
* },
8588
* },
8689
* },
8790
* principalEntityType: "STRING_VALUE",

clients/client-verifiedpermissions/src/commands/GetIdentitySourceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export interface GetIdentitySourceCommandOutput extends GetIdentitySourceOutput,
6969
* // "STRING_VALUE",
7070
* // ],
7171
* // issuer: "STRING_VALUE", // required
72+
* // groupConfiguration: { // CognitoGroupConfigurationDetail
73+
* // groupEntityType: "STRING_VALUE",
74+
* // },
7275
* // },
7376
* // },
7477
* // };

clients/client-verifiedpermissions/src/commands/IsAuthorizedWithTokenCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export interface IsAuthorizedWithTokenCommandOutput extends IsAuthorizedWithToke
135135
* // errorDescription: "STRING_VALUE", // required
136136
* // },
137137
* // ],
138+
* // principal: { // EntityIdentifier
139+
* // entityType: "STRING_VALUE", // required
140+
* // entityId: "STRING_VALUE", // required
141+
* // },
138142
* // };
139143
*
140144
* ```

clients/client-verifiedpermissions/src/commands/ListIdentitySourcesCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export interface ListIdentitySourcesCommandOutput extends ListIdentitySourcesOut
7979
* // "STRING_VALUE",
8080
* // ],
8181
* // issuer: "STRING_VALUE", // required
82+
* // groupConfiguration: { // CognitoGroupConfigurationItem
83+
* // groupEntityType: "STRING_VALUE",
84+
* // },
8285
* // },
8386
* // },
8487
* // },

clients/client-verifiedpermissions/src/commands/UpdateIdentitySourceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export interface UpdateIdentitySourceCommandOutput extends UpdateIdentitySourceO
5858
* clientIds: [ // ClientIds
5959
* "STRING_VALUE",
6060
* ],
61+
* groupConfiguration: { // UpdateCognitoGroupConfiguration
62+
* groupEntityType: "STRING_VALUE", // required
63+
* },
6164
* },
6265
* },
6366
* principalEntityType: "STRING_VALUE",

clients/client-verifiedpermissions/src/models/models_0.ts

Lines changed: 157 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -357,13 +357,60 @@ export class ValidationException extends __BaseException {
357357
}
358358
}
359359

360+
/**
361+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
362+
* pool identity source.</p>
363+
* <p>This data type is part of a <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CognitoUserPoolConfiguration.html">CognitoUserPoolConfiguration</a> structure and is a request parameter in <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreateIdentitySource.html">CreateIdentitySource</a>.</p>
364+
* @public
365+
*/
366+
export interface CognitoGroupConfiguration {
367+
/**
368+
* <p>The name of the schema entity type that's mapped to the user pool group. Defaults
369+
* to <code>AWS::CognitoGroup</code>.</p>
370+
* @public
371+
*/
372+
groupEntityType: string | undefined;
373+
}
374+
375+
/**
376+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
377+
* pool identity source.</p>
378+
* <p>This data type is part of an <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CognitoUserPoolConfigurationItem.html">CognitoUserPoolConfigurationDetail</a> structure and is a response parameter to
379+
* <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetIdentitySource.html">GetIdentitySource</a>.</p>
380+
* @public
381+
*/
382+
export interface CognitoGroupConfigurationDetail {
383+
/**
384+
* <p>The name of the schema entity type that's mapped to the user pool group. Defaults
385+
* to <code>AWS::CognitoGroup</code>.</p>
386+
* @public
387+
*/
388+
groupEntityType?: string;
389+
}
390+
391+
/**
392+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
393+
* pool identity source.</p>
394+
* <p>This data type is part of an <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CognitoUserPoolConfigurationDetail.html">CognitoUserPoolConfigurationItem</a> structure and is a response parameter to
395+
* <a href="http://forums.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListIdentitySources.html">ListIdentitySources</a>.</p>
396+
* @public
397+
*/
398+
export interface CognitoGroupConfigurationItem {
399+
/**
400+
* <p>The name of the schema entity type that's mapped to the user pool group. Defaults
401+
* to <code>AWS::CognitoGroup</code>.</p>
402+
* @public
403+
*/
404+
groupEntityType?: string;
405+
}
406+
360407
/**
361408
* <p>The configuration for an identity source that represents a connection to an Amazon Cognito user pool used
362409
* as an identity provider for Verified Permissions.</p>
363410
* <p>This data type is used as a field that is part of an <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_Configuration.html">Configuration</a> structure that is
364411
* used as a parameter to <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreateIdentitySource.html">CreateIdentitySource</a>.</p>
365412
* <p>Example:<code>"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
366-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}</code>
413+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}</code>
367414
* </p>
368415
* @public
369416
*/
@@ -386,6 +433,13 @@ export interface CognitoUserPoolConfiguration {
386433
* @public
387434
*/
388435
clientIds?: string[];
436+
437+
/**
438+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
439+
* pool identity source.</p>
440+
* @public
441+
*/
442+
groupConfiguration?: CognitoGroupConfiguration;
389443
}
390444

391445
/**
@@ -394,7 +448,7 @@ export interface CognitoUserPoolConfiguration {
394448
* <p>This data type is used as a field that is part of an <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ConfigurationDetail.html">ConfigurationDetail</a> structure that is
395449
* part of the response to <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetIdentitySource.html">GetIdentitySource</a>.</p>
396450
* <p>Example:<code>"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
397-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}</code>
451+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}</code>
398452
* </p>
399453
* @public
400454
*/
@@ -427,6 +481,13 @@ export interface CognitoUserPoolConfigurationDetail {
427481
* @public
428482
*/
429483
issuer: string | undefined;
484+
485+
/**
486+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
487+
* pool identity source.</p>
488+
* @public
489+
*/
490+
groupConfiguration?: CognitoGroupConfigurationDetail;
430491
}
431492

432493
/**
@@ -435,7 +496,7 @@ export interface CognitoUserPoolConfigurationDetail {
435496
* <p>This data type is used as a field that is part of the <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ConfigurationItem.html">ConfigurationItem</a> structure that is
436497
* part of the response to <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListIdentitySources.html">ListIdentitySources</a>.</p>
437498
* <p>Example:<code>"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
438-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}</code>
499+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}</code>
439500
* </p>
440501
* @public
441502
*/
@@ -468,14 +529,21 @@ export interface CognitoUserPoolConfigurationItem {
468529
* @public
469530
*/
470531
issuer: string | undefined;
532+
533+
/**
534+
* <p>The type of entity that a policy store maps to groups from an Amazon Cognito user
535+
* pool identity source.</p>
536+
* @public
537+
*/
538+
groupConfiguration?: CognitoGroupConfigurationItem;
471539
}
472540

473541
/**
474542
* <p>Contains configuration information used when creating a new identity source.</p>
475543
* <note>
476544
* <p>At this time, the only valid member of this structure is a Amazon Cognito user pool
477545
* configuration.</p>
478-
* <p>You must specify a <code>userPoolArn</code>, and optionally, a
546+
* <p>Specifies a <code>userPoolArn</code>, a <code>groupConfiguration</code>, and a
479547
* <code>ClientId</code>.</p>
480548
* </note>
481549
* <p>This data type is used as a request parameter for the <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreateIdentitySource.html">CreateIdentitySource</a>
@@ -494,7 +562,7 @@ export namespace Configuration {
494562
* and one or more application client IDs.</p>
495563
* <p>Example:
496564
* <code>"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
497-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}\}</code>
565+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}\}</code>
498566
* </p>
499567
* @public
500568
*/
@@ -539,11 +607,12 @@ export type ConfigurationDetail =
539607
export namespace ConfigurationDetail {
540608
/**
541609
* <p>Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of
542-
* authenticated identities as entities. It specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of a Amazon Cognito user pool
610+
* authenticated identities as entities. It specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of a Amazon Cognito user pool,
611+
* the policy store entity that you want to assign to user groups,
543612
* and one or more application client IDs.</p>
544613
* <p>Example:
545614
* <code>"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
546-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}\}</code>
615+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}\}</code>
547616
* </p>
548617
* @public
549618
*/
@@ -586,11 +655,12 @@ export type ConfigurationItem = ConfigurationItem.CognitoUserPoolConfigurationMe
586655
export namespace ConfigurationItem {
587656
/**
588657
* <p>Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of
589-
* authenticated identities as entities. It specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of a Amazon Cognito user pool
658+
* authenticated identities as entities. It specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of a Amazon Cognito user pool,
659+
* the policy store entity that you want to assign to user groups,
590660
* and one or more application client IDs.</p>
591661
* <p>Example:
592662
* <code>"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
593-
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}\}</code>
663+
* ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": \{"groupEntityType": "MyCorp::Group"\}\}\}</code>
594664
* </p>
595665
* @public
596666
*/
@@ -1997,6 +2067,20 @@ export interface ListIdentitySourcesOutput {
19972067
identitySources: IdentitySourceItem[] | undefined;
19982068
}
19992069

2070+
/**
2071+
* <p>The user group entities from an Amazon Cognito user pool identity
2072+
* source.</p>
2073+
* @public
2074+
*/
2075+
export interface UpdateCognitoGroupConfiguration {
2076+
/**
2077+
* <p>The name of the schema entity type that's mapped to the user pool group. Defaults
2078+
* to <code>AWS::CognitoGroup</code>.</p>
2079+
* @public
2080+
*/
2081+
groupEntityType: string | undefined;
2082+
}
2083+
20002084
/**
20012085
* <p>Contains configuration details of a Amazon Cognito user pool for use with an identity source.</p>
20022086
* @public
@@ -2014,6 +2098,13 @@ export interface UpdateCognitoUserPoolConfiguration {
20142098
* @public
20152099
*/
20162100
clientIds?: string[];
2101+
2102+
/**
2103+
* <p>The configuration of the user groups from an Amazon Cognito user pool identity
2104+
* source.</p>
2105+
* @public
2106+
*/
2107+
groupConfiguration?: UpdateCognitoGroupConfiguration;
20172108
}
20182109

20192110
/**
@@ -2188,6 +2279,12 @@ export interface IsAuthorizedWithTokenOutput {
21882279
* @public
21892280
*/
21902281
errors: EvaluationErrorItem[] | undefined;
2282+
2283+
/**
2284+
* <p>The identifier of the principal in the ID or access token.</p>
2285+
* @public
2286+
*/
2287+
principal?: EntityIdentifier;
21912288
}
21922289

21932290
/**
@@ -3305,14 +3402,15 @@ export interface BatchIsAuthorizedInputItem {
33053402
principal?: EntityIdentifier;
33063403

33073404
/**
3308-
* <p>Specifies the requested action to be authorized. For example, is the principal
3309-
* authorized to perform this action on the resource?</p>
3405+
* <p>Specifies the requested action to be authorized. For example,
3406+
* <code>PhotoFlash::ReadPhoto</code>.</p>
33103407
* @public
33113408
*/
33123409
action?: ActionIdentifier;
33133410

33143411
/**
3315-
* <p>Specifies the resource for which the authorization decision is to be made.</p>
3412+
* <p>Specifies the resource that you want an authorization decision for. For example,
3413+
* <code>PhotoFlash::Photo</code>.</p>
33163414
* @public
33173415
*/
33183416
resource?: EntityIdentifier;
@@ -3356,8 +3454,8 @@ export interface BatchIsAuthorizedOutputItem {
33563454
determiningPolicies: DeterminingPolicyItem[] | undefined;
33573455

33583456
/**
3359-
* <p>Errors that occurred while making an authorization decision, for example, a policy
3360-
* references an Entity or entity Attribute that does not exist in the slice.</p>
3457+
* <p>Errors that occurred while making an authorization decision. For example, a policy
3458+
* might reference an entity or attribute that doesn't exist in the request.</p>
33613459
* @public
33623460
*/
33633461
errors: EvaluationErrorItem[] | undefined;
@@ -3602,12 +3700,39 @@ export const EvaluationErrorItemFilterSensitiveLog = (obj: EvaluationErrorItem):
36023700
...obj,
36033701
});
36043702

3703+
/**
3704+
* @internal
3705+
*/
3706+
export const CognitoGroupConfigurationFilterSensitiveLog = (obj: CognitoGroupConfiguration): any => ({
3707+
...obj,
3708+
...(obj.groupEntityType && { groupEntityType: SENSITIVE_STRING }),
3709+
});
3710+
3711+
/**
3712+
* @internal
3713+
*/
3714+
export const CognitoGroupConfigurationDetailFilterSensitiveLog = (obj: CognitoGroupConfigurationDetail): any => ({
3715+
...obj,
3716+
...(obj.groupEntityType && { groupEntityType: SENSITIVE_STRING }),
3717+
});
3718+
3719+
/**
3720+
* @internal
3721+
*/
3722+
export const CognitoGroupConfigurationItemFilterSensitiveLog = (obj: CognitoGroupConfigurationItem): any => ({
3723+
...obj,
3724+
...(obj.groupEntityType && { groupEntityType: SENSITIVE_STRING }),
3725+
});
3726+
36053727
/**
36063728
* @internal
36073729
*/
36083730
export const CognitoUserPoolConfigurationFilterSensitiveLog = (obj: CognitoUserPoolConfiguration): any => ({
36093731
...obj,
36103732
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
3733+
...(obj.groupConfiguration && {
3734+
groupConfiguration: CognitoGroupConfigurationFilterSensitiveLog(obj.groupConfiguration),
3735+
}),
36113736
});
36123737

36133738
/**
@@ -3616,6 +3741,9 @@ export const CognitoUserPoolConfigurationFilterSensitiveLog = (obj: CognitoUserP
36163741
export const CognitoUserPoolConfigurationDetailFilterSensitiveLog = (obj: CognitoUserPoolConfigurationDetail): any => ({
36173742
...obj,
36183743
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
3744+
...(obj.groupConfiguration && {
3745+
groupConfiguration: CognitoGroupConfigurationDetailFilterSensitiveLog(obj.groupConfiguration),
3746+
}),
36193747
});
36203748

36213749
/**
@@ -3624,6 +3752,9 @@ export const CognitoUserPoolConfigurationDetailFilterSensitiveLog = (obj: Cognit
36243752
export const CognitoUserPoolConfigurationItemFilterSensitiveLog = (obj: CognitoUserPoolConfigurationItem): any => ({
36253753
...obj,
36263754
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
3755+
...(obj.groupConfiguration && {
3756+
groupConfiguration: CognitoGroupConfigurationItemFilterSensitiveLog(obj.groupConfiguration),
3757+
}),
36273758
});
36283759

36293760
/**
@@ -3871,12 +4002,23 @@ export const ListIdentitySourcesOutputFilterSensitiveLog = (obj: ListIdentitySou
38714002
}),
38724003
});
38734004

4005+
/**
4006+
* @internal
4007+
*/
4008+
export const UpdateCognitoGroupConfigurationFilterSensitiveLog = (obj: UpdateCognitoGroupConfiguration): any => ({
4009+
...obj,
4010+
...(obj.groupEntityType && { groupEntityType: SENSITIVE_STRING }),
4011+
});
4012+
38744013
/**
38754014
* @internal
38764015
*/
38774016
export const UpdateCognitoUserPoolConfigurationFilterSensitiveLog = (obj: UpdateCognitoUserPoolConfiguration): any => ({
38784017
...obj,
38794018
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
4019+
...(obj.groupConfiguration && {
4020+
groupConfiguration: UpdateCognitoGroupConfigurationFilterSensitiveLog(obj.groupConfiguration),
4021+
}),
38804022
});
38814023

38824024
/**
@@ -3917,6 +4059,7 @@ export const IsAuthorizedOutputFilterSensitiveLog = (obj: IsAuthorizedOutput): a
39174059
export const IsAuthorizedWithTokenOutputFilterSensitiveLog = (obj: IsAuthorizedWithTokenOutput): any => ({
39184060
...obj,
39194061
...(obj.errors && { errors: SENSITIVE_STRING }),
4062+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
39204063
});
39214064

39224065
/**

0 commit comments

Comments
 (0)