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 = '{{ region }}' AND
Identifier = '{{ schema_name }}';
Lists all schema_mappings in a region.
SELECT
region,
schema_name
FROM awscc.entityresolution.schema_mappings_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.entityresolution.schema_mappings (
SchemaName,
Description,
MappedInputFields,
Tags,
region
)
SELECT
'{{ schema_name }}',
'{{ description }}',
'{{ mapped_input_fields }}',
'{{ tags }}',
'{{ 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: 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.entityresolution.schema_mappings
WHERE
Identifier = '{{ schema_name }}' 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 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