create_lookup
¶
create_lookup(
name: LookupName,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
description: Optional[LookupDescription] = None,
body: Optional[LookupBody] = None,
query_id: Optional[LookupQueryId] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateLookupResponse
Creates a lookup table from CSV content. A lookup table is a named set of rows that telemetry queries can join against. Every column is stored as a string. Lookup table names must be unique within the account and Region.
Parameters:
-
name(LookupName) –The name of the lookup table. Lookup table names must be unique within the account and Region.
-
description(Optional[LookupDescription], default:None) –A description of the lookup table. An empty string is equivalent to omitting this field: the table is created with no description.
-
body(Optional[LookupBody], default:None) –The CSV content of the lookup table. Exactly one of body and queryId must be specified.
-
query_id(Optional[LookupQueryId], default:None) –The identifier of a query whose results become the lookup table's content.
-
kms_key_arn(Optional[KmsKeyArn], default:None) –The ARN of a customer managed KMS key used to encrypt the lookup table's content.
-
tags(Optional[TagMap], default:None) –Resource tags.
-
client_token(Optional[ClientToken], default:None) –Idempotency token for safe retries. Retrying with the same token returns the original lookup table instead of creating a duplicate.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ServiceQuotaExceededException–A service quota was exceeded.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a lookup table The following example creates a lookup table from CSV content. The first CSV record is the header and supplies the column names. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.create_lookup(name='service_owners', description='Owning team per service', body='service,team\ncheckout,payments\nsearch,discovery\n', tags={'Team': 'observability'}, client_token='3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | |