SDK for PHP 3.x

Client: Aws\VerifiedPermissions\VerifiedPermissionsClient
Service ID: verifiedpermissions
Version: 2021-12-01

This page describes the parameters and results for the operations of the Amazon Verified Permissions (2021-12-01), and shows how to use the Aws\VerifiedPermissions\VerifiedPermissionsClient object to call the described operations. This documentation is specific to the 2021-12-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

BatchIsAuthorized ( array $params = [] )
Makes a series of decisions about multiple authorization requests for one principal or resource.
BatchIsAuthorizedWithToken ( array $params = [] )
Makes a series of decisions about multiple authorization requests for one token.
CreateIdentitySource ( array $params = [] )
Adds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) identity provider (IdP).
CreatePolicy ( array $params = [] )
Creates a Cedar policy and saves it in the specified policy store.
CreatePolicyStore ( array $params = [] )
Creates a policy store.
CreatePolicyTemplate ( array $params = [] )
Creates a policy template.
DeleteIdentitySource ( array $params = [] )
Deletes an identity source that references an identity provider (IdP) such as Amazon Cognito.
DeletePolicy ( array $params = [] )
Deletes the specified policy from the policy store.
DeletePolicyStore ( array $params = [] )
Deletes the specified policy store.
DeletePolicyTemplate ( array $params = [] )
Deletes the specified policy template from the policy store.
GetIdentitySource ( array $params = [] )
Retrieves the details about the specified identity source.
GetPolicy ( array $params = [] )
Retrieves information about the specified policy.
GetPolicyStore ( array $params = [] )
Retrieves details about a policy store.
GetPolicyTemplate ( array $params = [] )
Retrieve the details for the specified policy template in the specified policy store.
GetSchema ( array $params = [] )
Retrieve the details for the specified schema in the specified policy store.
IsAuthorized ( array $params = [] )
Makes an authorization decision about a service request described in the parameters.
IsAuthorizedWithToken ( array $params = [] )
Makes an authorization decision about a service request described in the parameters.
ListIdentitySources ( array $params = [] )
Returns a paginated list of all of the identity sources defined in the specified policy store.
ListPolicies ( array $params = [] )
Returns a paginated list of all policies stored in the specified policy store.
ListPolicyStores ( array $params = [] )
Returns a paginated list of all policy stores in the calling Amazon Web Services account.
ListPolicyTemplates ( array $params = [] )
Returns a paginated list of all policy templates in the specified policy store.
PutSchema ( array $params = [] )
Creates or updates the policy schema in the specified policy store.
UpdateIdentitySource ( array $params = [] )
Updates the specified identity source to use a new identity provider (IdP), or to change the mapping of identities from the IdP to a different principal entity type.
UpdatePolicy ( array $params = [] )
Modifies a Cedar static policy in the specified policy store.
UpdatePolicyStore ( array $params = [] )
Modifies the validation setting for a policy store.
UpdatePolicyTemplate ( array $params = [] )
Updates the specified policy template.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListIdentitySources
ListPolicies
ListPolicyStores
ListPolicyTemplates

Operations

BatchIsAuthorized

$result = $client->batchIsAuthorized([/* ... */]);
$promise = $client->batchIsAuthorizedAsync([/* ... */]);

Makes a series of decisions about multiple authorization requests for one principal or resource. Each request contains the equivalent content of an IsAuthorized request: principal, action, resource, and context. Either the principal or the resource parameter must be identical across all requests. For example, Verified Permissions won't evaluate a pair of requests where bob views photo1 and alice views photo2. Authorization of bob to view photo1 and photo2, or bob and alice to view photo1, are valid batches.

The request is evaluated against all policies in the specified policy store that match the entities that you declare. The result of the decisions is a series of Allow or Deny responses, along with the IDs of the policies that produced each decision.

The entities of a BatchIsAuthorized API request can contain up to 100 principals and up to 100 resources. The requests of a BatchIsAuthorized API request can contain up to 30 requests.

The BatchIsAuthorized operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission verifiedpermissions:IsAuthorized in their IAM policies.

Parameter Syntax

$result = $client->batchIsAuthorized([
    'entities' => [
        'entityList' => [
            [
                'attributes' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
                'identifier' => [ // REQUIRED
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'parents' => [
                    [
                        'entityId' => '<string>', // REQUIRED
                        'entityType' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'policyStoreId' => '<string>', // REQUIRED
    'requests' => [ // REQUIRED
        [
            'action' => [
                'actionId' => '<string>', // REQUIRED
                'actionType' => '<string>', // REQUIRED
            ],
            'context' => [
                'contextMap' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
            ],
            'principal' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
            'resource' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
entities
Type: EntitiesDefinition structure

Specifies the list of resources and principals and their associated attributes that Verified Permissions can examine when evaluating the policies.

You can include only principal and resource entities in this parameter; you can't include actions. You must specify actions in the schema.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store. Policies in this policy store will be used to make the authorization decisions for the input.

requests
Required: Yes
Type: Array of BatchIsAuthorizedInputItem structures

An array of up to 30 requests that you want Verified Permissions to evaluate.

Result Syntax

[
    'results' => [
        [
            'decision' => 'ALLOW|DENY',
            'determiningPolicies' => [
                [
                    'policyId' => '<string>',
                ],
                // ...
            ],
            'errors' => [
                [
                    'errorDescription' => '<string>',
                ],
                // ...
            ],
            'request' => [
                'action' => [
                    'actionId' => '<string>',
                    'actionType' => '<string>',
                ],
                'context' => [
                    'contextMap' => [
                        '<String>' => [
                            'boolean' => true || false,
                            'entityIdentifier' => [
                                'entityId' => '<string>',
                                'entityType' => '<string>',
                            ],
                            'long' => <integer>,
                            'record' => [
                                '<String>' => [...], // RECURSIVE
                                // ...
                            ],
                            'set' => [
                                [...], // RECURSIVE
                                // ...
                            ],
                            'string' => '<string>',
                        ],
                        // ...
                    ],
                ],
                'principal' => [
                    'entityId' => '<string>',
                    'entityType' => '<string>',
                ],
                'resource' => [
                    'entityId' => '<string>',
                    'entityType' => '<string>',
                ],
            ],
        ],
        // ...
    ],
]

Result Details

Members
results
Required: Yes
Type: Array of BatchIsAuthorizedOutputItem structures

A series of Allow or Deny decisions for each request, and the policies that produced them.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

BatchIsAuthorizedWithToken

$result = $client->batchIsAuthorizedWithToken([/* ... */]);
$promise = $client->batchIsAuthorizedWithTokenAsync([/* ... */]);

Makes a series of decisions about multiple authorization requests for one token. The principal in this request comes from an external identity source in the form of an identity or access token, formatted as a JSON web token (JWT). The information in the parameters can also define additional context that Verified Permissions can include in the evaluations.

The request is evaluated against all policies in the specified policy store that match the entities that you provide in the entities declaration and in the token. The result of the decisions is a series of Allow or Deny responses, along with the IDs of the policies that produced each decision.

The entities of a BatchIsAuthorizedWithToken API request can contain up to 100 resources and up to 99 user groups. The requests of a BatchIsAuthorizedWithToken API request can contain up to 30 requests.

The BatchIsAuthorizedWithToken operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission verifiedpermissions:IsAuthorizedWithToken in their IAM policies.

Parameter Syntax

$result = $client->batchIsAuthorizedWithToken([
    'accessToken' => '<string>',
    'entities' => [
        'entityList' => [
            [
                'attributes' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
                'identifier' => [ // REQUIRED
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'parents' => [
                    [
                        'entityId' => '<string>', // REQUIRED
                        'entityType' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'identityToken' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
    'requests' => [ // REQUIRED
        [
            'action' => [
                'actionId' => '<string>', // REQUIRED
                'actionType' => '<string>', // REQUIRED
            ],
            'context' => [
                'contextMap' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
            ],
            'resource' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
accessToken
Type: string

Specifies an access token for the principal that you want to authorize in each request. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both.

Must be an access token. Verified Permissions returns an error if the token_use claim in the submitted token isn't access.

entities
Type: EntitiesDefinition structure

Specifies the list of resources and their associated attributes that Verified Permissions can examine when evaluating the policies.

You can't include principals in this parameter, only resource and action entities. This parameter can't include any entities of a type that matches the user or group entity types that you defined in your identity source.

  • The BatchIsAuthorizedWithToken operation takes principal attributes from only the identityToken or accessToken passed to the operation.

  • For action entities, you can include only their Identifier and EntityType.

identityToken
Type: string

Specifies an identity (ID) token for the principal that you want to authorize in each request. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both.

Must be an ID token. Verified Permissions returns an error if the token_use claim in the submitted token isn't id.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

requests
Required: Yes
Type: Array of BatchIsAuthorizedWithTokenInputItem structures

An array of up to 30 requests that you want Verified Permissions to evaluate.

Result Syntax

[
    'principal' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
    'results' => [
        [
            'decision' => 'ALLOW|DENY',
            'determiningPolicies' => [
                [
                    'policyId' => '<string>',
                ],
                // ...
            ],
            'errors' => [
                [
                    'errorDescription' => '<string>',
                ],
                // ...
            ],
            'request' => [
                'action' => [
                    'actionId' => '<string>',
                    'actionType' => '<string>',
                ],
                'context' => [
                    'contextMap' => [
                        '<String>' => [
                            'boolean' => true || false,
                            'entityIdentifier' => [
                                'entityId' => '<string>',
                                'entityType' => '<string>',
                            ],
                            'long' => <integer>,
                            'record' => [
                                '<String>' => [...], // RECURSIVE
                                // ...
                            ],
                            'set' => [
                                [...], // RECURSIVE
                                // ...
                            ],
                            'string' => '<string>',
                        ],
                        // ...
                    ],
                ],
                'resource' => [
                    'entityId' => '<string>',
                    'entityType' => '<string>',
                ],
            ],
        ],
        // ...
    ],
]

Result Details

Members
principal
Type: EntityIdentifier structure

The identifier of the principal in the ID or access token.

results
Required: Yes
Type: Array of BatchIsAuthorizedWithTokenOutputItem structures

A series of Allow or Deny decisions for each request, and the policies that produced them.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

CreateIdentitySource

$result = $client->createIdentitySource([/* ... */]);
$promise = $client->createIdentitySourceAsync([/* ... */]);

Adds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) identity provider (IdP).

After you create an identity source, you can use the identities provided by the IdP as proxies for the principal in authorization queries that use the IsAuthorizedWithToken or BatchIsAuthorizedWithToken API operations. These identities take the form of tokens that contain claims about the user, such as IDs, attributes and group memberships. Identity sources provide identity (ID) tokens and access tokens. Verified Permissions derives information about your user and session from token claims. Access tokens provide action context to your policies, and ID tokens provide principal Attributes.

Tokens from an identity source user continue to be usable until they expire. Token revocation and resource deletion have no effect on the validity of a token in your policy store

To reference a user from this identity source in your Cedar policies, refer to the following syntax examples.

  • Amazon Cognito user pool: Namespace::[Entity type]::[User pool ID]|[user principal attribute], for example MyCorp::User::us-east-1_EXAMPLE|a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.

  • OpenID Connect (OIDC) provider: Namespace::[Entity type]::[principalIdClaim]|[user principal attribute], for example MyCorp::User::MyOIDCProvider|a1b2c3d4-5678-90ab-cdef-EXAMPLE22222.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->createIdentitySource([
    'clientToken' => '<string>',
    'configuration' => [ // REQUIRED
        'cognitoUserPoolConfiguration' => [
            'clientIds' => ['<string>', ...],
            'groupConfiguration' => [
                'groupEntityType' => '<string>', // REQUIRED
            ],
            'userPoolArn' => '<string>', // REQUIRED
        ],
        'openIdConnectConfiguration' => [
            'entityIdPrefix' => '<string>',
            'groupConfiguration' => [
                'groupClaim' => '<string>', // REQUIRED
                'groupEntityType' => '<string>', // REQUIRED
            ],
            'issuer' => '<string>', // REQUIRED
            'tokenSelection' => [ // REQUIRED
                'accessTokenOnly' => [
                    'audiences' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
                'identityTokenOnly' => [
                    'clientIds' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
            ],
        ],
    ],
    'policyStoreId' => '<string>', // REQUIRED
    'principalEntityType' => '<string>',
]);

Parameter Details

Members
clientToken
Type: string

Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

If you don't provide this value, then Amazon Web Services generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an ConflictException error.

Verified Permissions recognizes a ClientToken for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value of ClientToken.

configuration
Required: Yes
Type: Configuration structure

Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.

policyStoreId
Required: Yes
Type: string

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
Type: string

Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.

Result Syntax

[
    'createdDate' => <DateTime>,
    'identitySourceId' => '<string>',
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the identity source was originally created.

identitySourceId
Required: Yes
Type: string

The unique ID of the new identity source.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the identity source was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the identity source.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

CreatePolicy

$result = $client->createPolicy([/* ... */]);
$promise = $client->createPolicyAsync([/* ... */]);

Creates a Cedar policy and saves it in the specified policy store. You can create either a static policy or a policy linked to a policy template.

  • To create a static policy, provide the Cedar policy text in the StaticPolicy section of the PolicyDefinition.

  • To create a policy that is dynamically linked to a policy template, specify the policy template ID and the principal and resource to associate with this policy in the templateLinked section of the PolicyDefinition. If the policy template is ever updated, any policies linked to the policy template automatically use the updated template.

Creating a policy causes it to be validated against the schema in the policy store. If the policy doesn't pass validation, the operation fails and the policy isn't stored.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->createPolicy([
    'clientToken' => '<string>',
    'definition' => [ // REQUIRED
        'static' => [
            'description' => '<string>',
            'statement' => '<string>', // REQUIRED
        ],
        'templateLinked' => [
            'policyTemplateId' => '<string>', // REQUIRED
            'principal' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
            'resource' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
        ],
    ],
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

If you don't provide this value, then Amazon Web Services generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an ConflictException error.

Verified Permissions recognizes a ClientToken for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value of ClientToken.

definition
Required: Yes
Type: PolicyDefinition structure

A structure that specifies the policy type and content to use for the new policy. You must include either a static or a templateLinked element. The policy content must be written in the Cedar policy language.

policyStoreId
Required: Yes
Type: string

Specifies the PolicyStoreId of the policy store you want to store the policy in.

Result Syntax

[
    'actions' => [
        [
            'actionId' => '<string>',
            'actionType' => '<string>',
        ],
        // ...
    ],
    'createdDate' => <DateTime>,
    'effect' => 'Permit|Forbid',
    'lastUpdatedDate' => <DateTime>,
    'policyId' => '<string>',
    'policyStoreId' => '<string>',
    'policyType' => 'STATIC|TEMPLATE_LINKED',
    'principal' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
    'resource' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
]

Result Details

Members
actions
Type: Array of ActionIdentifier structures

The action that a policy permits or forbids. For example, {"actions": [{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}]}.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy was originally created.

effect
Type: string

The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy was last updated.

policyId
Required: Yes
Type: string

The unique ID of the new policy.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the new policy.

policyType
Required: Yes
Type: string

The policy type of the new policy.

principal
Type: EntityIdentifier structure

The principal specified in the new policy's scope. This response element isn't present when principal isn't specified in the policy content.

resource
Type: EntityIdentifier structure

The resource specified in the new policy's scope. This response element isn't present when the resource isn't specified in the policy content.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

CreatePolicyStore

$result = $client->createPolicyStore([/* ... */]);
$promise = $client->createPolicyStoreAsync([/* ... */]);

Creates a policy store. A policy store is a container for policy resources.

Although Cedar supports multiple namespaces, Verified Permissions currently supports only one namespace per policy store.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->createPolicyStore([
    'clientToken' => '<string>',
    'description' => '<string>',
    'validationSettings' => [ // REQUIRED
        'mode' => 'OFF|STRICT', // REQUIRED
    ],
]);

Parameter Details

Members
clientToken
Type: string

Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

If you don't provide this value, then Amazon Web Services generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an ConflictException error.

Verified Permissions recognizes a ClientToken for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value of ClientToken.

description
Type: string

Descriptive text that you can provide to help with identification of the current policy store.

validationSettings
Required: Yes
Type: ValidationSettings structure

Specifies the validation setting for this policy store.

Currently, the only valid and required value is Mode.

We recommend that you turn on STRICT mode only after you define a schema. If a schema doesn't exist, then STRICT mode causes any policy to fail validation, and Verified Permissions rejects the policy. You can turn off validation by using the UpdatePolicyStore. Then, when you have a schema defined, use UpdatePolicyStore again to turn validation back on.

Result Syntax

[
    'arn' => '<string>',
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the new policy store.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy store was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy store was last updated.

policyStoreId
Required: Yes
Type: string

The unique ID of the new policy store.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

CreatePolicyTemplate

$result = $client->createPolicyTemplate([/* ... */]);
$promise = $client->createPolicyTemplateAsync([/* ... */]);

Creates a policy template. A template can use placeholders for the principal and resource. A template must be instantiated into a policy by associating it with specific principals and resources to use for the placeholders. That instantiated policy can then be considered in authorization decisions. The instantiated policy works identically to any other policy, except that it is dynamically linked to the template. If the template changes, then any policies that are linked to that template are immediately updated as well.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->createPolicyTemplate([
    'clientToken' => '<string>',
    'description' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
    'statement' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

If you don't provide this value, then Amazon Web Services generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an ConflictException error.

Verified Permissions recognizes a ClientToken for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value of ClientToken.

description
Type: string

Specifies a description for the policy template.

policyStoreId
Required: Yes
Type: string

The ID of the policy store in which to create the policy template.

statement
Required: Yes
Type: string

Specifies the content that you want to use for the new policy template, written in the Cedar policy language.

Result Syntax

[
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
    'policyTemplateId' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy template was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy template was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the policy template.

policyTemplateId
Required: Yes
Type: string

The unique ID of the new policy template.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

DeleteIdentitySource

$result = $client->deleteIdentitySource([/* ... */]);
$promise = $client->deleteIdentitySourceAsync([/* ... */]);

Deletes an identity source that references an identity provider (IdP) such as Amazon Cognito. After you delete the identity source, you can no longer use tokens for identities from that identity source to represent principals in authorization queries made using IsAuthorizedWithToken. operations.

Parameter Syntax

$result = $client->deleteIdentitySource([
    'identitySourceId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
identitySourceId
Required: Yes
Type: string

Specifies the ID of the identity source that you want to delete.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the identity source that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

DeletePolicy

$result = $client->deletePolicy([/* ... */]);
$promise = $client->deletePolicyAsync([/* ... */]);

Deletes the specified policy from the policy store.

This operation is idempotent; if you specify a policy that doesn't exist, the request response returns a successful HTTP 200 status code.

Parameter Syntax

$result = $client->deletePolicy([
    'policyId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyId
Required: Yes
Type: string

Specifies the ID of the policy that you want to delete.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

DeletePolicyStore

$result = $client->deletePolicyStore([/* ... */]);
$promise = $client->deletePolicyStoreAsync([/* ... */]);

Deletes the specified policy store.

This operation is idempotent. If you specify a policy store that does not exist, the request response will still return a successful HTTP 200 status code.

Parameter Syntax

$result = $client->deletePolicyStore([
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

DeletePolicyTemplate

$result = $client->deletePolicyTemplate([/* ... */]);
$promise = $client->deletePolicyTemplateAsync([/* ... */]);

Deletes the specified policy template from the policy store.

This operation also deletes any policies that were created from the specified policy template. Those policies are immediately removed from all future API responses, and are asynchronously deleted from the policy store.

Parameter Syntax

$result = $client->deletePolicyTemplate([
    'policyStoreId' => '<string>', // REQUIRED
    'policyTemplateId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy template that you want to delete.

policyTemplateId
Required: Yes
Type: string

Specifies the ID of the policy template that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

GetIdentitySource

$result = $client->getIdentitySource([/* ... */]);
$promise = $client->getIdentitySourceAsync([/* ... */]);

Retrieves the details about the specified identity source.

Parameter Syntax

$result = $client->getIdentitySource([
    'identitySourceId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
identitySourceId
Required: Yes
Type: string

Specifies the ID of the identity source you want information about.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the identity source you want information about.

Result Syntax

[
    'configuration' => [
        'cognitoUserPoolConfiguration' => [
            'clientIds' => ['<string>', ...],
            'groupConfiguration' => [
                'groupEntityType' => '<string>',
            ],
            'issuer' => '<string>',
            'userPoolArn' => '<string>',
        ],
        'openIdConnectConfiguration' => [
            'entityIdPrefix' => '<string>',
            'groupConfiguration' => [
                'groupClaim' => '<string>',
                'groupEntityType' => '<string>',
            ],
            'issuer' => '<string>',
            'tokenSelection' => [
                'accessTokenOnly' => [
                    'audiences' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
                'identityTokenOnly' => [
                    'clientIds' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
            ],
        ],
    ],
    'createdDate' => <DateTime>,
    'details' => [
        'clientIds' => ['<string>', ...],
        'discoveryUrl' => '<string>',
        'openIdIssuer' => 'COGNITO',
        'userPoolArn' => '<string>',
    ],
    'identitySourceId' => '<string>',
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
    'principalEntityType' => '<string>',
]

Result Details

Members
configuration
Type: ConfigurationDetail structure

Contains configuration information about an identity source.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the identity source was originally created.

details
Type: IdentitySourceDetails structure

A structure that describes the configuration of the identity source.

identitySourceId
Required: Yes
Type: string

The ID of the identity source.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the identity source was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the identity source.

principalEntityType
Required: Yes
Type: string

The data type of principals generated for identities authenticated by this identity source.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

GetPolicy

$result = $client->getPolicy([/* ... */]);
$promise = $client->getPolicyAsync([/* ... */]);

Retrieves information about the specified policy.

Parameter Syntax

$result = $client->getPolicy([
    'policyId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyId
Required: Yes
Type: string

Specifies the ID of the policy you want information about.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy that you want information about.

Result Syntax

[
    'actions' => [
        [
            'actionId' => '<string>',
            'actionType' => '<string>',
        ],
        // ...
    ],
    'createdDate' => <DateTime>,
    'definition' => [
        'static' => [
            'description' => '<string>',
            'statement' => '<string>',
        ],
        'templateLinked' => [
            'policyTemplateId' => '<string>',
            'principal' => [
                'entityId' => '<string>',
                'entityType' => '<string>',
            ],
            'resource' => [
                'entityId' => '<string>',
                'entityType' => '<string>',
            ],
        ],
    ],
    'effect' => 'Permit|Forbid',
    'lastUpdatedDate' => <DateTime>,
    'policyId' => '<string>',
    'policyStoreId' => '<string>',
    'policyType' => 'STATIC|TEMPLATE_LINKED',
    'principal' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
    'resource' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
]

Result Details

Members
actions
Type: Array of ActionIdentifier structures

The action that a policy permits or forbids. For example, {"actions": [{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}]}.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy was originally created.

definition
Required: Yes
Type: PolicyDefinitionDetail structure

The definition of the requested policy.

effect
Type: string

The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy was last updated.

policyId
Required: Yes
Type: string

The unique ID of the policy that you want information about.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the policy that you want information about.

policyType
Required: Yes
Type: string

The type of the policy.

principal
Type: EntityIdentifier structure

The principal specified in the policy's scope. This element isn't included in the response when Principal isn't present in the policy content.

resource
Type: EntityIdentifier structure

The resource specified in the policy's scope. This element isn't included in the response when Resource isn't present in the policy content.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

GetPolicyStore

$result = $client->getPolicyStore([/* ... */]);
$promise = $client->getPolicyStoreAsync([/* ... */]);

Retrieves details about a policy store.

Parameter Syntax

$result = $client->getPolicyStore([
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that you want information about.

Result Syntax

[
    'arn' => '<string>',
    'createdDate' => <DateTime>,
    'description' => '<string>',
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
    'validationSettings' => [
        'mode' => 'OFF|STRICT',
    ],
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the policy store.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy store was originally created.

description
Type: string

Descriptive text that you can provide to help with identification of the current policy store.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy store was last updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store;

validationSettings
Required: Yes
Type: ValidationSettings structure

The current validation settings for the policy store.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

GetPolicyTemplate

$result = $client->getPolicyTemplate([/* ... */]);
$promise = $client->getPolicyTemplateAsync([/* ... */]);

Retrieve the details for the specified policy template in the specified policy store.

Parameter Syntax

$result = $client->getPolicyTemplate([
    'policyStoreId' => '<string>', // REQUIRED
    'policyTemplateId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy template that you want information about.

policyTemplateId
Required: Yes
Type: string

Specifies the ID of the policy template that you want information about.

Result Syntax

[
    'createdDate' => <DateTime>,
    'description' => '<string>',
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
    'policyTemplateId' => '<string>',
    'statement' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was originally created.

description
Type: string

The description of the policy template.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the policy template.

policyTemplateId
Required: Yes
Type: string

The ID of the policy template.

statement
Required: Yes
Type: string

The content of the body of the policy template written in the Cedar policy language.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

GetSchema

$result = $client->getSchema([/* ... */]);
$promise = $client->getSchemaAsync([/* ... */]);

Retrieve the details for the specified schema in the specified policy store.

Parameter Syntax

$result = $client->getSchema([
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the schema.

Result Syntax

[
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'namespaces' => ['<string>', ...],
    'policyStoreId' => '<string>',
    'schema' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the schema was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the schema was most recently updated.

namespaces
Type: Array of strings

The namespaces of the entities referenced by this schema.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the schema.

schema
Required: Yes
Type: string

The body of the schema, written in Cedar schema JSON.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

IsAuthorized

$result = $client->isAuthorized([/* ... */]);
$promise = $client->isAuthorizedAsync([/* ... */]);

Makes an authorization decision about a service request described in the parameters. The information in the parameters can also define additional context that Verified Permissions can include in the evaluation. The request is evaluated against all matching policies in the specified policy store. The result of the decision is either Allow or Deny, along with a list of the policies that resulted in the decision.

Parameter Syntax

$result = $client->isAuthorized([
    'action' => [
        'actionId' => '<string>', // REQUIRED
        'actionType' => '<string>', // REQUIRED
    ],
    'context' => [
        'contextMap' => [
            '<String>' => [
                'boolean' => true || false,
                'entityIdentifier' => [
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'long' => <integer>,
                'record' => [
                    '<String>' => [...], // RECURSIVE
                    // ...
                ],
                'set' => [
                    [...], // RECURSIVE
                    // ...
                ],
                'string' => '<string>',
            ],
            // ...
        ],
    ],
    'entities' => [
        'entityList' => [
            [
                'attributes' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
                'identifier' => [ // REQUIRED
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'parents' => [
                    [
                        'entityId' => '<string>', // REQUIRED
                        'entityType' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'policyStoreId' => '<string>', // REQUIRED
    'principal' => [
        'entityId' => '<string>', // REQUIRED
        'entityType' => '<string>', // REQUIRED
    ],
    'resource' => [
        'entityId' => '<string>', // REQUIRED
        'entityType' => '<string>', // REQUIRED
    ],
]);

Parameter Details

Members
action
Type: ActionIdentifier structure

Specifies the requested action to be authorized. For example, is the principal authorized to perform this action on the resource?

context
Type: ContextDefinition structure

Specifies additional context that can be used to make more granular authorization decisions.

entities
Type: EntitiesDefinition structure

Specifies the list of resources and principals and their associated attributes that Verified Permissions can examine when evaluating the policies.

You can include only principal and resource entities in this parameter; you can't include actions. You must specify actions in the schema.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

principal
Type: EntityIdentifier structure

Specifies the principal for which the authorization decision is to be made.

resource
Type: EntityIdentifier structure

Specifies the resource for which the authorization decision is to be made.

Result Syntax

[
    'decision' => 'ALLOW|DENY',
    'determiningPolicies' => [
        [
            'policyId' => '<string>',
        ],
        // ...
    ],
    'errors' => [
        [
            'errorDescription' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
decision
Required: Yes
Type: string

An authorization decision that indicates if the authorization request should be allowed or denied.

determiningPolicies
Required: Yes
Type: Array of DeterminingPolicyItem structures

The list of determining policies used to make the authorization decision. For example, if there are two matching policies, where one is a forbid and the other is a permit, then the forbid policy will be the determining policy. In the case of multiple matching permit policies then there would be multiple determining policies. In the case that no policies match, and hence the response is DENY, there would be no determining policies.

errors
Required: Yes
Type: Array of EvaluationErrorItem structures

Errors that occurred while making an authorization decision, for example, a policy references an Entity or entity Attribute that does not exist in the slice.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

IsAuthorizedWithToken

$result = $client->isAuthorizedWithToken([/* ... */]);
$promise = $client->isAuthorizedWithTokenAsync([/* ... */]);

Makes an authorization decision about a service request described in the parameters. The principal in this request comes from an external identity source in the form of an identity token formatted as a JSON web token (JWT). The information in the parameters can also define additional context that Verified Permissions can include in the evaluation. The request is evaluated against all matching policies in the specified policy store. The result of the decision is either Allow or Deny, along with a list of the policies that resulted in the decision.

At this time, Verified Permissions accepts tokens from only Amazon Cognito.

Verified Permissions validates each token that is specified in a request by checking its expiration date and its signature.

Tokens from an identity source user continue to be usable until they expire. Token revocation and resource deletion have no effect on the validity of a token in your policy store

Parameter Syntax

$result = $client->isAuthorizedWithToken([
    'accessToken' => '<string>',
    'action' => [
        'actionId' => '<string>', // REQUIRED
        'actionType' => '<string>', // REQUIRED
    ],
    'context' => [
        'contextMap' => [
            '<String>' => [
                'boolean' => true || false,
                'entityIdentifier' => [
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'long' => <integer>,
                'record' => [
                    '<String>' => [...], // RECURSIVE
                    // ...
                ],
                'set' => [
                    [...], // RECURSIVE
                    // ...
                ],
                'string' => '<string>',
            ],
            // ...
        ],
    ],
    'entities' => [
        'entityList' => [
            [
                'attributes' => [
                    '<String>' => [
                        'boolean' => true || false,
                        'entityIdentifier' => [
                            'entityId' => '<string>', // REQUIRED
                            'entityType' => '<string>', // REQUIRED
                        ],
                        'long' => <integer>,
                        'record' => [
                            '<String>' => [...], // RECURSIVE
                            // ...
                        ],
                        'set' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'string' => '<string>',
                    ],
                    // ...
                ],
                'identifier' => [ // REQUIRED
                    'entityId' => '<string>', // REQUIRED
                    'entityType' => '<string>', // REQUIRED
                ],
                'parents' => [
                    [
                        'entityId' => '<string>', // REQUIRED
                        'entityType' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'identityToken' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
    'resource' => [
        'entityId' => '<string>', // REQUIRED
        'entityType' => '<string>', // REQUIRED
    ],
]);

Parameter Details

Members
accessToken
Type: string

Specifies an access token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both.

Must be an access token. Verified Permissions returns an error if the token_use claim in the submitted token isn't access.

action
Type: ActionIdentifier structure

Specifies the requested action to be authorized. Is the specified principal authorized to perform this action on the specified resource.

context
Type: ContextDefinition structure

Specifies additional context that can be used to make more granular authorization decisions.

entities
Type: EntitiesDefinition structure

Specifies the list of resources and their associated attributes that Verified Permissions can examine when evaluating the policies.

You can't include principals in this parameter, only resource and action entities. This parameter can't include any entities of a type that matches the user or group entity types that you defined in your identity source.

  • The IsAuthorizedWithToken operation takes principal attributes from only the identityToken or accessToken passed to the operation.

  • For action entities, you can include only their Identifier and EntityType.

identityToken
Type: string

Specifies an identity token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both.

Must be an ID token. Verified Permissions returns an error if the token_use claim in the submitted token isn't id.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

resource
Type: EntityIdentifier structure

Specifies the resource for which the authorization decision is made. For example, is the principal allowed to perform the action on the resource?

Result Syntax

[
    'decision' => 'ALLOW|DENY',
    'determiningPolicies' => [
        [
            'policyId' => '<string>',
        ],
        // ...
    ],
    'errors' => [
        [
            'errorDescription' => '<string>',
        ],
        // ...
    ],
    'principal' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
]

Result Details

Members
decision
Required: Yes
Type: string

An authorization decision that indicates if the authorization request should be allowed or denied.

determiningPolicies
Required: Yes
Type: Array of DeterminingPolicyItem structures

The list of determining policies used to make the authorization decision. For example, if there are multiple matching policies, where at least one is a forbid policy, then because forbid always overrides permit the forbid policies are the determining policies. If all matching policies are permit policies, then those policies are the determining policies. When no policies match and the response is the default DENY, there are no determining policies.

errors
Required: Yes
Type: Array of EvaluationErrorItem structures

Errors that occurred while making an authorization decision. For example, a policy references an entity or entity attribute that does not exist in the slice.

principal
Type: EntityIdentifier structure

The identifier of the principal in the ID or access token.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

ListIdentitySources

$result = $client->listIdentitySources([/* ... */]);
$promise = $client->listIdentitySourcesAsync([/* ... */]);

Returns a paginated list of all of the identity sources defined in the specified policy store.

Parameter Syntax

$result = $client->listIdentitySources([
    'filters' => [
        [
            'principalEntityType' => '<string>',
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
filters
Type: Array of IdentitySourceFilter structures

Specifies characteristics of an identity source that you can use to limit the output to matching identity sources.

maxResults
Type: int

Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

If you do not specify this parameter, the operation defaults to 10 identity sources per response. You can specify a maximum of 50 identity sources per response.

nextToken
Type: string

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the identity sources that you want to list.

Result Syntax

[
    'identitySources' => [
        [
            'configuration' => [
                'cognitoUserPoolConfiguration' => [
                    'clientIds' => ['<string>', ...],
                    'groupConfiguration' => [
                        'groupEntityType' => '<string>',
                    ],
                    'issuer' => '<string>',
                    'userPoolArn' => '<string>',
                ],
                'openIdConnectConfiguration' => [
                    'entityIdPrefix' => '<string>',
                    'groupConfiguration' => [
                        'groupClaim' => '<string>',
                        'groupEntityType' => '<string>',
                    ],
                    'issuer' => '<string>',
                    'tokenSelection' => [
                        'accessTokenOnly' => [
                            'audiences' => ['<string>', ...],
                            'principalIdClaim' => '<string>',
                        ],
                        'identityTokenOnly' => [
                            'clientIds' => ['<string>', ...],
                            'principalIdClaim' => '<string>',
                        ],
                    ],
                ],
            ],
            'createdDate' => <DateTime>,
            'details' => [
                'clientIds' => ['<string>', ...],
                'discoveryUrl' => '<string>',
                'openIdIssuer' => 'COGNITO',
                'userPoolArn' => '<string>',
            ],
            'identitySourceId' => '<string>',
            'lastUpdatedDate' => <DateTime>,
            'policyStoreId' => '<string>',
            'principalEntityType' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
identitySources
Required: Yes
Type: Array of IdentitySourceItem structures

The list of identity sources stored in the specified policy store.

nextToken
Type: string

If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

ListPolicies

$result = $client->listPolicies([/* ... */]);
$promise = $client->listPoliciesAsync([/* ... */]);

Returns a paginated list of all policies stored in the specified policy store.

Parameter Syntax

$result = $client->listPolicies([
    'filter' => [
        'policyTemplateId' => '<string>',
        'policyType' => 'STATIC|TEMPLATE_LINKED',
        'principal' => [
            'identifier' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
            'unspecified' => true || false,
        ],
        'resource' => [
            'identifier' => [
                'entityId' => '<string>', // REQUIRED
                'entityType' => '<string>', // REQUIRED
            ],
            'unspecified' => true || false,
        ],
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
filter
Type: PolicyFilter structure

Specifies a filter that limits the response to only policies that match the specified criteria. For example, you list only the policies that reference a specified principal.

maxResults
Type: int

Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

If you do not specify this parameter, the operation defaults to 10 policies per response. You can specify a maximum of 50 policies per response.

nextToken
Type: string

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store you want to list policies from.

Result Syntax

[
    'nextToken' => '<string>',
    'policies' => [
        [
            'actions' => [
                [
                    'actionId' => '<string>',
                    'actionType' => '<string>',
                ],
                // ...
            ],
            'createdDate' => <DateTime>,
            'definition' => [
                'static' => [
                    'description' => '<string>',
                ],
                'templateLinked' => [
                    'policyTemplateId' => '<string>',
                    'principal' => [
                        'entityId' => '<string>',
                        'entityType' => '<string>',
                    ],
                    'resource' => [
                        'entityId' => '<string>',
                        'entityType' => '<string>',
                    ],
                ],
            ],
            'effect' => 'Permit|Forbid',
            'lastUpdatedDate' => <DateTime>,
            'policyId' => '<string>',
            'policyStoreId' => '<string>',
            'policyType' => 'STATIC|TEMPLATE_LINKED',
            'principal' => [
                'entityId' => '<string>',
                'entityType' => '<string>',
            ],
            'resource' => [
                'entityId' => '<string>',
                'entityType' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

policies
Required: Yes
Type: Array of PolicyItem structures

Lists all policies that are available in the specified policy store.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

ListPolicyStores

$result = $client->listPolicyStores([/* ... */]);
$promise = $client->listPolicyStoresAsync([/* ... */]);

Returns a paginated list of all policy stores in the calling Amazon Web Services account.

Parameter Syntax

$result = $client->listPolicyStores([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

If you do not specify this parameter, the operation defaults to 10 policy stores per response. You can specify a maximum of 50 policy stores per response.

nextToken
Type: string

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

Result Syntax

[
    'nextToken' => '<string>',
    'policyStores' => [
        [
            'arn' => '<string>',
            'createdDate' => <DateTime>,
            'description' => '<string>',
            'lastUpdatedDate' => <DateTime>,
            'policyStoreId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

policyStores
Required: Yes
Type: Array of PolicyStoreItem structures

The list of policy stores in the account.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

ListPolicyTemplates

$result = $client->listPolicyTemplates([/* ... */]);
$promise = $client->listPolicyTemplatesAsync([/* ... */]);

Returns a paginated list of all policy templates in the specified policy store.

Parameter Syntax

$result = $client->listPolicyTemplates([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
maxResults
Type: int

Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

If you do not specify this parameter, the operation defaults to 10 policy templates per response. You can specify a maximum of 50 policy templates per response.

nextToken
Type: string

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy templates you want to list.

Result Syntax

[
    'nextToken' => '<string>',
    'policyTemplates' => [
        [
            'createdDate' => <DateTime>,
            'description' => '<string>',
            'lastUpdatedDate' => <DateTime>,
            'policyStoreId' => '<string>',
            'policyTemplateId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

policyTemplates
Required: Yes
Type: Array of PolicyTemplateItem structures

The list of the policy templates in the specified policy store.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

PutSchema

$result = $client->putSchema([/* ... */]);
$promise = $client->putSchemaAsync([/* ... */]);

Creates or updates the policy schema in the specified policy store. The schema is used to validate any Cedar policies and policy templates submitted to the policy store. Any changes to the schema validate only policies and templates submitted after the schema change. Existing policies and templates are not re-evaluated against the changed schema. If you later update a policy, then it is evaluated against the new schema at that time.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->putSchema([
    'definition' => [ // REQUIRED
        'cedarJson' => '<string>',
    ],
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
definition
Required: Yes
Type: SchemaDefinition structure

Specifies the definition of the schema to be stored. The schema definition must be written in Cedar schema JSON.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store in which to place the schema.

Result Syntax

[
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'namespaces' => ['<string>', ...],
    'policyStoreId' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the schema was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the schema was last updated.

namespaces
Required: Yes
Type: Array of strings

Identifies the namespaces of the entities referenced by this schema.

policyStoreId
Required: Yes
Type: string

The unique ID of the policy store that contains the schema.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

UpdateIdentitySource

$result = $client->updateIdentitySource([/* ... */]);
$promise = $client->updateIdentitySourceAsync([/* ... */]);

Updates the specified identity source to use a new identity provider (IdP), or to change the mapping of identities from the IdP to a different principal entity type.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->updateIdentitySource([
    'identitySourceId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
    'principalEntityType' => '<string>',
    'updateConfiguration' => [ // REQUIRED
        'cognitoUserPoolConfiguration' => [
            'clientIds' => ['<string>', ...],
            'groupConfiguration' => [
                'groupEntityType' => '<string>', // REQUIRED
            ],
            'userPoolArn' => '<string>', // REQUIRED
        ],
        'openIdConnectConfiguration' => [
            'entityIdPrefix' => '<string>',
            'groupConfiguration' => [
                'groupClaim' => '<string>', // REQUIRED
                'groupEntityType' => '<string>', // REQUIRED
            ],
            'issuer' => '<string>', // REQUIRED
            'tokenSelection' => [ // REQUIRED
                'accessTokenOnly' => [
                    'audiences' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
                'identityTokenOnly' => [
                    'clientIds' => ['<string>', ...],
                    'principalIdClaim' => '<string>',
                ],
            ],
        ],
    ],
]);

Parameter Details

Members
identitySourceId
Required: Yes
Type: string

Specifies the ID of the identity source that you want to update.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the identity source that you want to update.

principalEntityType
Type: string

Specifies the data type of principals generated for identities authenticated by the identity source.

updateConfiguration
Required: Yes
Type: UpdateConfiguration structure

Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.

At this time, the only valid member of this structure is a Amazon Cognito user pool configuration.

You must specify a userPoolArn, and optionally, a ClientId.

Result Syntax

[
    'createdDate' => <DateTime>,
    'identitySourceId' => '<string>',
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the updated identity source was originally created.

identitySourceId
Required: Yes
Type: string

The ID of the updated identity source.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the identity source was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the updated identity source.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

UpdatePolicy

$result = $client->updatePolicy([/* ... */]);
$promise = $client->updatePolicyAsync([/* ... */]);

Modifies a Cedar static policy in the specified policy store. You can change only certain elements of the UpdatePolicyDefinition parameter. You can directly update only static policies. To change a template-linked policy, you must update the template instead, using UpdatePolicyTemplate.

  • If policy validation is enabled in the policy store, then updating a static policy causes Verified Permissions to validate the policy against the schema in the policy store. If the updated static policy doesn't pass validation, the operation fails and the update isn't stored.

  • When you edit a static policy, you can change only certain elements of a static policy:

    • The action referenced by the policy.

    • A condition clause, such as when and unless.

    You can't change these elements of a static policy:

    • Changing a policy from a static policy to a template-linked policy.

    • Changing the effect of a static policy from permit or forbid.

    • The principal referenced by a static policy.

    • The resource referenced by a static policy.

  • To update a template-linked policy, you must update the template instead.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->updatePolicy([
    'definition' => [ // REQUIRED
        'static' => [
            'description' => '<string>',
            'statement' => '<string>', // REQUIRED
        ],
    ],
    'policyId' => '<string>', // REQUIRED
    'policyStoreId' => '<string>', // REQUIRED
]);

Parameter Details

Members
definition
Required: Yes
Type: UpdatePolicyDefinition structure

Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text.

You can change only the following elements from the policy definition:

  • The action referenced by the policy.

  • Any conditional clauses, such as when or unless clauses.

You can't change the following elements:

  • Changing from static to templateLinked.

  • Changing the effect of the policy from permit or forbid.

  • The principal referenced by the policy.

  • The resource referenced by the policy.

policyId
Required: Yes
Type: string

Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy that you want to update.

Result Syntax

[
    'actions' => [
        [
            'actionId' => '<string>',
            'actionType' => '<string>',
        ],
        // ...
    ],
    'createdDate' => <DateTime>,
    'effect' => 'Permit|Forbid',
    'lastUpdatedDate' => <DateTime>,
    'policyId' => '<string>',
    'policyStoreId' => '<string>',
    'policyType' => 'STATIC|TEMPLATE_LINKED',
    'principal' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
    'resource' => [
        'entityId' => '<string>',
        'entityType' => '<string>',
    ],
]

Result Details

Members
actions
Type: Array of ActionIdentifier structures

The action that a policy permits or forbids. For example, {"actions": [{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}]}.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy was originally created.

effect
Type: string

The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy was most recently updated.

policyId
Required: Yes
Type: string

The ID of the policy that was updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the policy that was updated.

policyType
Required: Yes
Type: string

The type of the policy that was updated.

principal
Type: EntityIdentifier structure

The principal specified in the policy's scope. This element isn't included in the response when Principal isn't present in the policy content.

resource
Type: EntityIdentifier structure

The resource specified in the policy's scope. This element isn't included in the response when Resource isn't present in the policy content.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ServiceQuotaExceededException:

The request failed because it would cause a service quota to be exceeded.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

UpdatePolicyStore

$result = $client->updatePolicyStore([/* ... */]);
$promise = $client->updatePolicyStoreAsync([/* ... */]);

Modifies the validation setting for a policy store.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->updatePolicyStore([
    'description' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
    'validationSettings' => [ // REQUIRED
        'mode' => 'OFF|STRICT', // REQUIRED
    ],
]);

Parameter Details

Members
description
Type: string

Descriptive text that you can provide to help with identification of the current policy store.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that you want to update

validationSettings
Required: Yes
Type: ValidationSettings structure

A structure that defines the validation settings that want to enable for the policy store.

Result Syntax

[
    'arn' => '<string>',
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the updated policy store.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy store was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy store was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the updated policy store.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

UpdatePolicyTemplate

$result = $client->updatePolicyTemplate([/* ... */]);
$promise = $client->updatePolicyTemplateAsync([/* ... */]);

Updates the specified policy template. You can update only the description and the some elements of the policyBody.

Changes you make to the policy template content are immediately (within the constraints of eventual consistency) reflected in authorization decisions that involve all template-linked policies instantiated from this template.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

Parameter Syntax

$result = $client->updatePolicyTemplate([
    'description' => '<string>',
    'policyStoreId' => '<string>', // REQUIRED
    'policyTemplateId' => '<string>', // REQUIRED
    'statement' => '<string>', // REQUIRED
]);

Parameter Details

Members
description
Type: string

Specifies a new description to apply to the policy template.

policyStoreId
Required: Yes
Type: string

Specifies the ID of the policy store that contains the policy template that you want to update.

policyTemplateId
Required: Yes
Type: string

Specifies the ID of the policy template that you want to update.

statement
Required: Yes
Type: string

Specifies new statement content written in Cedar policy language to replace the current body of the policy template.

You can change only the following elements of the policy body:

  • The action referenced by the policy template.

  • Any conditional clauses, such as when or unless clauses.

You can't change the following elements:

  • The effect (permit or forbid) of the policy template.

  • The principal referenced by the policy template.

  • The resource referenced by the policy template.

Result Syntax

[
    'createdDate' => <DateTime>,
    'lastUpdatedDate' => <DateTime>,
    'policyStoreId' => '<string>',
    'policyTemplateId' => '<string>',
]

Result Details

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was originally created.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was most recently updated.

policyStoreId
Required: Yes
Type: string

The ID of the policy store that contains the updated policy template.

policyTemplateId
Required: Yes
Type: string

The ID of the updated policy template.

Errors

ValidationException:

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

ConflictException:

The request failed because another request to modify a resource occurred at the same.

AccessDeniedException:

You don't have sufficient access to perform this action.

ResourceNotFoundException:

The request failed because it references a resource that doesn't exist.

ThrottlingException:

The request failed because it exceeded a throttling quota.

InternalServerException:

The request failed because of an internal error. Try your request again later

Shapes

AccessDeniedException

Description

You don't have sufficient access to perform this action.

Members
message
Required: Yes
Type: string

ActionIdentifier

Description

Contains information about an action for a request for which an authorization decision is made.

This data type is used as a request parameter to the IsAuthorized, BatchIsAuthorized, and IsAuthorizedWithToken operations.

Example: { "actionId": "<action name>", "actionType": "Action" }

Members
actionId
Required: Yes
Type: string

The ID of an action.

actionType
Required: Yes
Type: string

The type of an action.

AttributeValue

Description

The value of an attribute.

Contains information about the runtime context for a request for which an authorization decision is made.

This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized, BatchIsAuthorized, and IsAuthorizedWithToken operations.

Members
boolean
Type: boolean

An attribute value of Boolean type.

Example: {"boolean": true}

entityIdentifier
Type: EntityIdentifier structure

An attribute value of type EntityIdentifier.

Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

long
Type: long (int|float)

An attribute value of Long type.

Example: {"long": 0}

record
Type: Associative array of custom strings keys (String) to AttributeValue structures

An attribute value of Record type.

Example: {"record": { "keyName": {} } }

set
Type: Array of AttributeValue structures

An attribute value of Set type.

Example: {"set": [ {} ] }

string
Type: string

An attribute value of String type.

Example: {"string": "abc"}

BatchIsAuthorizedInputItem

Description

An authorization request that you include in a BatchIsAuthorized API request.

Members
action
Type: ActionIdentifier structure

Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto.

context
Type: ContextDefinition structure

Specifies additional context that can be used to make more granular authorization decisions.

principal
Type: EntityIdentifier structure

Specifies the principal for which the authorization decision is to be made.

resource
Type: EntityIdentifier structure

Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo.

BatchIsAuthorizedOutputItem

Description

The decision, based on policy evaluation, from an individual authorization request in a BatchIsAuthorized API request.

Members
decision
Required: Yes
Type: string

An authorization decision that indicates if the authorization request should be allowed or denied.

determiningPolicies
Required: Yes
Type: Array of DeterminingPolicyItem structures

The list of determining policies used to make the authorization decision. For example, if there are two matching policies, where one is a forbid and the other is a permit, then the forbid policy will be the determining policy. In the case of multiple matching permit policies then there would be multiple determining policies. In the case that no policies match, and hence the response is DENY, there would be no determining policies.

errors
Required: Yes
Type: Array of EvaluationErrorItem structures

Errors that occurred while making an authorization decision. For example, a policy might reference an entity or attribute that doesn't exist in the request.

request
Required: Yes
Type: BatchIsAuthorizedInputItem structure

The authorization request that initiated the decision.

BatchIsAuthorizedWithTokenInputItem

Description

An authorization request that you include in a BatchIsAuthorizedWithToken API request.

Members
action
Type: ActionIdentifier structure

Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto.

context
Type: ContextDefinition structure

Specifies additional context that can be used to make more granular authorization decisions.

resource
Type: EntityIdentifier structure

Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo.

BatchIsAuthorizedWithTokenOutputItem

Description

The decision, based on policy evaluation, from an individual authorization request in a BatchIsAuthorizedWithToken API request.

Members
decision
Required: Yes
Type: string

An authorization decision that indicates if the authorization request should be allowed or denied.

determiningPolicies
Required: Yes
Type: Array of DeterminingPolicyItem structures

The list of determining policies used to make the authorization decision. For example, if there are two matching policies, where one is a forbid and the other is a permit, then the forbid policy will be the determining policy. In the case of multiple matching permit policies then there would be multiple determining policies. In the case that no policies match, and hence the response is DENY, there would be no determining policies.

errors
Required: Yes
Type: Array of EvaluationErrorItem structures

Errors that occurred while making an authorization decision. For example, a policy might reference an entity or attribute that doesn't exist in the request.

request
Required: Yes
Type: BatchIsAuthorizedWithTokenInputItem structure

The authorization request that initiated the decision.

CognitoGroupConfiguration

Description

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

This data type is part of a CognitoUserPoolConfiguration structure and is a request parameter in CreateIdentitySource.

Members
groupEntityType
Required: Yes
Type: string

The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup.

CognitoGroupConfigurationDetail

Description

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

This data type is part of an CognitoUserPoolConfigurationDetail structure and is a response parameter to GetIdentitySource.

Members
groupEntityType
Type: string

The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup.

CognitoGroupConfigurationItem

Description

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

This data type is part of an CognitoUserPoolConfigurationItem structure and is a response parameter to ListIdentitySources.

Members
groupEntityType
Type: string

The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup.

CognitoUserPoolConfiguration

Description

The configuration for an identity source that represents a connection to an Amazon Cognito user pool used as an identity provider for Verified Permissions.

This data type part of a Configuration structure that is used as a parameter to CreateIdentitySource.

Example:"CognitoUserPoolConfiguration":{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}

Members
clientIds
Type: Array of strings

The unique application client IDs that are associated with the specified Amazon Cognito user pool.

Example: "ClientIds": ["&ExampleCogClientId;"]

groupConfiguration
Type: CognitoGroupConfiguration structure

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

userPoolArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

Example: "UserPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

CognitoUserPoolConfigurationDetail

Description

The configuration for an identity source that represents a connection to an Amazon Cognito user pool used as an identity provider for Verified Permissions.

This data type is used as a field that is part of an ConfigurationDetail structure that is part of the response to GetIdentitySource.

Example:"CognitoUserPoolConfiguration":{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}

Members
clientIds
Required: Yes
Type: Array of strings

The unique application client IDs that are associated with the specified Amazon Cognito user pool.

Example: "clientIds": ["&ExampleCogClientId;"]

groupConfiguration

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

issuer
Required: Yes
Type: string

The OpenID Connect (OIDC) issuer ID of the Amazon Cognito user pool that contains the identities to be authorized.

Example: "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5"

userPoolArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

Example: "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

CognitoUserPoolConfigurationItem

Description

The configuration for an identity source that represents a connection to an Amazon Cognito user pool used as an identity provider for Verified Permissions.

This data type is used as a field that is part of the ConfigurationItem structure that is part of the response to ListIdentitySources.

Example:"CognitoUserPoolConfiguration":{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}

Members
clientIds
Required: Yes
Type: Array of strings

The unique application client IDs that are associated with the specified Amazon Cognito user pool.

Example: "clientIds": ["&ExampleCogClientId;"]

groupConfiguration

The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

issuer
Required: Yes
Type: string

The OpenID Connect (OIDC) issuer ID of the Amazon Cognito user pool that contains the identities to be authorized.

Example: "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5"

userPoolArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

Example: "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

Configuration

Description

Contains configuration information used when creating a new identity source.

This data type is used as a request parameter for the CreateIdentitySource operation.

Members
cognitoUserPoolConfiguration

Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool and one or more application client IDs.

Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

openIdConnectConfiguration
Type: OpenIdConnectConfiguration structure

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

Example:"configuration":{"openIdConnectConfiguration":{"issuer":"https://auth.example.com","tokenSelection":{"accessTokenOnly":{"audiences":["https://myapp.example.com","https://myapp2.example.com"],"principalIdClaim":"sub"}},"entityIdPrefix":"MyOIDCProvider","groupConfiguration":{"groupClaim":"groups","groupEntityType":"MyCorp::UserGroup"}}}

ConfigurationDetail

Description

Contains configuration information about an identity source.

This data type is a response parameter to the GetIdentitySource operation.

Members
cognitoUserPoolConfiguration

Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool, the policy store entity that you want to assign to user groups, and one or more application client IDs.

Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

openIdConnectConfiguration

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

Example:"configuration":{"openIdConnectConfiguration":{"issuer":"https://auth.example.com","tokenSelection":{"accessTokenOnly":{"audiences":["https://myapp.example.com","https://myapp2.example.com"],"principalIdClaim":"sub"}},"entityIdPrefix":"MyOIDCProvider","groupConfiguration":{"groupClaim":"groups","groupEntityType":"MyCorp::UserGroup"}}}

ConfigurationItem

Description

Contains configuration information about an identity source.

This data type is a response parameter to the ListIdentitySources operation.

Members
cognitoUserPoolConfiguration

Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool, the policy store entity that you want to assign to user groups, and one or more application client IDs.

Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

openIdConnectConfiguration

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

Example:"configuration":{"openIdConnectConfiguration":{"issuer":"https://auth.example.com","tokenSelection":{"accessTokenOnly":{"audiences":["https://myapp.example.com","https://myapp2.example.com"],"principalIdClaim":"sub"}},"entityIdPrefix":"MyOIDCProvider","groupConfiguration":{"groupClaim":"groups","groupEntityType":"MyCorp::UserGroup"}}}

ConflictException

Description

The request failed because another request to modify a resource occurred at the same.

Members
message
Required: Yes
Type: string
resources
Required: Yes
Type: Array of ResourceConflict structures

The list of resources referenced with this failed request.

ContextDefinition

Description

Contains additional details about the context of the request. Verified Permissions evaluates this information in an authorization request as part of the when and unless clauses in a policy.

This data type is used as a request parameter for the IsAuthorized, BatchIsAuthorized, and IsAuthorizedWithToken operations.

Example: "context":{"contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}}

Members
contextMap
Type: Associative array of custom strings keys (String) to AttributeValue structures

An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value.

Example: "contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}

DeterminingPolicyItem

Description

Contains information about one of the policies that determined an authorization decision.

This data type is used as an element in a response parameter for the IsAuthorized, BatchIsAuthorized, and IsAuthorizedWithToken operations.

Example: "determiningPolicies":[{"policyId":"SPEXAMPLEabcdefg111111"}]

Members
policyId
Required: Yes
Type: string

The Id of a policy that determined to an authorization decision.

Example: "policyId":"SPEXAMPLEabcdefg111111"

EntitiesDefinition

Description

Contains the list of entities to be considered during an authorization request. This includes all principals, resources, and actions required to successfully evaluate the request.

This data type is used as a field in the response parameter for the IsAuthorized and IsAuthorizedWithToken operations.

Members
entityList
Type: Array of EntityItem structures

An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

EntityIdentifier

Description

Contains the identifier of an entity, including its ID and type.

This data type is used as a request parameter for IsAuthorized operation, and as a response parameter for the CreatePolicy, GetPolicy, and UpdatePolicy operations.

Example: {"entityId":"string","entityType":"string"}

Members
entityId
Required: Yes
Type: string

The identifier of an entity.

"entityId":"identifier"

entityType
Required: Yes
Type: string

The type of an entity.

Example: "entityType":"typeName"

EntityItem

Description

Contains information about an entity that can be referenced in a Cedar policy.

This data type is used as one of the fields in the EntitiesDefinition structure.

{ "identifier": { "entityType": "Photo", "entityId": "VacationPhoto94.jpg" }, "attributes": {}, "parents": [ { "entityType": "Album", "entityId": "alice_folder" } ] }

Members
attributes
Type: Associative array of custom strings keys (String) to AttributeValue structures

A list of attributes for the entity.

identifier
Required: Yes
Type: EntityIdentifier structure

The identifier of the entity.

parents
Type: Array of EntityIdentifier structures

The parent entities in the hierarchy that contains the entity. A principal or resource entity can be defined with at most 99 transitive parents per authorization request.

A transitive parent is an entity in the hierarchy of entities including all direct parents, and parents of parents. For example, a user can be a member of 91 groups if one of those groups is a member of eight groups, for a total of 100: one entity, 91 entity parents, and eight parents of parents.

EntityReference

Description

Contains information about a principal or resource that can be referenced in a Cedar policy.

This data type is used as part of the PolicyFilter structure that is used as a request parameter for the ListPolicies operation..

Members
identifier
Type: EntityIdentifier structure

The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.

unspecified
Type: boolean

Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.

EvaluationErrorItem

Description

Contains a description of an evaluation error.

This data type is a response parameter of the IsAuthorized, BatchIsAuthorized, and IsAuthorizedWithToken operations.

Members
errorDescription
Required: Yes
Type: string

The error description.

IdentitySourceDetails

Description

A structure that contains configuration of the identity source.

This data type was a response parameter for the GetIdentitySource operation. Replaced by ConfigurationDetail.

Members
clientIds
Type: Array of strings

The application client IDs associated with the specified Amazon Cognito user pool that are enabled for this identity source.

discoveryUrl
Type: string

The well-known URL that points to this user pool's OIDC discovery endpoint. This is a URL string in the following format. This URL replaces the placeholders for both the Amazon Web Services Region and the user pool identifier with those appropriate for this user pool.

https://cognito-idp.<region>.amazonaws.com/<user-pool-id>/.well-known/openid-configuration

openIdIssuer
Type: string

A string that identifies the type of OIDC service represented by this identity source.

At this time, the only valid value is cognito.

userPoolArn
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool whose identities are accessible to this Verified Permissions policy store.

IdentitySourceFilter

Description

A structure that defines characteristics of an identity source that you can use to filter.

This data type is a request parameter for the ListIdentityStores operation.

Members
principalEntityType
Type: string

The Cedar entity type of the principals returned by the identity provider (IdP) associated with this identity source.

IdentitySourceItem

Description

A structure that defines an identity source.

This data type is a response parameter to the ListIdentitySources operation.

Members
configuration
Type: ConfigurationItem structure

Contains configuration information about an identity source.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the identity source was originally created.

details
Type: IdentitySourceItemDetails structure

A structure that contains the details of the associated identity provider (IdP).

identitySourceId
Required: Yes
Type: string

The unique identifier of the identity source.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the identity source was most recently updated.

policyStoreId
Required: Yes
Type: string

The identifier of the policy store that contains the identity source.

principalEntityType
Required: Yes
Type: string

The Cedar entity type of the principals returned from the IdP associated with this identity source.

IdentitySourceItemDetails

Description

A structure that contains configuration of the identity source.

This data type was a response parameter for the ListIdentitySources operation. Replaced by ConfigurationItem.

Members
clientIds
Type: Array of strings

The application client IDs associated with the specified Amazon Cognito user pool that are enabled for this identity source.

discoveryUrl
Type: string

The well-known URL that points to this user pool's OIDC discovery endpoint. This is a URL string in the following format. This URL replaces the placeholders for both the Amazon Web Services Region and the user pool identifier with those appropriate for this user pool.

https://cognito-idp.<region>.amazonaws.com/<user-pool-id>/.well-known/openid-configuration

openIdIssuer
Type: string

A string that identifies the type of OIDC service represented by this identity source.

At this time, the only valid value is cognito.

userPoolArn
Type: string

The Amazon Cognito user pool whose identities are accessible to this Verified Permissions policy store.

InternalServerException

Description

The request failed because of an internal error. Try your request again later

Members
message
Required: Yes
Type: string

OpenIdConnectAccessTokenConfiguration

Description

The configuration of an OpenID Connect (OIDC) identity source for handling access token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelection structure, which is a parameter of CreateIdentitySource.

Members
audiences
Type: Array of strings

The access token aud claim values that you want to accept in your policy store. For example, https://myapp.example.com, https://myapp2.example.com.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectAccessTokenConfigurationDetail

Description

The configuration of an OpenID Connect (OIDC) identity source for handling access token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelectionDetail structure, which is a parameter of GetIdentitySource.

Members
audiences
Type: Array of strings

The access token aud claim values that you want to accept in your policy store. For example, https://myapp.example.com, https://myapp2.example.com.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectAccessTokenConfigurationItem

Description

The configuration of an OpenID Connect (OIDC) identity source for handling access token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelectionItem structure, which is a parameter of ListIdentitySources.

Members
audiences
Type: Array of strings

The access token aud claim values that you want to accept in your policy store. For example, https://myapp.example.com, https://myapp2.example.com.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectConfiguration

Description

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

This data type is part of a Configuration structure, which is a parameter to CreateIdentitySource.

Members
entityIdPrefix
Type: string

A descriptive string that you want to prefix to user entities from your OIDC identity provider. For example, if you set an entityIdPrefix of MyOIDCProvider, you can reference principals in your policies in the format MyCorp::User::MyOIDCProvider|Carlos.

groupConfiguration

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

issuer
Required: Yes
Type: string

The issuer URL of an OIDC identity provider. This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration.

tokenSelection
Required: Yes
Type: OpenIdConnectTokenSelection structure

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

OpenIdConnectConfigurationDetail

Description

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

This data type is part of a ConfigurationDetail structure, which is a parameter to GetIdentitySource.

Members
entityIdPrefix
Type: string

A descriptive string that you want to prefix to user entities from your OIDC identity provider. For example, if you set an entityIdPrefix of MyOIDCProvider, you can reference principals in your policies in the format MyCorp::User::MyOIDCProvider|Carlos.

groupConfiguration

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

issuer
Required: Yes
Type: string

The issuer URL of an OIDC identity provider. This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration.

tokenSelection
Required: Yes
Type: OpenIdConnectTokenSelectionDetail structure

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

OpenIdConnectConfigurationItem

Description

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

This data type is part of a ConfigurationItem structure, which is a parameter to ListIdentitySources.

Members
entityIdPrefix
Type: string

A descriptive string that you want to prefix to user entities from your OIDC identity provider. For example, if you set an entityIdPrefix of MyOIDCProvider, you can reference principals in your policies in the format MyCorp::User::MyOIDCProvider|Carlos.

groupConfiguration

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

issuer
Required: Yes
Type: string

The issuer URL of an OIDC identity provider. This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration.

tokenSelection
Required: Yes
Type: OpenIdConnectTokenSelectionItem structure

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

OpenIdConnectGroupConfiguration

Description

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

This data type is part of a OpenIdConnectConfiguration structure, which is a parameter of CreateIdentitySource.

Members
groupClaim
Required: Yes
Type: string

The token claim that you want Verified Permissions to interpret as group membership. For example, groups.

groupEntityType
Required: Yes
Type: string

The policy store entity type that you want to map your users' group claim to. For example, MyCorp::UserGroup. A group entity type is an entity that can have a user entity type as a member.

OpenIdConnectGroupConfigurationDetail

Description

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

This data type is part of a OpenIdConnectConfigurationDetail structure, which is a parameter of GetIdentitySource.

Members
groupClaim
Required: Yes
Type: string

The token claim that you want Verified Permissions to interpret as group membership. For example, groups.

groupEntityType
Required: Yes
Type: string

The policy store entity type that you want to map your users' group claim to. For example, MyCorp::UserGroup. A group entity type is an entity that can have a user entity type as a member.

OpenIdConnectGroupConfigurationItem

Description

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

This data type is part of a OpenIdConnectConfigurationItem structure, which is a parameter of ListIdentitySourcea.

Members
groupClaim
Required: Yes
Type: string

The token claim that you want Verified Permissions to interpret as group membership. For example, groups.

groupEntityType
Required: Yes
Type: string

The policy store entity type that you want to map your users' group claim to. For example, MyCorp::UserGroup. A group entity type is an entity that can have a user entity type as a member.

OpenIdConnectIdentityTokenConfiguration

Description

The configuration of an OpenID Connect (OIDC) identity source for handling identity (ID) token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelection structure, which is a parameter of CreateIdentitySource.

Members
clientIds
Type: Array of strings

The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. For example, 1example23456789, 2example10111213.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectIdentityTokenConfigurationDetail

Description

The configuration of an OpenID Connect (OIDC) identity source for handling identity (ID) token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelectionDetail structure, which is a parameter of GetIdentitySource.

Members
clientIds
Type: Array of strings

The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. For example, 1example23456789, 2example10111213.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectIdentityTokenConfigurationItem

Description

The configuration of an OpenID Connect (OIDC) identity source for handling identity (ID) token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a OpenIdConnectTokenSelectionItem structure, which is a parameter of ListIdentitySources.

Members
clientIds
Type: Array of strings

The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. For example, 1example23456789, 2example10111213.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

OpenIdConnectTokenSelection

Description

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

This data type is part of a OpenIdConnectConfiguration structure, which is a parameter of CreateIdentitySource.

Members
accessTokenOnly

The OIDC configuration for processing access tokens. Contains allowed audience claims, for example https://auth.example.com, and the claim that you want to map to the principal, for example sub.

identityTokenOnly

The OIDC configuration for processing identity (ID) tokens. Contains allowed client ID claims, for example 1example23456789, and the claim that you want to map to the principal, for example sub.

OpenIdConnectTokenSelectionDetail

Description

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

This data type is part of a OpenIdConnectConfigurationDetail structure, which is a parameter of GetIdentitySource.

Members
accessTokenOnly

The OIDC configuration for processing access tokens. Contains allowed audience claims, for example https://auth.example.com, and the claim that you want to map to the principal, for example sub.

identityTokenOnly

The OIDC configuration for processing identity (ID) tokens. Contains allowed client ID claims, for example 1example23456789, and the claim that you want to map to the principal, for example sub.

OpenIdConnectTokenSelectionItem

Description

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

This data type is part of a OpenIdConnectConfigurationItem structure, which is a parameter of ListIdentitySources.

Members
accessTokenOnly

The OIDC configuration for processing access tokens. Contains allowed audience claims, for example https://auth.example.com, and the claim that you want to map to the principal, for example sub.

identityTokenOnly

The OIDC configuration for processing identity (ID) tokens. Contains allowed client ID claims, for example 1example23456789, and the claim that you want to map to the principal, for example sub.

PolicyDefinition

Description

A structure that contains the details for a Cedar policy definition. It includes the policy type, a description, and a policy body. This is a top level data type used to create a policy.

This data type is used as a request parameter for the CreatePolicy operation. This structure must always have either an static or a templateLinked element.

Members
static
Type: StaticPolicyDefinition structure

A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.

templateLinked

A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.

PolicyDefinitionDetail

Description

A structure that describes a policy definition. It must always have either an static or a templateLinked element.

This data type is used as a response parameter for the GetPolicy operation.

Members
static

Information about a static policy that wasn't created with a policy template.

templateLinked

Information about a template-linked policy that was created by instantiating a policy template.

PolicyDefinitionItem

Description

A structure that describes a PolicyDefinintion. It will always have either an StaticPolicy or a TemplateLinkedPolicy element.

This data type is used as a response parameter for the CreatePolicy and ListPolicies operations.

Members
static
Type: StaticPolicyDefinitionItem structure

Information about a static policy that wasn't created with a policy template.

templateLinked

Information about a template-linked policy that was created by instantiating a policy template.

PolicyFilter

Description

Contains information about a filter to refine policies returned in a query.

This data type is used as a response parameter for the ListPolicies operation.

Members
policyTemplateId
Type: string

Filters the output to only template-linked policies that were instantiated from the specified policy template.

policyType
Type: string

Filters the output to only policies of the specified type.

principal
Type: EntityReference structure

Filters the output to only policies that reference the specified principal.

resource
Type: EntityReference structure

Filters the output to only policies that reference the specified resource.

PolicyItem

Description

Contains information about a policy.

This data type is used as a response parameter for the ListPolicies operation.

Members
actions
Type: Array of ActionIdentifier structures

The action that a policy permits or forbids. For example, {"actions": [{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}]}.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy was created.

definition
Required: Yes
Type: PolicyDefinitionItem structure

The policy definition of an item in the list of policies returned.

effect
Type: string

The effect of the decision that a policy returns to an authorization request. For example, "effect": "Permit".

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy was most recently updated.

policyId
Required: Yes
Type: string

The identifier of the policy you want information about.

policyStoreId
Required: Yes
Type: string

The identifier of the PolicyStore where the policy you want information about is stored.

policyType
Required: Yes
Type: string

The type of the policy. This is one of the following values:

  • static

  • templateLinked

principal
Type: EntityIdentifier structure

The principal associated with the policy.

resource
Type: EntityIdentifier structure

The resource associated with the policy.

PolicyStoreItem

Description

Contains information about a policy store.

This data type is used as a response parameter for the ListPolicyStores operation.

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the policy store.

createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy was created.

description
Type: string

Descriptive text that you can provide to help with identification of the current policy store.

lastUpdatedDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the policy store was most recently updated.

policyStoreId
Required: Yes
Type: string

The unique identifier of the policy store.

PolicyTemplateItem

Description

Contains details about a policy template

This data type is used as a response parameter for the ListPolicyTemplates operation.

Members
createdDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was created.

description
Type: string

The description attached to the policy template.

lastUpdatedDate
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the policy template was most recently updated.

policyStoreId
Required: Yes
Type: string

The unique identifier of the policy store that contains the template.

policyTemplateId
Required: Yes
Type: string

The unique identifier of the policy template.

ResourceConflict

Description

Contains information about a resource conflict.

Members
resourceId
Required: Yes
Type: string

The unique identifier of the resource involved in a conflict.

resourceType
Required: Yes
Type: string

The type of the resource involved in a conflict.

ResourceNotFoundException

Description

The request failed because it references a resource that doesn't exist.

Members
message
Required: Yes
Type: string
resourceId
Required: Yes
Type: string

The unique ID of the resource referenced in the failed request.

resourceType
Required: Yes
Type: string

The resource type of the resource referenced in the failed request.

SchemaDefinition

Description

Contains a list of principal types, resource types, and actions that can be specified in policies stored in the same policy store. If the validation mode for the policy store is set to STRICT, then policies that can't be validated by this schema are rejected by Verified Permissions and can't be stored in the policy store.

Members
cedarJson
Type: string

A JSON string representation of the schema supported by applications that use this policy store. For more information, see Policy store schema in the Amazon Verified Permissions User Guide.

ServiceQuotaExceededException

Description

The request failed because it would cause a service quota to be exceeded.

Members
message
Required: Yes
Type: string
quotaCode
Type: string

The quota code recognized by the Amazon Web Services Service Quotas service.

resourceId
Type: string

The unique ID of the resource referenced in the failed request.

resourceType
Required: Yes
Type: string

The resource type of the resource referenced in the failed request.

serviceCode
Type: string

The code for the Amazon Web Service that owns the quota.

StaticPolicyDefinition

Description

Contains information about a static policy.

This data type is used as a field that is part of the PolicyDefinitionDetail type.

Members
description
Type: string

The description of the static policy.

statement
Required: Yes
Type: string

The policy content of the static policy, written in the Cedar policy language.

StaticPolicyDefinitionDetail

Description

A structure that contains details about a static policy. It includes the description and policy body.

This data type is used within a PolicyDefinition structure as part of a request parameter for the CreatePolicy operation.

Members
description
Type: string

A description of the static policy.

statement
Required: Yes
Type: string

The content of the static policy written in the Cedar policy language.

StaticPolicyDefinitionItem

Description

A structure that contains details about a static policy. It includes the description and policy statement.

This data type is used within a PolicyDefinition structure as part of a request parameter for the CreatePolicy operation.

Members
description
Type: string

A description of the static policy.

TemplateLinkedPolicyDefinition

Description

Contains information about a policy created by instantiating a policy template.

Members
policyTemplateId
Required: Yes
Type: string

The unique identifier of the policy template used to create this policy.

principal
Type: EntityIdentifier structure

The principal associated with this template-linked policy. Verified Permissions substitutes this principal for the ?principal placeholder in the policy template when it evaluates an authorization request.

resource
Type: EntityIdentifier structure

The resource associated with this template-linked policy. Verified Permissions substitutes this resource for the ?resource placeholder in the policy template when it evaluates an authorization request.

TemplateLinkedPolicyDefinitionDetail

Description

Contains information about a policy that was created by instantiating a policy template.

Members
policyTemplateId
Required: Yes
Type: string

The unique identifier of the policy template used to create this policy.

principal
Type: EntityIdentifier structure

The principal associated with this template-linked policy. Verified Permissions substitutes this principal for the ?principal placeholder in the policy template when it evaluates an authorization request.

resource
Type: EntityIdentifier structure

The resource associated with this template-linked policy. Verified Permissions substitutes this resource for the ?resource placeholder in the policy template when it evaluates an authorization request.

TemplateLinkedPolicyDefinitionItem

Description

Contains information about a policy created by instantiating a policy template.

This

Members
policyTemplateId
Required: Yes
Type: string

The unique identifier of the policy template used to create this policy.

principal
Type: EntityIdentifier structure

The principal associated with this template-linked policy. Verified Permissions substitutes this principal for the ?principal placeholder in the policy template when it evaluates an authorization request.

resource
Type: EntityIdentifier structure

The resource associated with this template-linked policy. Verified Permissions substitutes this resource for the ?resource placeholder in the policy template when it evaluates an authorization request.

ThrottlingException

Description

The request failed because it exceeded a throttling quota.

Members
message
Required: Yes
Type: string
quotaCode
Type: string

The quota code recognized by the Amazon Web Services Service Quotas service.

serviceCode
Type: string

The code for the Amazon Web Service that owns the quota.

UpdateCognitoGroupConfiguration

Description

The user group entities from an Amazon Cognito user pool identity source.

Members
groupEntityType
Required: Yes
Type: string

The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup.

UpdateCognitoUserPoolConfiguration

Description

Contains configuration details of a Amazon Cognito user pool for use with an identity source.

Members
clientIds
Type: Array of strings

The client ID of an app client that is configured for the specified Amazon Cognito user pool.

groupConfiguration

The configuration of the user groups from an Amazon Cognito user pool identity source.

userPoolArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool associated with this identity source.

UpdateConfiguration

Description

Contains an update to replace the configuration in an existing identity source.

Members
cognitoUserPoolConfiguration

Contains configuration details of a Amazon Cognito user pool.

openIdConnectConfiguration

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

UpdateOpenIdConnectAccessTokenConfiguration

Description

The configuration of an OpenID Connect (OIDC) identity source for handling access token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a UpdateOpenIdConnectTokenSelection structure, which is a parameter to UpdateIdentitySource.

Members
audiences
Type: Array of strings

The access token aud claim values that you want to accept in your policy store. For example, https://myapp.example.com, https://myapp2.example.com.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

UpdateOpenIdConnectConfiguration

Description

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities. It specifies the issuer URL, token type that you want to use, and policy store entity details.

This data type is part of a UpdateConfiguration structure, which is a parameter to UpdateIdentitySource.

Members
entityIdPrefix
Type: string

A descriptive string that you want to prefix to user entities from your OIDC identity provider. For example, if you set an entityIdPrefix of MyOIDCProvider, you can reference principals in your policies in the format MyCorp::User::MyOIDCProvider|Carlos.

groupConfiguration

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

issuer
Required: Yes
Type: string

The issuer URL of an OIDC identity provider. This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration.

tokenSelection
Required: Yes
Type: UpdateOpenIdConnectTokenSelection structure

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

UpdateOpenIdConnectGroupConfiguration

Description

The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. For example, this object can map the contents of a groups claim to MyCorp::UserGroup.

This data type is part of a UpdateOpenIdConnectConfiguration structure, which is a parameter to UpdateIdentitySource.

Members
groupClaim
Required: Yes
Type: string

The token claim that you want Verified Permissions to interpret as group membership. For example, groups.

groupEntityType
Required: Yes
Type: string

The policy store entity type that you want to map your users' group claim to. For example, MyCorp::UserGroup. A group entity type is an entity that can have a user entity type as a member.

UpdateOpenIdConnectIdentityTokenConfiguration

Description

The configuration of an OpenID Connect (OIDC) identity source for handling identity (ID) token claims. Contains the claim that you want to identify as the principal in an authorization request, and the values of the aud claim, or audiences, that you want to accept.

This data type is part of a UpdateOpenIdConnectTokenSelection structure, which is a parameter to UpdateIdentitySource.

Members
clientIds
Type: Array of strings

The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. For example, 1example23456789, 2example10111213.

principalIdClaim
Type: string

The claim that determines the principal in OIDC access tokens. For example, sub.

UpdateOpenIdConnectTokenSelection

Description

The token type that you want to process from your OIDC identity provider. Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

This data type is part of a UpdateOpenIdConnectConfiguration structure, which is a parameter to UpdateIdentitySource.

Members
accessTokenOnly

The OIDC configuration for processing access tokens. Contains allowed audience claims, for example https://auth.example.com, and the claim that you want to map to the principal, for example sub.

identityTokenOnly

The OIDC configuration for processing identity (ID) tokens. Contains allowed client ID claims, for example 1example23456789, and the claim that you want to map to the principal, for example sub.

UpdatePolicyDefinition

Description

Contains information about updates to be applied to a policy.

This data type is used as a request parameter in the UpdatePolicy operation.

Members
static

Contains details about the updates to be applied to a static policy.

UpdateStaticPolicyDefinition

Description

Contains information about an update to a static policy.

Members
description
Type: string

Specifies the description to be added to or replaced on the static policy.

statement
Required: Yes
Type: string

Specifies the Cedar policy language text to be added to or replaced on the static policy.

You can change only the following elements from the original content:

  • The action referenced by the policy.

  • Any conditional clauses, such as when or unless clauses.

You can't change the following elements:

  • Changing from StaticPolicy to TemplateLinkedPolicy.

  • The effect (permit or forbid) of the policy.

  • The principal referenced by the policy.

  • The resource referenced by the policy.

ValidationException

Description

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

  • UnrecognizedEntityType

    The policy includes an entity type that isn't found in the schema.

  • UnrecognizedActionId

    The policy includes an action id that isn't found in the schema.

  • InvalidActionApplication

    The policy includes an action that, according to the schema, doesn't support the specified principal and resource.

  • UnexpectedType

    The policy included an operand that isn't a valid type for the specified operation.

  • IncompatibleTypes

    The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.

  • MissingAttribute

    The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • UnsafeOptionalAttributeAccess

    The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.

  • ImpossiblePolicy

    Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.

  • WrongNumberArguments

    The policy references an extension type with the wrong number of arguments.

  • FunctionArgumentValidationError

    Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.

Members
fieldList
Type: Array of ValidationExceptionField structures

The list of fields that aren't valid.

message
Required: Yes
Type: string

ValidationExceptionField

Description

Details about a field that failed policy validation.

Members
message
Required: Yes
Type: string

Describes the policy validation error.

path
Required: Yes
Type: string

The path to the specific element that Verified Permissions found to be not valid.

ValidationSettings

Description

A structure that contains Cedar policy validation settings for the policy store. The validation mode determines which validation failures that Cedar considers serious enough to block acceptance of a new or edited static policy or policy template.

This data type is used as a request parameter in the CreatePolicyStore and UpdatePolicyStore operations.

Members
mode
Required: Yes
Type: string

The validation mode currently configured for this policy store. The valid values are:

  • OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.

  • STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.

If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.

To submit a static policy or policy template without a schema, you must turn off validation.