-
Notifications
You must be signed in to change notification settings - Fork 1
Add table turbot_policy_value closes #14 #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Please see comments, thanks!
docs/tables/turbot_policy_value.md
Outdated
@@ -0,0 +1,93 @@ | |||
# Table: turbot_resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Table: turbot_resource | |
# Table: turbot_policy_value |
docs/tables/turbot_policy_value.md
Outdated
@@ -0,0 +1,93 @@ | |||
# Table: turbot_resource | |||
|
|||
Resources in Turbot represent cloud configuration items such as users, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the description.
docs/tables/turbot_policy_value.md
Outdated
Resources in Turbot represent cloud configuration items such as users, | ||
networks, servers, etc. | ||
|
||
It is recommended that queries to this table should include (usually in the `where` clause) at least one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is relevant to this table?
docs/tables/turbot_policy_value.md
Outdated
It is recommended that queries to this table should include (usually in the `where` clause) at least one | ||
of these columns: `id`, `resource_type_id`, `resource_type_uri` or `filter`. | ||
|
||
A Policy Value is the effective policy setting on an instance of a resource type. Every resource that is targeted by a given policy setting will have its own value for that policy, which will be the resultant calculated policy for the "winning" policy in the hierarchy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Policy Value is the effective policy setting on an instance of a resource type. Every resource that is targeted by a given policy setting will have its own value for that policy, which will be the resultant calculated policy for the "winning" policy in the hierarchy. | |
A policy value is the effective policy setting on an instance of a resource type. Every resource that is targeted by a given policy setting will have its own value for that policy, which will be the resultant calculated policy for the "winning" policy in the hierarchy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
docs/tables/turbot_policy_value.md
Outdated
|
||
## Examples | ||
|
||
### List policy values by policy type id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### List policy values by policy type id | |
### List policy values by policy type ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
docs/tables/turbot_policy_value.md
Outdated
filter = 'policyTypeId:123456789'; | ||
``` | ||
|
||
### Extract all policy values from Turbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we should include this example - policy values are set for every policy type on every applicable resource. I find it extremely rare that I'd want to see all policy values (policy settings or resources make more sense).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this example
turbot/table_turbot_policy_value.go
Outdated
{Name: "policy_type_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Type.Title"), Description: "Title of the policy type."}, | ||
{Name: "poliy_type_trunk_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Type.Trunk.Title"), Description: "Title with full path of the policy type."}, | ||
{Name: "is_default", Type: proto.ColumnType_BOOL, Transform: transform.FromField("Default"), Description: "Defines the policy value is default or not."}, | ||
{Name: "is_calculated", Type: proto.ColumnType_BOOL, Description: "True if this is a policy setting will be calculated for each value."}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to is_default
, and other columns in this table, the description does not have correct grammar, what description does our GraphQL API have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description for is_calculated is If true this value is derived from calculated setting inputs e.g. templateInput and template.
in GraphQL API.
Similarly for is_default it is If true this value is derived from the default value of the type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Let's copy those descriptions, they read OK in a description context here, and being able to re-use them is an easy way to get accurate, grammatically correct descriptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the description for is_default
and is_calculated
columns
turbot/table_turbot_policy_value.go
Outdated
{Name: "id", Type: proto.ColumnType_INT, Transform: transform.FromField("Turbot.ID"), Description: "Unique identifier of the policy value."}, | ||
{Name: "policy_type_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Type.Title"), Description: "Title of the policy type."}, | ||
{Name: "poliy_type_trunk_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Type.Trunk.Title"), Description: "Title with full path of the policy type."}, | ||
{Name: "is_default", Type: proto.ColumnType_BOOL, Transform: transform.FromField("Default"), Description: "Defines the policy value is default or not."}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description does not have correct grammar, what description does our GraphQL API have?
Example query results
Results