application_policies
Creates, updates, deletes, gets or lists an application_policies resource.
Overview
| Name | application_policies |
| Type | Resource |
| Id | aws.serverlessrepo.application_policies |
Fields
The following fields are returned by SELECT queries:
- get_application_policy
| Name | Datatype | Description |
|---|---|---|
statements | array | An array of policy statements applied to the application. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_application_policy | select | application_id, region | Retrieves the policy for the application. | |
put_application_policy | replace | application_id, region | Sets the permission policy for an application. For the list of actions supported for this operation, see Application Permissions . |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The Amazon Resource Name (ARN) of the application. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_application_policy
Retrieves the policy for the application.
SELECT
statements
FROM aws.serverlessrepo.application_policies
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_application_policy
Sets the permission policy for an application. For the list of actions supported for this operation, see Application Permissions .
REPLACE aws.serverlessrepo.application_policies
SET
Statements = '{{ Statements }}'
WHERE
application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
RETURNING
statements;