|
| 1 | +# Copyright The OpenTelemetry Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | + |
| 16 | +from enum import Enum |
| 17 | + |
| 18 | +AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions" |
| 19 | +""" |
| 20 | +The JSON-serialized value of each item in the `AttributeDefinitions` request field. |
| 21 | +""" |
| 22 | + |
| 23 | +AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get" |
| 24 | +""" |
| 25 | +The value of the `AttributesToGet` request parameter. |
| 26 | +""" |
| 27 | + |
| 28 | +AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read" |
| 29 | +""" |
| 30 | +The value of the `ConsistentRead` request parameter. |
| 31 | +""" |
| 32 | + |
| 33 | +AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity" |
| 34 | +""" |
| 35 | +The JSON-serialized value of each item in the `ConsumedCapacity` response field. |
| 36 | +""" |
| 37 | + |
| 38 | +AWS_DYNAMODB_COUNT = "aws.dynamodb.count" |
| 39 | +""" |
| 40 | +The value of the `Count` response parameter. |
| 41 | +""" |
| 42 | + |
| 43 | +AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table" |
| 44 | +""" |
| 45 | +The value of the `ExclusiveStartTableName` request parameter. |
| 46 | +""" |
| 47 | + |
| 48 | +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = ( |
| 49 | + "aws.dynamodb.global_secondary_index_updates" |
| 50 | +) |
| 51 | +""" |
| 52 | +The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. |
| 53 | +""" |
| 54 | + |
| 55 | +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes" |
| 56 | +""" |
| 57 | +The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. |
| 58 | +""" |
| 59 | + |
| 60 | +AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name" |
| 61 | +""" |
| 62 | +The value of the `IndexName` request parameter. |
| 63 | +""" |
| 64 | + |
| 65 | +AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics" |
| 66 | +""" |
| 67 | +The JSON-serialized value of the `ItemCollectionMetrics` response field. |
| 68 | +""" |
| 69 | + |
| 70 | +AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit" |
| 71 | +""" |
| 72 | +The value of the `Limit` request parameter. |
| 73 | +""" |
| 74 | + |
| 75 | +AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes" |
| 76 | +""" |
| 77 | +The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. |
| 78 | +""" |
| 79 | + |
| 80 | +AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection" |
| 81 | +""" |
| 82 | +The value of the `ProjectionExpression` request parameter. |
| 83 | +""" |
| 84 | + |
| 85 | +AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = ( |
| 86 | + "aws.dynamodb.provisioned_read_capacity" |
| 87 | +) |
| 88 | +""" |
| 89 | +The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. |
| 90 | +""" |
| 91 | + |
| 92 | +AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = ( |
| 93 | + "aws.dynamodb.provisioned_write_capacity" |
| 94 | +) |
| 95 | +""" |
| 96 | +The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 97 | +""" |
| 98 | + |
| 99 | +AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward" |
| 100 | +""" |
| 101 | +The value of the `ScanIndexForward` request parameter. |
| 102 | +""" |
| 103 | + |
| 104 | +AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count" |
| 105 | +""" |
| 106 | +The value of the `ScannedCount` response parameter. |
| 107 | +""" |
| 108 | + |
| 109 | +AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment" |
| 110 | +""" |
| 111 | +The value of the `Segment` request parameter. |
| 112 | +""" |
| 113 | + |
| 114 | +AWS_DYNAMODB_SELECT = "aws.dynamodb.select" |
| 115 | +""" |
| 116 | +The value of the `Select` request parameter. |
| 117 | +""" |
| 118 | + |
| 119 | +AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count" |
| 120 | +""" |
| 121 | +The number of items in the `TableNames` response parameter. |
| 122 | +""" |
| 123 | + |
| 124 | +AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names" |
| 125 | +""" |
| 126 | +The keys in the `RequestItems` object field. |
| 127 | +""" |
| 128 | + |
| 129 | +AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments" |
| 130 | +""" |
| 131 | +The value of the `TotalSegments` request parameter. |
| 132 | +""" |
| 133 | + |
| 134 | +AWS_ECS_CLUSTER_ARN = "aws.ecs.cluster.arn" |
| 135 | +""" |
| 136 | +The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). |
| 137 | +""" |
| 138 | + |
| 139 | +AWS_ECS_CONTAINER_ARN = "aws.ecs.container.arn" |
| 140 | +""" |
| 141 | +The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). |
| 142 | +""" |
| 143 | + |
| 144 | +AWS_ECS_LAUNCHTYPE = "aws.ecs.launchtype" |
| 145 | +""" |
| 146 | +The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. |
| 147 | +""" |
| 148 | + |
| 149 | +AWS_ECS_TASK_ARN = "aws.ecs.task.arn" |
| 150 | +""" |
| 151 | +The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). |
| 152 | +""" |
| 153 | + |
| 154 | +AWS_ECS_TASK_FAMILY = "aws.ecs.task.family" |
| 155 | +""" |
| 156 | +The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. |
| 157 | +""" |
| 158 | + |
| 159 | +AWS_ECS_TASK_ID = "aws.ecs.task.id" |
| 160 | +""" |
| 161 | +The ID of a running ECS task. The ID MUST be extracted from `task.arn`. |
| 162 | +""" |
| 163 | + |
| 164 | +AWS_ECS_TASK_REVISION = "aws.ecs.task.revision" |
| 165 | +""" |
| 166 | +The revision for the task definition used to create the ECS task. |
| 167 | +""" |
| 168 | + |
| 169 | +AWS_EKS_CLUSTER_ARN = "aws.eks.cluster.arn" |
| 170 | +""" |
| 171 | +The ARN of an EKS cluster. |
| 172 | +""" |
| 173 | + |
| 174 | +AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn" |
| 175 | +""" |
| 176 | +The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). |
| 177 | +Note: This may be different from `cloud.resource_id` if an alias is involved. |
| 178 | +""" |
| 179 | + |
| 180 | +AWS_LOG_GROUP_ARNS = "aws.log.group.arns" |
| 181 | +""" |
| 182 | +The Amazon Resource Name(s) (ARN) of the AWS log group(s). |
| 183 | +Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). |
| 184 | +""" |
| 185 | + |
| 186 | +AWS_LOG_GROUP_NAMES = "aws.log.group.names" |
| 187 | +""" |
| 188 | +The name(s) of the AWS log group(s) an application is writing to. |
| 189 | +Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. |
| 190 | +""" |
| 191 | + |
| 192 | +AWS_LOG_STREAM_ARNS = "aws.log.stream.arns" |
| 193 | +""" |
| 194 | +The ARN(s) of the AWS log stream(s). |
| 195 | +Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. |
| 196 | +""" |
| 197 | + |
| 198 | +AWS_LOG_STREAM_NAMES = "aws.log.stream.names" |
| 199 | +""" |
| 200 | +The name(s) of the AWS log stream(s) an application is writing to. |
| 201 | +""" |
| 202 | + |
| 203 | +AWS_REQUEST_ID = "aws.request_id" |
| 204 | +""" |
| 205 | +The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. |
| 206 | +""" |
| 207 | + |
| 208 | +AWS_S3_BUCKET = "aws.s3.bucket" |
| 209 | +""" |
| 210 | +The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. |
| 211 | +Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. |
| 212 | + This applies to almost all S3 operations except `list-buckets`. |
| 213 | +""" |
| 214 | + |
| 215 | +AWS_S3_COPY_SOURCE = "aws.s3.copy_source" |
| 216 | +""" |
| 217 | +The source object (in the form `bucket`/`key`) for the copy operation. |
| 218 | +Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter |
| 219 | + of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). |
| 220 | + This applies in particular to the following operations: |
| 221 | +
|
| 222 | + - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 223 | + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). |
| 224 | +""" |
| 225 | + |
| 226 | +AWS_S3_DELETE = "aws.s3.delete" |
| 227 | +""" |
| 228 | +The delete request container that specifies the objects to be deleted. |
| 229 | +Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. |
| 230 | + The `delete` attribute corresponds to the `--delete` parameter of the |
| 231 | + [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). |
| 232 | +""" |
| 233 | + |
| 234 | +AWS_S3_KEY = "aws.s3.key" |
| 235 | +""" |
| 236 | +The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. |
| 237 | +Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter. |
| 238 | + This applies in particular to the following operations: |
| 239 | +
|
| 240 | + - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 241 | + - [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) |
| 242 | + - [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) |
| 243 | + - [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) |
| 244 | + - [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) |
| 245 | + - [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) |
| 246 | + - [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) |
| 247 | + - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 248 | + - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 249 | + - [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) |
| 250 | + - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 251 | + - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 252 | + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). |
| 253 | +""" |
| 254 | + |
| 255 | +AWS_S3_PART_NUMBER = "aws.s3.part_number" |
| 256 | +""" |
| 257 | +The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. |
| 258 | +Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 259 | + and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations. |
| 260 | + The `part_number` attribute corresponds to the `--part-number` parameter of the |
| 261 | + [upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). |
| 262 | +""" |
| 263 | + |
| 264 | +AWS_S3_UPLOAD_ID = "aws.s3.upload_id" |
| 265 | +""" |
| 266 | +Upload ID that identifies the multipart upload. |
| 267 | +Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter |
| 268 | + of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations. |
| 269 | + This applies in particular to the following operations: |
| 270 | +
|
| 271 | + - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 272 | + - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 273 | + - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 274 | + - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 275 | + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html). |
| 276 | +""" |
| 277 | + |
| 278 | + |
| 279 | +class AwsEcsLaunchtypeValues(Enum): |
| 280 | + EC2 = "ec2" |
| 281 | + """ec2.""" |
| 282 | + FARGATE = "fargate" |
| 283 | + """fargate.""" |
0 commit comments