@Override
    public ResourceSchema after(Context context, ResourceSchema resourceSchema) {
        ResourceShape resourceShape = context.getResource();
        if (!resourceShape.hasTrait(TaggableTrait.ID)) {
            return resourceSchema;
        }

        Model model = context.getModel();
        ServiceShape service = context.getService();
        AwsTagIndex tagsIndex = AwsTagIndex.of(model);
        TaggableTrait trait = resourceShape.expectTrait(TaggableTrait.class);
        Tagging.Builder tagBuilder = Tagging.builder()
                .taggable(true)
                .tagOnCreate(tagsIndex.isResourceTagOnCreate(resourceShape.getId()))
                .tagProperty("/properties/" + getTagMemberName(context.getConfig(), resourceShape))
                .cloudFormationSystemTags(!trait.getDisableSystemTags())
                // Unless tag-on-create is supported, Smithy tagging means
                .tagUpdatable(true);

        // Add the tagging permissions based on the defined tagging operations.
        tagsIndex.getTagResourceOperation(resourceShape)
                .map(operation -> getPermissionsEntriesForOperation(model, service, operation))
                .ifPresent(tagBuilder::addPermissions);
        tagsIndex.getListTagsForResourceOperation(resourceShape)
                .map(operation -> getPermissionsEntriesForOperation(model, service, operation))
                .ifPresent(tagBuilder::addPermissions);
        tagsIndex.getUntagResourceOperation(resourceShape)
                .map(operation -> getPermissionsEntriesForOperation(model, service, operation))
                .ifPresent(tagBuilder::addPermissions);

        return resourceSchema.toBuilder().tagging(tagBuilder.build()).build();
    }
Generates the resource's Tagging configuration based on the AwsTagIndex, including
the tagging property and operations that interact with tags.

@see <a href="https://github.com/aws-cloudformation/cloudformation-cli/blob/master/src/rpdk/core/data/schema/provider.definition.schema.v1.json#L198">permissions property definition</a>
smithy-aws-cloudformation/src/main/java/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/TaggingMapper.java