Description: Lists all of the available service-specific resources, actions, and condition keys that can be used in IAM policies to control access to AWS AppSync.

Actions, resources, and condition keys for AWS AppSync - Service Authorization Reference

# 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
- Resource types defined by AWS AppSync
- Condition keys for AWS AppSync

## 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 Actions table .

Actions | Description | Access level | Resource types (*required) | Condition keys | Dependent actions
--- | --- | --- | --- | --- | ---
AssociateApi | Grants permission to attach a GraphQL API to a custom domain name in AppSync | Write | domain* |  |
CreateApiCache | Grants permission to create an API cache in AppSync | Write |  |  |
CreateApiKey | Grants permission to create a unique key that you can distribute to clients who are executing your API | Write |  |  |
CreateDataSource | Grants permission to create a data source | Write |  |  |
CreateDomainName | Grants permission to create a custom domain name in AppSync | Write |  |  |
CreateFunction | Grants permission to create a new function | Write |  |  |
CreateGraphqlApi | Grants permission to create a GraphQL API, which is the top level AppSync resource | Write |  | aws:RequestTag/${TagKey} aws:TagKeys | iam:CreateServiceLinkedRole
CreateResolver | Grants permission to create a resolver. 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 permission to create a type | Write |  |  |
DeleteApiCache | Grants permission to delete an API cache in AppSync | Write |  |  |
DeleteApiKey | Grants permission to delete an API key | Write |  |  |
DeleteDataSource | Grants permission to delete a data source | Write |  |  |
DeleteDomainName | Grants permission to delete a custom domain name in AppSync | Write | domain* |  |
DeleteFunction | Grants permission to delete a function | Write |  |  |
DeleteGraphqlApi | Grants permission to delete a GraphQL Api. This will also clean up every AppSync resource below that API | Write | graphqlapi* |  |
| aws:ResourceTag/${TagKey} |
DeleteResolver | Grants permission to delete a resolver | Write |  |  |
DeleteType | Grants permission to delete a type | Write |  |  |
DisassociateApi | Grants permission to dettach a GraphQL API to a custom domain name in AppSync | Write | domain* |  |
FlushApiCache | Grants permission to flush an API cache in AppSync | Write |  |  |
GetApiAssociation | Grants permission to read custom domain name - GraphQL API association details in AppSync | Read | domain* |  |
GetApiCache | Grants permission to read information about an API cache in AppSync | Read |  |  |
GetDataSource | Grants permission to retrieve a data source | Read |  |  |
GetDomainName | Grants permission to read information about a custom domain name in AppSync | Read | domain* |  |
GetFunction | Grants permission to retrieve a function | Read |  |  |
GetGraphqlApi | Grants permission to retrieve a GraphQL API | Read | graphqlapi* |  |
| aws:ResourceTag/${TagKey} |
GetIntrospectionSchema | Grants permission to retrieve the introspection schema for a GraphQL API | Read |  |  |
GetResolver | Grants permission to retrieve a resolver | Read |  |  |
GetSchemaCreationStatus | Grants permission to retrieve the current status of a schema creation operation | Read |  |  |
GetType | Grants permission to retrieve a type | Read |  |  |
GraphQL | Grants permission to send a GraphQL query to a GraphQL API | Write | field* |  |
graphqlapi* |  |
ListApiKeys | Grants permission to list the API keys for a given API | List |  |  |
ListDataSources | Grants permission to list the data sources for a given API | List |  |  |
ListDomainNames | Grants permission to enumerate custom domain names in AppSync | List |  |  |
ListFunctions | Grants permission to list the functions for a given API | List |  |  |
ListGraphqlApis | Grants permission to list GraphQL APIs | List |  |  |
ListResolvers | Grants permission to list the resolvers for a given API and type | List |  |  |
ListResolversByFunction | Grants permission to list the resolvers that are associated with a specific function | List |  |  |
ListTagsForResource | Grants permission to list the tags for a resource | Read | graphqlapi |  |
| aws:ResourceTag/${TagKey} |
ListTypes | Grants permission to list the types for a given API | List |  |  |
SetWebACL | Grants permission to set a web ACL | Write |  |  |
StartSchemaCreation | Grants permission to add a new schema to your GraphQL API. This operation is asynchronous - GetSchemaCreationStatus can show when it has completed | Write |  |  |
TagResource | Grants permission to tag a resource | Tagging | graphqlapi |  |
| aws:RequestTag/${TagKey} aws:ResourceTag/${TagKey} aws:TagKeys |
UntagResource | Grants permission to untag a resource | Tagging | graphqlapi |  |
| aws:TagKeys |
UpdateApiCache | Grants permission to update an API cache in AppSync | Write |  |  |
UpdateApiKey | Grants permission to update an API key for a given API | Write |  |  |
UpdateDataSource | Grants permission to update a data source | Write |  |  |
UpdateDomainName | Grants permission to update a custom domain name in AppSync | Write | domain* |  |
UpdateFunction | Grants permission to update an existing function | Write |  |  |
UpdateGraphqlApi | Grants permission to update a GraphQL API | Write | graphqlapi* |  | iam:CreateServiceLinkedRole
| aws:ResourceTag/${TagKey} |
UpdateResolver | Grants permission to update a resolver | Write |  |  |
UpdateType | Grants permission to update a type | 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 Resource types table .

Resource types | ARN | Condition keys
--- | --- | ---
datasource | `arn:$ { Partition}:appsync:$ { Region}:$ { Account}:apis/$ { GraphQLAPIId}/datasources/$ { DatasourceName}` |
domain | `arn:$ { Partition}:appsync:$ { Region}:$ { Account}:domainnames/$ { DomainName}` |
graphqlapi | `arn:$ { Partition}:appsync:$ { Region}:$ { Account}:apis/$ { GraphQLAPIId}` | aws:ResourceTag/${TagKey}
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 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 access by the tag key-value pairs in the request | String
aws:ResourceTag/${TagKey} | Filters access by the tag key-value pairs attached to the resource | String
aws:TagKeys | Filters access by the presence of tag keys in the request | String

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.