Actions, resources, and condition keys for AWS AppSync
AWS AppSync (service prefix:
appsync
) provides the following service-specific resources, actions, and condition context
keys for use in IAM permission policies.
References:
-
Learn how to configure this service .
-
View a list of the API operations available for this service .
-
Learn how to secure this service and its resources by using IAM permission policies.
Topics
Actions defined by AWS AppSync
You can specify the following actions in the
Action
element of an IAM policy statement. Use policies to grant permissions to perform
an operation in AWS. When you use an action in a policy, you usually allow or
deny access to the API operation or CLI command with the same name. However,
in some cases, a single action controls access to more than one operation. Alternatively,
some operations require several different actions.
The
Resource types
column indicates whether each action supports resource-level permissions. If
there is no value for this column, you must specify all resources ("*") in the
Resource
element of your policy statement. If the column includes a resource type, then
you can specify an ARN of that type in a statement with that action. Required
resources are indicated in the table with an asterisk (*). If you specify a resource-level
permission ARN in a statement using this action, then it must be of this type.
Some actions support multiple resource types. If the resource type is optional (not
indicated as required), then you can choose to use one but not the other.
For details about the columns in the following table, see The actions table .
Actions | Description | Access level | Resource types (*required) | Condition keys | Dependent actions |
---|---|---|---|---|---|
CreateApiCache | Grants permissions to create an API cache in AppSync | Write | |||
CreateApiKey | Grants permissions to create a unique key that you can distribute to clients who are executing your API | Write | |||
CreateDataSource | Grants permissions to create a DataSource object | Write | |||
CreateFunction | Grants permissions to create a new Function object | Write | |||
CreateGraphqlApi | Grants permissions to creates a GraphqlApi object, which is the top level AppSync resource | Tagging |
iam:CreateServiceLinkedRole |
||
CreateResolver | Grants permissions to create a Resolver object. A resolver converts incoming requests into a format that a data source can understand, and converts the data source's responses into GraphQL | Write | |||
CreateType | Grants permissions to create a Type object | Write | |||
DeleteApiCache | Grants permissions to delete an API cache in AppSync | Write | |||
DeleteApiKey | Grants permissions to delete an API key | Write | |||
DeleteDataSource | Grants permissions to delete a DataSource object | Write | |||
DeleteFunction | Grants permissions to delete a Function object | Write | |||
DeleteGraphqlApi | Grants permissions to delete a GraphqlApi object. This will also clean up every AppSync resource below that API | Write | |||
DeleteResolver | Grants permissions to delete a Resolver object | Write | |||
DeleteType | Grants permissions to delete a Type object | Write | |||
FlushApiCache | Grants permissions to flush an API cache in AppSync | Write | |||
GetApiCache | Grants permissions to read information about an API cache in AppSync | Read | |||
GetDataSource | Grants permissions to retrieve a DataSource object | Read | |||
GetFunction | Grants permissions to retrieve a Function object | Read | |||
GetGraphqlApi | Grants permissions to retrieve a GraphqlApi object | Read | |||
GetIntrospectionSchema | Grants permissions to retrieve the introspection schema for a GraphQL API | Read | |||
GetResolver | Grants permissions to retrieve a Resolver object | Read | |||
GetSchemaCreationStatus | Grants permissions to retrieve the current status of a schema creation operation | Read | |||
GetType | Grants permissions to retrieve a Type object | Read | |||
GraphQL | Grants permissions to send a GraphQL query to a GraphQL API | Write | |||
ListApiKeys | Grants permissions to list the API keys for a given API | List | |||
ListDataSources | Grants permissions to list the data sources for a given API | List | |||
ListFunctions | Grants permissions to list the functions for a given API | List | |||
ListGraphqlApis | Grants permissions to list your GraphQL APIs | List | |||
ListResolvers | Grants permissions to list the resolvers for a given API and type | List | |||
ListResolversByFunction | Grants permissions to list the resolvers that are associated with a specific function | List | |||
ListTagsForResource | Grants permissions to list the tags for a resource | Read | |||
ListTypes | Grants permissions to list the types for a given API | List | |||
SetWebACL | Grants permissions to set web ACL | Write | |||
StartSchemaCreation | Grants permissions to add a new schema to your GraphQL API. This operation is asynchronous - GetSchemaCreationStatus can show when it has completed | Write | |||
TagResource | Grants permissions to tag a resource | Tagging | |||
UntagResource | Grants permissions to untag a resource | Tagging | |||
UpdateApiCache | Grants permissions to update an API cache in AppSync | Write | |||
UpdateApiKey | Grants permissions to update an API key for a given API | Write | |||
UpdateDataSource | Grants permissions to update a DataSource object | Write | |||
UpdateFunction | Grants permissions to update an existing Function object | Write | |||
UpdateGraphqlApi | Grants permissions to updates a GraphqlApi object | Write |
iam:CreateServiceLinkedRole |
||
UpdateResolver | Grants permissions to update a Resolver object | Write | |||
UpdateType | Grants permissions to update a Type object | Write |
Resource types defined by AWS AppSync
The following resource types are defined by this service and can be used in the
Resource
element of IAM permission policy statements. Each action in the
Actions table
identifies the resource types that can be specified with that action. A resource
type can also define which condition keys you can include in a policy. These
keys are displayed in the last column of the table. For details about the columns
in the following table, see
The resource types table
.
Resource types | ARN | Condition keys |
---|---|---|
datasource |
arn:$
{
Partition}:appsync:$
{
Region}:$
{
Account}:apis/$
{
GraphQLAPIId}/datasources/$
{
DatasourceName}
|
|
graphqlapi |
arn:$
{
Partition}:appsync:$
{
Region}:$
{
Account}:apis/$
{
GraphQLAPIId}
|
|
field |
arn:$
{
Partition}:appsync:$
{
Region}:$
{
Account}:apis/$
{
GraphQLAPIId}/types/$
{
TypeName}/fields/$
{
FieldName}
|
|
type |
arn:$
{
Partition}:appsync:$
{
Region}:$
{
Account}:apis/$
{
GraphQLAPIId}/types/$
{
TypeName}
|
|
function |
arn:$
{
Partition}:appsync:$
{
Region}:$
{
Account}:apis/$
{
GraphQLAPIId}/functions/$
{
FunctionId}
|
Condition keys for AWS AppSync
AWS AppSync defines the following condition keys that can be used in the
Condition
element of an IAM policy. You can use these keys to further refine the conditions
under which the policy statement applies. For details about the columns in the
following table, see
The condition keys table
.
To view the global condition keys that are available to all services, see Available global condition keys .
Condition keys | Description | Type |
---|---|---|
aws:RequestTag/${TagKey} | Filters actions based on the presence of tag key-value pairs in the request | String |
aws:ResourceTag/${TagKey} | Filters actions based on tag key-value pairs attached to the resource | String |
aws:TagKeys | Filters actions based on the presence of tag keys in the request | String |