source_api_associations
Creates, updates, deletes or gets a source_api_association resource or lists source_api_associations in a region
Overview
| Name | source_api_associations |
| Type | Resource |
| Description | Resource Type definition for AWS::AppSync::SourceApiAssociation |
| Id | awscc.appsync.source_api_associations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
source_api_identifier | string | Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN |
merged_api_identifier | string | Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN |
description | string | Description of the SourceApiAssociation. |
source_api_association_config | object | Customized configuration for SourceApiAssociation. |
association_id | string | Id of the SourceApiAssociation. |
association_arn | string | ARN of the SourceApiAssociation. |
source_api_id | string | GraphQLApiId of the source API in the association. |
source_api_arn | string | ARN of the source API in the association. |
merged_api_id | string | GraphQLApiId of the Merged API in the association. |
merged_api_arn | string | ARN of the Merged API in the association. |
source_api_association_status | string | Current status of SourceApiAssociation. |
source_api_association_status_detail | string | Current SourceApiAssociation status details. |
last_successful_merge_date | string | Date of last schema successful merge. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
association_arn | string | ARN of the SourceApiAssociation. |
region | string | AWS region. |
For more information, see AWS::AppSync::SourceApiAssociation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | source_api_associations | INSERT | region |
delete_resource | source_api_associations | DELETE | Identifier, region |
update_resource | source_api_associations | UPDATE | Identifier, PatchDocument, region |
list_resources | source_api_associations_list_only | SELECT | region |
get_resource | source_api_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual source_api_association.
SELECT
region,
source_api_identifier,
merged_api_identifier,
description,
source_api_association_config,
association_id,
association_arn,
source_api_id,
source_api_arn,
merged_api_id,
merged_api_arn,
source_api_association_status,
source_api_association_status_detail,
last_successful_merge_date
FROM awscc.appsync.source_api_associations
WHERE
region = '{{ region }}' AND
Identifier = '{{ association_arn }}';
Lists all source_api_associations in a region.
SELECT
region,
association_arn
FROM awscc.appsync.source_api_associations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new source_api_association resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.appsync.source_api_associations (
SourceApiIdentifier,
MergedApiIdentifier,
Description,
SourceApiAssociationConfig,
region
)
SELECT
'{{ source_api_identifier }}',
'{{ merged_api_identifier }}',
'{{ description }}',
'{{ source_api_association_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.appsync.source_api_associations (
SourceApiIdentifier,
MergedApiIdentifier,
Description,
SourceApiAssociationConfig,
region
)
SELECT
'{{ source_api_identifier }}',
'{{ merged_api_identifier }}',
'{{ description }}',
'{{ source_api_association_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: source_api_association
props:
- name: source_api_identifier
value: '{{ source_api_identifier }}'
- name: merged_api_identifier
value: '{{ merged_api_identifier }}'
- name: description
value: '{{ description }}'
- name: source_api_association_config
value: null
UPDATE example
Use the following StackQL query and manifest file to update a source_api_association resource, using stack-deploy.
/*+ update */
UPDATE awscc.appsync.source_api_associations
SET PatchDocument = string('{{ {
"Description": description,
"SourceApiAssociationConfig": source_api_association_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ association_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.appsync.source_api_associations
WHERE
Identifier = '{{ association_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the source_api_associations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
appsync:AssociateSourceGraphqlApi,
appsync:AssociateMergedGraphqlApi,
appsync:GetSourceApiAssociation
appsync:GetSourceApiAssociation,
appsync:ListSourceApiAssociations
appsync:GetSourceApiAssociation,
appsync:UpdateSourceApiAssociation,
appsync:GetSourceApiAssociation
appsync:GetSourceApiAssociation,
appsync:DisassociateSourceGraphqlApi,
appsync:DisassociateMergedGraphqlApi,
appsync:ListSourceApiAssociations
appsync:ListSourceApiAssociations