Skip to content
GitHubXDiscord

IdentitySource

The IdentitySource resource allows you to manage AWS VerifiedPermissions IdentitySources that provide identity information for authorization decisions.

Create a basic IdentitySource with required properties and one optional property.

import AWS from "alchemy/aws/control";
const basicIdentitySource = await AWS.VerifiedPermissions.IdentitySource("basicIdentitySource", {
PrincipalEntityType: "USER",
Configuration: {
// Configuration details here
},
PolicyStoreId: "examplePolicyStoreId"
});

Configure an IdentitySource with additional options like adopting an existing resource.

const advancedIdentitySource = await AWS.VerifiedPermissions.IdentitySource("advancedIdentitySource", {
PrincipalEntityType: "GROUP",
Configuration: {
// Configuration details here
},
PolicyStoreId: "examplePolicyStoreId",
adopt: true // Adopt existing resource if it already exists
});

Demonstrate a specific configuration for an IdentitySource.

const customIdentitySource = await AWS.VerifiedPermissions.IdentitySource("customIdentitySource", {
PrincipalEntityType: "USER",
Configuration: {
// Example configuration for the IdentitySource
userAttributes: {
email: "user@example.com",
roles: ["admin", "editor"]
}
},
PolicyStoreId: "customPolicyStoreId"
});