From 3b2fc5b24f4006221a6f043d3450f882c3c6349c Mon Sep 17 00:00:00 2001 From: ParthaI <47887552+ParthaI@users.noreply.github.com> Date: Thu, 27 Jan 2022 03:33:38 +0530 Subject: [PATCH] Rename column `grant_id` to `id` in `turbot_grant` table closes #32 (#33) --- turbot/table_turbot_grant.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turbot/table_turbot_grant.go b/turbot/table_turbot_grant.go index 206e435..ed5075d 100644 --- a/turbot/table_turbot_grant.go +++ b/turbot/table_turbot_grant.go @@ -17,13 +17,13 @@ func tableTurbotGrant(ctx context.Context) *plugin.Table { Description: "All grants of resources by Turbot.", List: &plugin.ListConfig{ KeyColumns: []*plugin.KeyColumn{ - {Name: "grant_id", Require: plugin.Optional}, + {Name: "id", Require: plugin.Optional}, }, Hydrate: listGrants, }, Columns: []*plugin.Column{ // Top columns - {Name: "grant_id", Type: proto.ColumnType_INT, Transform: transform.FromField("Turbot.ID"), Description: "Unique identifier of the grant."}, + {Name: "id", Type: proto.ColumnType_INT, Transform: transform.FromField("Turbot.ID"), Description: "Unique identifier of the grant."}, {Name: "resource_id", Type: proto.ColumnType_INT, Transform: transform.FromField("Resource.Turbot.ID"), Description: "Unique identifier of the resource."}, {Name: "identity_status", Type: proto.ColumnType_STRING, Transform: transform.FromField("Identity.Status"), Description: "Status of the identity."}, {Name: "identity_display_name", Type: proto.ColumnType_STRING, Transform: transform.FromField("Identity.DisplayName"), Description: "Display name of the identity."}, @@ -131,7 +131,7 @@ func listGrants(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) } // Additional filters - if quals["grant_id"] != nil { + if quals["id"] != nil { filters = append(filters, fmt.Sprintf("id:%s", getQualListValues(ctx, quals, "id", "int64"))) }