Skip to main content

apis

Creates, updates, deletes or gets an api resource or lists apis in a region

Overview

Nameapis
TypeResource
DescriptionResource schema for AppSync Api
Idaws.appsync.apis

Fields

NameDatatypeDescription
api_idstringThe unique identifier for the AppSync Api generated by the service
api_arnstringThe Amazon Resource Name (ARN) of the AppSync Api
namestringThe name of the AppSync API.
owner_contactstringThe owner contact information for an API resource.
dnsobjectA map of DNS names for the AppSync API.
event_configobjectThe configuration for an Event Api
tagsarrayAn arbitrary set of tags (key-value pairs) for this AppSync API.
regionstringAWS region.

For more information, see AWS::AppSync::Api.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all apis in a region.

SELECT
region,
api_id,
api_arn,
name,
owner_contact,
dns,
event_config,
tags
FROM aws.appsync.apis
WHERE region = 'us-east-1';

Gets all properties from an individual api.

SELECT
region,
api_id,
api_arn,
name,
owner_contact,
dns,
event_config,
tags
FROM aws.appsync.apis
WHERE region = 'us-east-1' AND data__Identifier = '<ApiArn>';

INSERT example

Use the following StackQL query and manifest file to create a new api resource, using stack-deploy.

/*+ create */
INSERT INTO aws.appsync.apis (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.appsync.apis
WHERE data__Identifier = '<ApiArn>'
AND region = 'us-east-1';

Permissions

To operate on the apis resource, the following permissions are required:

Create

appsync:CreateApi,
appsync:TagResource,
appsync:GetApi,
iam:PassRole

Read

appsync:GetApi,
appsync:ListTagsForResource

Update

appsync:UpdateApi,
appsync:TagResource,
appsync:UntagResource,
appsync:GetApi,
iam:PassRole

Delete

appsync:DeleteApi,
appsync:UntagResource

List

appsync:ListApis