apis
Creates, updates, deletes or gets an api
resource or lists apis
in a region
Overview
Name | apis |
Type | Resource |
Description | Resource schema for AppSync Api |
Id | aws.appsync.apis |
Fields
Name | Datatype | Description |
---|---|---|
api_id | string | The unique identifier for the AppSync Api generated by the service |
api_arn | string | The Amazon Resource Name (ARN) of the AppSync Api |
name | string | The name of the AppSync API. |
owner_contact | string | The owner contact information for an API resource. |
dns | object | A map of DNS names for the AppSync API. |
event_config | object | The configuration for an Event Api |
tags | array | An arbitrary set of tags (key-value pairs) for this AppSync API. |
region | string | AWS region. |
For more information, see AWS::AppSync::Api
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.appsync.apis (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.appsync.apis (
Name,
OwnerContact,
EventConfig,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ OwnerContact }}',
'{{ EventConfig }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: api
props:
- name: Name
value: '{{ Name }}'
- name: OwnerContact
value: '{{ OwnerContact }}'
- name: EventConfig
value:
AuthProviders:
- AuthType: '{{ AuthType }}'
OpenIDConnectConfig:
ClientId: '{{ ClientId }}'
AuthTTL: null
Issuer: '{{ Issuer }}'
IatTTL: null
CognitoConfig:
AppIdClientRegex: '{{ AppIdClientRegex }}'
UserPoolId: '{{ UserPoolId }}'
AwsRegion: '{{ AwsRegion }}'
LambdaAuthorizerConfig:
IdentityValidationExpression: '{{ IdentityValidationExpression }}'
AuthorizerUri: '{{ AuthorizerUri }}'
AuthorizerResultTtlInSeconds: '{{ AuthorizerResultTtlInSeconds }}'
ConnectionAuthModes:
- AuthType: null
DefaultPublishAuthModes: null
DefaultSubscribeAuthModes: null
LogConfig:
LogLevel: '{{ LogLevel }}'
CloudWatchLogsRoleArn: '{{ CloudWatchLogsRoleArn }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
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