# CfnIdentitySourceProps

Struct · External

Properties for defining a `CfnIdentitySource`.

Used as props by: [CfnIdentitySource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnIdentitySource.html)

- Source: Generated at build time
- Type last changed: v2.127.0 · 10 Feb 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_verifiedpermissions as verifiedpermissions } from 'aws-cdk-lib';
const cfnIdentitySourceProps: verifiedpermissions.CfnIdentitySourceProps = {
  configuration: {
    cognitoUserPoolConfiguration: {
      userPoolArn: 'userPoolArn',

      // the properties below are optional
      clientIds: ['clientIds'],
      groupConfiguration: {
        groupEntityType: 'groupEntityType',
      },
    },
    openIdConnectConfiguration: {
      issuer: 'issuer',
      tokenSelection: {
        accessTokenOnly: {
          audiences: ['audiences'],
          principalIdClaim: 'principalIdClaim',
        },
        identityTokenOnly: {
          clientIds: ['clientIds'],
          principalIdClaim: 'principalIdClaim',
        },
      },

      // the properties below are optional
      entityIdPrefix: 'entityIdPrefix',
      groupConfiguration: {
        groupClaim: 'groupClaim',
        groupEntityType: 'groupEntityType',
      },
    },
  },
  policyStoreId: 'policyStoreId',

  // the properties below are optional
  principalEntityType: 'principalEntityType',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_verifiedpermissions as verifiedpermissions

cfn_identity_source_props = verifiedpermissions.CfnIdentitySourceProps(
    configuration=verifiedpermissions.CfnIdentitySource.IdentitySourceConfigurationProperty(
        cognito_user_pool_configuration=verifiedpermissions.CfnIdentitySource.CognitoUserPoolConfigurationProperty(
            user_pool_arn="userPoolArn",

            # the properties below are optional
            client_ids=["clientIds"],
            group_configuration=verifiedpermissions.CfnIdentitySource.CognitoGroupConfigurationProperty(
                group_entity_type="groupEntityType"
            )
        ),
        open_id_connect_configuration=verifiedpermissions.CfnIdentitySource.OpenIdConnectConfigurationProperty(
            issuer="issuer",
            token_selection=verifiedpermissions.CfnIdentitySource.OpenIdConnectTokenSelectionProperty(
                access_token_only=verifiedpermissions.CfnIdentitySource.OpenIdConnectAccessTokenConfigurationProperty(
                    audiences=["audiences"],
                    principal_id_claim="principalIdClaim"
                ),
                identity_token_only=verifiedpermissions.CfnIdentitySource.OpenIdConnectIdentityTokenConfigurationProperty(
                    client_ids=["clientIds"],
                    principal_id_claim="principalIdClaim"
                )
            ),

            # the properties below are optional
            entity_id_prefix="entityIdPrefix",
            group_configuration=verifiedpermissions.CfnIdentitySource.OpenIdConnectGroupConfigurationProperty(
                group_claim="groupClaim",
                group_entity_type="groupEntityType"
            )
        )
    ),
    policy_store_id="policyStoreId",

    # the properties below are optional
    principal_entity_type="principalEntityType"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.verifiedpermissions.*;

CfnIdentitySourceProps cfnIdentitySourceProps = CfnIdentitySourceProps.builder()
        .configuration(IdentitySourceConfigurationProperty.builder()
                .cognitoUserPoolConfiguration(CognitoUserPoolConfigurationProperty.builder()
                        .userPoolArn("userPoolArn")

                        // the properties below are optional
                        .clientIds(List.of("clientIds"))
                        .groupConfiguration(CognitoGroupConfigurationProperty.builder()
                                .groupEntityType("groupEntityType")
                                .build())
                        .build())
                .openIdConnectConfiguration(OpenIdConnectConfigurationProperty.builder()
                        .issuer("issuer")
                        .tokenSelection(OpenIdConnectTokenSelectionProperty.builder()
                                .accessTokenOnly(OpenIdConnectAccessTokenConfigurationProperty.builder()
                                        .audiences(List.of("audiences"))
                                        .principalIdClaim("principalIdClaim")
                                        .build())
                                .identityTokenOnly(OpenIdConnectIdentityTokenConfigurationProperty.builder()
                                        .clientIds(List.of("clientIds"))
                                        .principalIdClaim("principalIdClaim")
                                        .build())
                                .build())

                        // the properties below are optional
                        .entityIdPrefix("entityIdPrefix")
                        .groupConfiguration(OpenIdConnectGroupConfigurationProperty.builder()
                                .groupClaim("groupClaim")
                                .groupEntityType("groupEntityType")
                                .build())
                        .build())
                .build())
        .policyStoreId("policyStoreId")

        // the properties below are optional
        .principalEntityType("principalEntityType")
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VerifiedPermissions;

var cfnIdentitySourceProps = new CfnIdentitySourceProps {
    Configuration = new IdentitySourceConfigurationProperty {
        CognitoUserPoolConfiguration = new CognitoUserPoolConfigurationProperty {
            UserPoolArn = "userPoolArn",

            // the properties below are optional
            ClientIds = new [] { "clientIds" },
            GroupConfiguration = new CognitoGroupConfigurationProperty {
                GroupEntityType = "groupEntityType"
            }
        },
        OpenIdConnectConfiguration = new OpenIdConnectConfigurationProperty {
            Issuer = "issuer",
            TokenSelection = new OpenIdConnectTokenSelectionProperty {
                AccessTokenOnly = new OpenIdConnectAccessTokenConfigurationProperty {
                    Audiences = new [] { "audiences" },
                    PrincipalIdClaim = "principalIdClaim"
                },
                IdentityTokenOnly = new OpenIdConnectIdentityTokenConfigurationProperty {
                    ClientIds = new [] { "clientIds" },
                    PrincipalIdClaim = "principalIdClaim"
                }
            },

            // the properties below are optional
            EntityIdPrefix = "entityIdPrefix",
            GroupConfiguration = new OpenIdConnectGroupConfigurationProperty {
                GroupClaim = "groupClaim",
                GroupEntityType = "groupEntityType"
            }
        }
    },
    PolicyStoreId = "policyStoreId",

    // the properties below are optional
    PrincipalEntityType = "principalEntityType"
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnIdentitySourceProps := &CfnIdentitySourceProps{
	Configuration: &IdentitySourceConfigurationProperty{
		CognitoUserPoolConfiguration: &CognitoUserPoolConfigurationProperty{
			UserPoolArn: jsii.String("userPoolArn"),

			// the properties below are optional
			ClientIds: []*string{
				jsii.String("clientIds"),
			},
			GroupConfiguration: &CognitoGroupConfigurationProperty{
				GroupEntityType: jsii.String("groupEntityType"),
			},
		},
		OpenIdConnectConfiguration: &OpenIdConnectConfigurationProperty{
			Issuer: jsii.String("issuer"),
			TokenSelection: &OpenIdConnectTokenSelectionProperty{
				AccessTokenOnly: &OpenIdConnectAccessTokenConfigurationProperty{
					Audiences: []*string{
						jsii.String("audiences"),
					},
					PrincipalIdClaim: jsii.String("principalIdClaim"),
				},
				IdentityTokenOnly: &OpenIdConnectIdentityTokenConfigurationProperty{
					ClientIds: []*string{
						jsii.String("clientIds"),
					},
					PrincipalIdClaim: jsii.String("principalIdClaim"),
				},
			},

			// the properties below are optional
			EntityIdPrefix: jsii.String("entityIdPrefix"),
			GroupConfiguration: &OpenIdConnectGroupConfigurationProperty{
				GroupClaim: jsii.String("groupClaim"),
				GroupEntityType: jsii.String("groupEntityType"),
			},
		},
	},
	PolicyStoreId: jsii.String("policyStoreId"),

	// the properties below are optional
	PrincipalEntityType: jsii.String("principalEntityType"),
}
```

## Properties

- `configuration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIdentitySource.IdentitySourceConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnIdentitySource.IdentitySourceConfigurationProperty.html) (required) — Contains configuration information used when creating a new identity source.

- `policyStoreId`: string (required) — Specifies the ID of the policy store in which you want to store this identity source.

  Only policies and requests made using this policy store can reference identities from the identity provider configured in the new identity source.

- `principalEntityType`: string — Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.
