schema_mappings
Creates, updates, deletes or gets a schema_mapping resource or lists schema_mappings in a region
Overview
| Name | schema_mappings |
| Type | Resource |
| Description | SchemaMapping defined in AWS Entity Resolution service |
| Id | awscc.entityresolution.schema_mappings |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
schema_name | string | The name of the SchemaMapping |
description | string | The description of the SchemaMapping |
mapped_input_fields | array | The SchemaMapping attributes input |
tags | array | |
schema_arn | string | The SchemaMapping arn associated with the Schema |
created_at | string | The time of this SchemaMapping got created |
updated_at | string | The time of this SchemaMapping got last updated at |
has_workflows | boolean | The boolean value that indicates whether or not a SchemaMapping has MatchingWorkflows that are associated with |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
schema_name | string | The name of the SchemaMapping |
region | string | AWS region. |
For more information, see AWS::EntityResolution::SchemaMapping.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | schema_mappings | INSERT | SchemaName, MappedInputFields, region |
delete_resource | schema_mappings | DELETE | Identifier, region |
update_resource | schema_mappings | UPDATE | Identifier, PatchDocument, region |
list_resources | schema_mappings_list_only | SELECT | region |
get_resource | schema_mappings | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual schema_mapping.
SELECT
region,
schema_name,
description,
mapped_input_fields,
tags,
schema_arn,
created_at,
updated_at,
has_workflows
FROM awscc.entityresolution.schema_mappings
WHERE
region = 'us-east-1' AND
Identifier = '{{ schema_name }}';
Lists all schema_mappings in a region.
SELECT
region,
schema_name
FROM awscc.entityresolution.schema_mappings_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new schema_mapping resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.entityresolution.schema_mappings (
SchemaName,
MappedInputFields,
region
)
SELECT
'{{ schema_name }}',
'{{ mapped_input_fields }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.entityresolution.schema_mappings (
SchemaName,
Description,
MappedInputFields,
Tags,
region
)
SELECT
'{{ schema_name }}',
'{{ description }}',
'{{ mapped_input_fields }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: schema_mapping
props:
- name: schema_name
value: '{{ schema_name }}'
- name: description
value: '{{ description }}'
- name: mapped_input_fields
value:
- field_name: '{{ field_name }}'
type: '{{ type }}'
sub_type: '{{ sub_type }}'
group_name: null
match_key: null
hashed: '{{ hashed }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a schema_mapping resource, using stack-deploy.
/*+ update */
UPDATE awscc.entityresolution.schema_mappings
SET PatchDocument = string('{{ {
"Description": description,
"MappedInputFields": mapped_input_fields,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ schema_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.entityresolution.schema_mappings
WHERE
Identifier = '{{ schema_name }}' AND
region = 'us-east-1';
Permissions
To operate on the schema_mappings resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
entityresolution:CreateSchemaMapping,
entityresolution:GetSchemaMapping,
entityresolution:TagResource
entityresolution:GetSchemaMapping,
entityresolution:ListTagsForResource
entityresolution:DeleteSchemaMapping,
entityresolution:GetSchemaMapping
entityresolution:GetSchemaMapping,
entityresolution:UpdateSchemaMapping,
entityresolution:ListTagsForResource,
entityresolution:TagResource,
entityresolution:UntagResource
entityresolution:ListSchemaMappings