|
| 1 | +package ccmcommons |
| 2 | + |
| 3 | +var OutputFields = []map[string]string{ |
| 4 | + { |
| 5 | + "fieldId": "region", |
| 6 | + "fieldName": "Region", |
| 7 | + "identifier": "COMMON", |
| 8 | + "identifierName": "Common", |
| 9 | + }, |
| 10 | + { |
| 11 | + "fieldId": "awsUsageaccountid", |
| 12 | + "fieldName": "Account", |
| 13 | + "identifier": "AWS", |
| 14 | + "identifierName": "AWS", |
| 15 | + }, |
| 16 | + { |
| 17 | + "fieldId": "awsServicecode", |
| 18 | + "fieldName": "Service", |
| 19 | + "identifier": "AWS", |
| 20 | + "identifierName": "AWS", |
| 21 | + }, |
| 22 | + { |
| 23 | + "fieldId": "awsBillingEntity", |
| 24 | + "fieldName": "Billing Entity", |
| 25 | + "identifier": "AWS", |
| 26 | + "identifierName": "AWS", |
| 27 | + }, |
| 28 | + { |
| 29 | + "fieldId": "awsInstancetype", |
| 30 | + "fieldName": "Instance Type", |
| 31 | + "identifier": "AWS", |
| 32 | + "identifierName": "AWS", |
| 33 | + }, |
| 34 | + { |
| 35 | + "fieldId": "awsLineItemType", |
| 36 | + "fieldName": "Line Item Type", |
| 37 | + "identifier": "AWS", |
| 38 | + "identifierName": "AWS", |
| 39 | + }, |
| 40 | + { |
| 41 | + "fieldId": "awspayeraccountid", |
| 42 | + "fieldName": "Payer Account", |
| 43 | + "identifier": "AWS", |
| 44 | + "identifierName": "AWS", |
| 45 | + }, |
| 46 | + { |
| 47 | + "fieldId": "awsUsageType", |
| 48 | + "fieldName": "Usage Type", |
| 49 | + "identifier": "AWS", |
| 50 | + "identifierName": "AWS", |
| 51 | + }, |
| 52 | + { |
| 53 | + "fieldId": "cloudProvider", |
| 54 | + "fieldName": "Cloud Provider", |
| 55 | + "identifier": "COMMON", |
| 56 | + "identifierName": "Common", |
| 57 | + }, |
| 58 | + { |
| 59 | + "fieldId": "none", |
| 60 | + "fieldName": "None", |
| 61 | + "identifier": "COMMON", |
| 62 | + "identifierName": "Common", |
| 63 | + }, |
| 64 | + { |
| 65 | + "fieldId": "product", |
| 66 | + "fieldName": "Product", |
| 67 | + "identifier": "COMMON", |
| 68 | + "identifierName": "Common", |
| 69 | + }, |
| 70 | +} |
| 71 | + |
| 72 | +var OutputKeyValueFields = []map[string]string{ |
| 73 | + { |
| 74 | + "fieldId": "labels.value", |
| 75 | + "fieldName": "", // Label name |
| 76 | + "identifier": "LABEL", |
| 77 | + "identifierName": "Label", |
| 78 | + }, |
| 79 | + { |
| 80 | + "fieldId": "labels.value", |
| 81 | + "fieldName": "", // Label name |
| 82 | + "identifier": "LABEL_V2", |
| 83 | + "identifierName": "Label V2", |
| 84 | + }, |
| 85 | + { |
| 86 | + "fieldId": "", // Cost Category Id |
| 87 | + "fieldName": "", // Cost Category Name |
| 88 | + "identifier": "BUSINESS_MAPPING", |
| 89 | + "identifierName": "Cost Categories", |
| 90 | + }, |
| 91 | +} |
| 92 | + |
| 93 | +var OutputKeyFields = []map[string]string{ |
| 94 | + { |
| 95 | + "fieldId": "labels.key", |
| 96 | + "fieldName": "", |
| 97 | + "identifier": "LABEL", |
| 98 | + }, |
| 99 | + { |
| 100 | + "fieldId": "labels.key2", |
| 101 | + "fieldName": "", |
| 102 | + "identifier": "LABEL_V2", |
| 103 | + }, |
| 104 | +} |
| 105 | + |
| 106 | +var DefaultGroupBy = []map[string]any{ |
| 107 | + { |
| 108 | + "entityGroupBy": map[string]any{ |
| 109 | + "fieldId": "product", |
| 110 | + "fieldName": "Product", |
| 111 | + "identifier": "COMMON", |
| 112 | + "identifierName": "Common", |
| 113 | + }, |
| 114 | + }, |
| 115 | + } |
| 116 | + |
| 117 | +var ConditionFieldDescriptions = []map[string]string{ |
| 118 | + { |
| 119 | + "fieldId": "region", |
| 120 | + "description": "Use this field to create a view filter rule to filter by cloud region.", |
| 121 | + }, |
| 122 | + { |
| 123 | + "fieldId": "awsUsageaccountid", |
| 124 | + "description": "Use this field to create a view filter rule to filter by AWS usage account ID.", |
| 125 | + }, |
| 126 | + { |
| 127 | + "fieldId": "awsServicecode", |
| 128 | + "description": "Use this field to create a view filter rule to filter by AWS service code.", |
| 129 | + }, |
| 130 | + { |
| 131 | + "fieldId": "awsBillingEntity", |
| 132 | + "description": "Use this field to create a view filter rule to filter by AWS billing entity.", |
| 133 | + }, |
| 134 | + { |
| 135 | + "fieldId": "awsInstancetype", |
| 136 | + "description": "Use this field to create a view filter rule to filter by AWS instance type.", |
| 137 | + }, |
| 138 | + { |
| 139 | + "fieldId": "awsLineItemType", |
| 140 | + "description": "Use this field to create a view filter rule to filter by AWS line item type.", |
| 141 | + }, |
| 142 | + { |
| 143 | + "fieldId": "awspayeraccountid", |
| 144 | + "description": "Use this field to create a view filter rule to filter by AWS payer account ID.", |
| 145 | + }, |
| 146 | + { |
| 147 | + "fieldId": "awsUsageType", |
| 148 | + "description": "Use this field to create a view filter rule to filter by AWS usage type.", |
| 149 | + }, |
| 150 | + { |
| 151 | + "fieldId": "cloudprovider", |
| 152 | + "description": "use this field to create a view filter rule to filter by cloud provider.", |
| 153 | + }, |
| 154 | + { |
| 155 | + "fieldId": "none", |
| 156 | + "description": "use this field to create a view filter rule with no filter or grouping applied.", |
| 157 | + }, |
| 158 | + { |
| 159 | + "fieldId": "product", |
| 160 | + "description": "use this field to create a view filter rule to filter by product.", |
| 161 | + }, |
| 162 | +} |
| 163 | + |
| 164 | +var labelDescription = ` |
| 165 | +Use this field to create a view filter rule to filter by Label. |
| 166 | +Use the following Map format: |
| 167 | +{ |
| 168 | + "field1_id": "label", |
| 169 | + "field2_id": Select a value from the list returned by the 'ccm_filter_values' tool with field_type set to 'label' |
| 170 | +} |
| 171 | +` |
| 172 | + |
| 173 | +var labelV2Description = ` |
| 174 | +Use this field to create a view filter rule to filter by Label V2. |
| 175 | +Use the following Map format: |
| 176 | +{ |
| 177 | + "field1_id": "label_v2", |
| 178 | + "field2_id": Select a value from the list returned by the 'ccm_filter_values' tool with field_type set to 'label_v2' |
| 179 | +} |
| 180 | +` |
| 181 | +var costCategoryDescription = ` |
| 182 | +Use this field to create a view filter rule to filter by Cost Category. |
| 183 | +Use the following Map format: |
| 184 | +{ |
| 185 | + "field1_id": "business_mapping", |
| 186 | + "field2_id": "Select a value from the 'uuid' field returned by the tool list_ccm_cost_categories_detail.", |
| 187 | + "field3_id": Select the value from 'name' field corresonding to the 'uuid' field returned by the list_ccm_cost_categories_detail used in 'field_id' |
| 188 | +} |
| 189 | +` |
| 190 | + |
| 191 | +var ConditionKeyValueFieldDescriptions = []map[string]string{ |
| 192 | + { |
| 193 | + "fieldId": "label", |
| 194 | + "description": labelDescription, |
| 195 | + }, |
| 196 | + { |
| 197 | + "fieldId": "label_v2", |
| 198 | + "description": labelV2Description, |
| 199 | + }, |
| 200 | + { |
| 201 | + "fieldId": "business_mapping", |
| 202 | + "description": costCategoryDescription, |
| 203 | + }, |
| 204 | +} |
0 commit comments