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
Idawscc.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 Domain Name.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceapisINSERTName, region
delete_resourceapisDELETEIdentifier, region
update_resourceapisUPDATEIdentifier, PatchDocument, region
list_resourcesapis_list_onlySELECTregion
get_resourceapisSELECTIdentifier, region

SELECT examples

Gets all properties from an individual api.

SELECT
region,
api_id,
api_arn,
name,
owner_contact,
dns,
event_config,
tags
FROM awscc.appsync.apis
WHERE
region = 'us-east-1' AND
Identifier = '{{ api_arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.appsync.apis
SET PatchDocument = string('{{ {
"Name": name,
"OwnerContact": owner_contact,
"EventConfig": event_config,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ api_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.appsync.apis
WHERE
Identifier = '{{ api_arn }}' AND
region = 'us-east-1';

Permissions

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

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