Actions, Resources, and Condition Keys for AWS AppSync - AWS Identity and Access Management
Keywords: IAM,AWS Identity and Access Management,IAM user,user,IAM group,group,IAM role,role,permission policy,trust policy,policy,access key,password

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.

# 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 The Actions Table .

Actions | Description | Access Level | Resource Types (*required) | Condition Keys | Dependent Actions
--- | --- | --- | --- | --- | ---
CreateApiKey | Creates a unique key that you can distribute to clients who are executing your API. | Write |  |  |
CreateDataSource | Creates a DataSource object. | Write |  |  |
CreateFunction | Create a new Function object. | Write |  |  |
CreateGraphqlApi | Creates a GraphqlApi object, which is the top level AppSync resource. | Tagging |  | aws:RequestTag/${TagKey} aws:TagKeys |
CreateResolver | Creates 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 | Creates a Type object. | Write |  |  |
DeleteApiKey | Deletes an API key. | Write |  |  |
DeleteDataSource | Deletes a DataSource object. | Write |  |  |
DeleteFunction | Deletes a Function object. | Write |  |  |
DeleteGraphqlApi | Deletes a GraphqlApi object. This will also clean up every AppSync resource below that API. | Write | graphqlapi* |  |
| aws:ResourceTag/${TagKey} |
DeleteResolver | Deletes a Resolver object. | Write |  |  |
DeleteType | Deletes a Type object. | Write |  |  |
GetDataSource | Retrieves a DataSource object. | Read |  |  |
GetFunction | Retrieves a Function object. | Read |  |  |
GetGraphqlApi | Retrieves a GraphqlApi object. | Read | graphqlapi* |  |
| aws:ResourceTag/${TagKey} |
GetIntrospectionSchema | Retrieves the introspection schema for a GraphQL API. | Read |  |  |
GetResolver | Retrieves a Resolver object. | Read |  |  |
GetSchemaCreationStatus | Retrieves the current status of a schema creation operation. | Read |  |  |
GetType | Retrieves a Type object. | Read |  |  |
GraphQL | Sends a GraphQL query to a GraphQL API. | Write | field* |  |
graphqlapi* |  |
ListApiKeys | Lists the API keys for a given API. | List |  |  |
ListDataSources | Lists the data sources for a given API. | List |  |  |
ListFunctions | Lists the functions for a given API. | List |  |  |
ListGraphqlApis | Lists your GraphQL APIs. | List |  |  |
ListResolvers | Lists the resolvers for a given API and type. | List |  |  |
ListResolversByFunction | List the resolvers that are associated with a specific function. | List |  |  |
ListTagsForResource | List the tags for a resource. | Read | graphqlapi |  |
| aws:ResourceTag/${TagKey} |
ListTypes | Lists the types for a given API. | List |  |  |
StartSchemaCreation | Adds a new schema to your GraphQL API. This operation is asynchronous - GetSchemaCreationStatus can show when it has completed. | Write |  |  |
TagResource | Tag a resource. | Tagging | graphqlapi |  |
| aws:RequestTag/${TagKey} aws:ResourceTag/${TagKey} aws:TagKeys |
UntagResource | Untag a resource. | Tagging | graphqlapi |  |
| aws:TagKeys |
UpdateApiKey | Updates an API key for a given API. | Write |  |  |
UpdateDataSource | Updates a DataSource object. | Write |  |  |
UpdateFunction | Updates an existing Function object. | Write |  |  |
UpdateGraphqlApi | Updates a GraphqlApi object. | Write | graphqlapi* |  |
| aws:ResourceTag/${TagKey} |
UpdateResolver | Updates a Resolver object. | Write |  |  |
UpdateType | Updates 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}` | 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 The Condition Keys Table .

To view the global condition keys that are available to all services, see Available Global Condition Keys in the IAM Policy Reference .

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