capo-codeguruprofiler 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. capo_codeguruprofiler/__init__.py +74 -0
  2. capo_codeguruprofiler/_async.py +25 -0
  3. capo_codeguruprofiler/_auth/_identity.py +16 -0
  4. capo_codeguruprofiler/_auth/_providers.py +886 -0
  5. capo_codeguruprofiler/_auth/_signers.py +88 -0
  6. capo_codeguruprofiler/_auth/_sigv4.py +434 -0
  7. capo_codeguruprofiler/_auth/_zapros_handler.py +80 -0
  8. capo_codeguruprofiler/_iter.py +113 -0
  9. capo_codeguruprofiler/_operations/code_guru_profiler/add_notification_channels.py +185 -0
  10. capo_codeguruprofiler/_operations/code_guru_profiler/batch_get_frame_metric_data.py +202 -0
  11. capo_codeguruprofiler/_operations/code_guru_profiler/configure_agent.py +177 -0
  12. capo_codeguruprofiler/_operations/code_guru_profiler/create_profiling_group.py +180 -0
  13. capo_codeguruprofiler/_operations/code_guru_profiler/delete_profiling_group.py +165 -0
  14. capo_codeguruprofiler/_operations/code_guru_profiler/describe_profiling_group.py +169 -0
  15. capo_codeguruprofiler/_operations/code_guru_profiler/get_findings_report_account_summary.py +164 -0
  16. capo_codeguruprofiler/_operations/code_guru_profiler/get_notification_configuration.py +168 -0
  17. capo_codeguruprofiler/_operations/code_guru_profiler/get_policy.py +161 -0
  18. capo_codeguruprofiler/_operations/code_guru_profiler/get_profile.py +196 -0
  19. capo_codeguruprofiler/_operations/code_guru_profiler/get_recommendations.py +196 -0
  20. capo_codeguruprofiler/_operations/code_guru_profiler/list_findings_reports.py +197 -0
  21. capo_codeguruprofiler/_operations/code_guru_profiler/list_profile_times.py +196 -0
  22. capo_codeguruprofiler/_operations/code_guru_profiler/list_profiling_groups.py +160 -0
  23. capo_codeguruprofiler/_operations/code_guru_profiler/list_tags_for_resource.py +158 -0
  24. capo_codeguruprofiler/_operations/code_guru_profiler/post_agent_profile.py +168 -0
  25. capo_codeguruprofiler/_operations/code_guru_profiler/put_permission.py +182 -0
  26. capo_codeguruprofiler/_operations/code_guru_profiler/remove_notification_channel.py +169 -0
  27. capo_codeguruprofiler/_operations/code_guru_profiler/remove_permission.py +175 -0
  28. capo_codeguruprofiler/_operations/code_guru_profiler/submit_feedback.py +170 -0
  29. capo_codeguruprofiler/_operations/code_guru_profiler/tag_resource.py +158 -0
  30. capo_codeguruprofiler/_operations/code_guru_profiler/untag_resource.py +156 -0
  31. capo_codeguruprofiler/_operations/code_guru_profiler/update_profiling_group.py +181 -0
  32. capo_codeguruprofiler/_pagination.py +21 -0
  33. capo_codeguruprofiler/_protocol/__init__.py +1 -0
  34. capo_codeguruprofiler/_protocol/errors.py +93 -0
  35. capo_codeguruprofiler/_protocol/eventstream.py +238 -0
  36. capo_codeguruprofiler/_protocol/serialize.py +47 -0
  37. capo_codeguruprofiler/_protocol/xml.py +33 -0
  38. capo_codeguruprofiler/_resources/code_guru_profiler/profiling_group.py +2257 -0
  39. capo_codeguruprofiler/_rule_engine/__init__.py +0 -0
  40. capo_codeguruprofiler/_rule_engine/_aws_partition.py +160 -0
  41. capo_codeguruprofiler/_rule_engine/_endpoint_rule_set.py +138 -0
  42. capo_codeguruprofiler/_rule_engine/_endpoint_runtime.py +389 -0
  43. capo_codeguruprofiler/_services/_aws_config.py +160 -0
  44. capo_codeguruprofiler/_services/_pipeline.py +198 -0
  45. capo_codeguruprofiler/_services/async_code_guru_profiler.py +377 -0
  46. capo_codeguruprofiler/_services/code_guru_profiler.py +373 -0
  47. capo_codeguruprofiler/errors/__init__.py +35 -0
  48. capo_codeguruprofiler/errors/_base.py +94 -0
  49. capo_codeguruprofiler/errors/conflict_exception.py +45 -0
  50. capo_codeguruprofiler/errors/internal_server_exception.py +47 -0
  51. capo_codeguruprofiler/errors/resource_not_found_exception.py +47 -0
  52. capo_codeguruprofiler/errors/service_quota_exceeded_exception.py +49 -0
  53. capo_codeguruprofiler/errors/throttling_exception.py +45 -0
  54. capo_codeguruprofiler/errors/validation_exception.py +45 -0
  55. capo_codeguruprofiler/py.typed +0 -0
  56. capo_codeguruprofiler/types/_prelude/blob.py +12 -0
  57. capo_codeguruprofiler/types/_prelude/timestamp.py +17 -0
  58. capo_codeguruprofiler/types/action_group.py +5 -0
  59. capo_codeguruprofiler/types/add_notification_channels_request.py +44 -0
  60. capo_codeguruprofiler/types/add_notification_channels_response.py +42 -0
  61. capo_codeguruprofiler/types/agent_configuration.py +58 -0
  62. capo_codeguruprofiler/types/agent_orchestration_config.py +28 -0
  63. capo_codeguruprofiler/types/agent_parameter_field.py +5 -0
  64. capo_codeguruprofiler/types/agent_parameters.py +27 -0
  65. capo_codeguruprofiler/types/agent_profile.py +15 -0
  66. capo_codeguruprofiler/types/aggregated_profile.py +15 -0
  67. capo_codeguruprofiler/types/aggregated_profile_time.py +45 -0
  68. capo_codeguruprofiler/types/aggregation_period.py +5 -0
  69. capo_codeguruprofiler/types/anomalies.py +29 -0
  70. capo_codeguruprofiler/types/anomaly.py +62 -0
  71. capo_codeguruprofiler/types/anomaly_instance.py +77 -0
  72. capo_codeguruprofiler/types/anomaly_instance_id.py +5 -0
  73. capo_codeguruprofiler/types/anomaly_instances.py +31 -0
  74. capo_codeguruprofiler/types/batch_get_frame_metric_data_request.py +56 -0
  75. capo_codeguruprofiler/types/batch_get_frame_metric_data_response.py +130 -0
  76. capo_codeguruprofiler/types/channel.py +58 -0
  77. capo_codeguruprofiler/types/channel_id.py +5 -0
  78. capo_codeguruprofiler/types/channel_uri.py +6 -0
  79. capo_codeguruprofiler/types/channels.py +29 -0
  80. capo_codeguruprofiler/types/client_token.py +5 -0
  81. capo_codeguruprofiler/types/compute_platform.py +5 -0
  82. capo_codeguruprofiler/types/configure_agent_request.py +50 -0
  83. capo_codeguruprofiler/types/configure_agent_response.py +43 -0
  84. capo_codeguruprofiler/types/create_profiling_group_request.py +81 -0
  85. capo_codeguruprofiler/types/create_profiling_group_response.py +45 -0
  86. capo_codeguruprofiler/types/delete_profiling_group_request.py +26 -0
  87. capo_codeguruprofiler/types/delete_profiling_group_response.py +18 -0
  88. capo_codeguruprofiler/types/describe_profiling_group_request.py +26 -0
  89. capo_codeguruprofiler/types/describe_profiling_group_response.py +45 -0
  90. capo_codeguruprofiler/types/event_publisher.py +5 -0
  91. capo_codeguruprofiler/types/event_publishers.py +19 -0
  92. capo_codeguruprofiler/types/feedback_type.py +5 -0
  93. capo_codeguruprofiler/types/findings_report_id.py +5 -0
  94. capo_codeguruprofiler/types/findings_report_summaries.py +35 -0
  95. capo_codeguruprofiler/types/findings_report_summary.py +73 -0
  96. capo_codeguruprofiler/types/fleet_instance_id.py +5 -0
  97. capo_codeguruprofiler/types/frame_metric.py +56 -0
  98. capo_codeguruprofiler/types/frame_metric_data.py +33 -0
  99. capo_codeguruprofiler/types/frame_metric_datum.py +56 -0
  100. capo_codeguruprofiler/types/frame_metric_value.py +5 -0
  101. capo_codeguruprofiler/types/frame_metric_values.py +30 -0
  102. capo_codeguruprofiler/types/frame_metrics.py +29 -0
  103. capo_codeguruprofiler/types/get_findings_report_account_summary_request.py +31 -0
  104. capo_codeguruprofiler/types/get_findings_report_account_summary_response.py +56 -0
  105. capo_codeguruprofiler/types/get_notification_configuration_request.py +26 -0
  106. capo_codeguruprofiler/types/get_notification_configuration_response.py +45 -0
  107. capo_codeguruprofiler/types/get_policy_request.py +26 -0
  108. capo_codeguruprofiler/types/get_policy_response.py +38 -0
  109. capo_codeguruprofiler/types/get_profile_request.py +39 -0
  110. capo_codeguruprofiler/types/get_profile_response.py +45 -0
  111. capo_codeguruprofiler/types/get_recommendations_request.py +34 -0
  112. capo_codeguruprofiler/types/get_recommendations_response.py +110 -0
  113. capo_codeguruprofiler/types/list_findings_reports_request.py +41 -0
  114. capo_codeguruprofiler/types/list_findings_reports_response.py +56 -0
  115. capo_codeguruprofiler/types/list_of_timestamps.py +33 -0
  116. capo_codeguruprofiler/types/list_profile_times_request.py +45 -0
  117. capo_codeguruprofiler/types/list_profile_times_response.py +50 -0
  118. capo_codeguruprofiler/types/list_profiling_groups_request.py +31 -0
  119. capo_codeguruprofiler/types/list_profiling_groups_response.py +77 -0
  120. capo_codeguruprofiler/types/list_tags_for_resource_request.py +24 -0
  121. capo_codeguruprofiler/types/list_tags_for_resource_response.py +34 -0
  122. capo_codeguruprofiler/types/locale.py +6 -0
  123. capo_codeguruprofiler/types/match.py +43 -0
  124. capo_codeguruprofiler/types/matches.py +29 -0
  125. capo_codeguruprofiler/types/max_depth.py +5 -0
  126. capo_codeguruprofiler/types/max_results.py +5 -0
  127. capo_codeguruprofiler/types/metadata.py +27 -0
  128. capo_codeguruprofiler/types/metadata_field.py +5 -0
  129. capo_codeguruprofiler/types/metric.py +54 -0
  130. capo_codeguruprofiler/types/metric_type.py +5 -0
  131. capo_codeguruprofiler/types/notification_configuration.py +36 -0
  132. capo_codeguruprofiler/types/order_by.py +5 -0
  133. capo_codeguruprofiler/types/pagination_token.py +5 -0
  134. capo_codeguruprofiler/types/pattern.py +95 -0
  135. capo_codeguruprofiler/types/percentage.py +5 -0
  136. capo_codeguruprofiler/types/period.py +5 -0
  137. capo_codeguruprofiler/types/post_agent_profile_request.py +51 -0
  138. capo_codeguruprofiler/types/post_agent_profile_response.py +18 -0
  139. capo_codeguruprofiler/types/principal.py +5 -0
  140. capo_codeguruprofiler/types/principals.py +17 -0
  141. capo_codeguruprofiler/types/profile_time.py +36 -0
  142. capo_codeguruprofiler/types/profile_times.py +29 -0
  143. capo_codeguruprofiler/types/profiling_group_arn.py +5 -0
  144. capo_codeguruprofiler/types/profiling_group_description.py +132 -0
  145. capo_codeguruprofiler/types/profiling_group_descriptions.py +37 -0
  146. capo_codeguruprofiler/types/profiling_group_name.py +5 -0
  147. capo_codeguruprofiler/types/profiling_group_names.py +19 -0
  148. capo_codeguruprofiler/types/profiling_status.py +83 -0
  149. capo_codeguruprofiler/types/put_permission_request.py +54 -0
  150. capo_codeguruprofiler/types/put_permission_response.py +38 -0
  151. capo_codeguruprofiler/types/recommendation.py +108 -0
  152. capo_codeguruprofiler/types/recommendations.py +31 -0
  153. capo_codeguruprofiler/types/remove_notification_channel_request.py +29 -0
  154. capo_codeguruprofiler/types/remove_notification_channel_response.py +42 -0
  155. capo_codeguruprofiler/types/remove_permission_request.py +32 -0
  156. capo_codeguruprofiler/types/remove_permission_response.py +38 -0
  157. capo_codeguruprofiler/types/revision_id.py +5 -0
  158. capo_codeguruprofiler/types/strings.py +14 -0
  159. capo_codeguruprofiler/types/submit_feedback_request.py +47 -0
  160. capo_codeguruprofiler/types/submit_feedback_response.py +18 -0
  161. capo_codeguruprofiler/types/tag_keys.py +14 -0
  162. capo_codeguruprofiler/types/tag_resource_request.py +40 -0
  163. capo_codeguruprofiler/types/tag_resource_response.py +18 -0
  164. capo_codeguruprofiler/types/tags_map.py +22 -0
  165. capo_codeguruprofiler/types/target_frame.py +14 -0
  166. capo_codeguruprofiler/types/target_frames.py +29 -0
  167. capo_codeguruprofiler/types/thread_states.py +14 -0
  168. capo_codeguruprofiler/types/timestamp.py +20 -0
  169. capo_codeguruprofiler/types/timestamp_structure.py +37 -0
  170. capo_codeguruprofiler/types/unprocessed_end_time_map.py +33 -0
  171. capo_codeguruprofiler/types/untag_resource_request.py +27 -0
  172. capo_codeguruprofiler/types/untag_resource_response.py +18 -0
  173. capo_codeguruprofiler/types/update_profiling_group_request.py +50 -0
  174. capo_codeguruprofiler/types/update_profiling_group_response.py +45 -0
  175. capo_codeguruprofiler/types/user_feedback.py +31 -0
  176. capo_codeguruprofiler-0.1.0.dist-info/METADATA +101 -0
  177. capo_codeguruprofiler-0.1.0.dist-info/RECORD +180 -0
  178. capo_codeguruprofiler-0.1.0.dist-info/WHEEL +5 -0
  179. capo_codeguruprofiler-0.1.0.dist-info/licenses/LICENSE +21 -0
  180. capo_codeguruprofiler-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#AnomalyInstances``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.anomaly_instance
7
+
8
+ AnomalyInstances: TypeAlias = list[
9
+ "capo_codeguruprofiler.types.anomaly_instance.AnomalyInstance"
10
+ ]
11
+
12
+
13
+ # --- restJson1 ser/de ---
14
+ def serialize_json(value: AnomalyInstances) -> list:
15
+ import capo_codeguruprofiler.types.anomaly_instance
16
+
17
+ out: list = []
18
+ for item in value:
19
+ out.append(capo_codeguruprofiler.types.anomaly_instance.serialize_json(item))
20
+ return out
21
+
22
+
23
+ def deserialize_json(data: list) -> AnomalyInstances:
24
+ import capo_codeguruprofiler.types.anomaly_instance
25
+
26
+ out: AnomalyInstances = []
27
+ for item in data:
28
+ if item is None:
29
+ continue
30
+ out.append(capo_codeguruprofiler.types.anomaly_instance.deserialize_json(item))
31
+ return out
@@ -0,0 +1,56 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#BatchGetFrameMetricDataRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.aggregation_period
9
+ import capo_codeguruprofiler.types.frame_metrics
10
+ import capo_codeguruprofiler.types.period
11
+ import capo_codeguruprofiler.types.profiling_group_name
12
+ import capo_codeguruprofiler.types.timestamp
13
+
14
+
15
+ class BatchGetFrameMetricDataRequest(TypedDict, closed=True):
16
+ profiling_group_name: (
17
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
18
+ )
19
+ """<p> The name of the profiling group associated with the the frame metrics used to return the time series values. </p>"""
20
+ start_time: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
21
+ """<p> The start time of the time period for the frame metrics used to return the time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>"""
22
+ end_time: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
23
+ """<p> The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>"""
24
+ period: NotRequired["capo_codeguruprofiler.types.period.Period"]
25
+ """<p> The duration of the frame metrics used to return the time series values. Specify using the ISO 8601 format. The maximum period duration is one day (<code>PT24H</code> or <code>P1D</code>). </p>"""
26
+ target_resolution: NotRequired[
27
+ "capo_codeguruprofiler.types.aggregation_period.AggregationPeriod"
28
+ ]
29
+ """<p>The requested resolution of time steps for the returned time series of values. If the requested target resolution is not available due to data not being retained we provide a best effort result by falling back to the most granular available resolution after the target resolution. There are 3 valid values. </p> <ul> <li> <p> <code>P1D</code> — 1 day </p> </li> <li> <p> <code>PT1H</code> — 1 hour </p> </li> <li> <p> <code>PT5M</code> — 5 minutes </p> </li> </ul>"""
30
+ frame_metrics: NotRequired["capo_codeguruprofiler.types.frame_metrics.FrameMetrics"]
31
+ """<p> The details of the metrics that are used to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.</p>"""
32
+
33
+
34
+ # --- restJson1 ser/de ---
35
+ def serialize_json(value: BatchGetFrameMetricDataRequest) -> dict:
36
+ out: dict = {}
37
+ if "frame_metrics" in value:
38
+ import capo_codeguruprofiler.types.frame_metrics
39
+
40
+ out["frameMetrics"] = capo_codeguruprofiler.types.frame_metrics.serialize_json(
41
+ value["frame_metrics"]
42
+ )
43
+ return out
44
+
45
+
46
+ def deserialize_json(data: dict) -> BatchGetFrameMetricDataRequest:
47
+ out: BatchGetFrameMetricDataRequest = {} # type: ignore[typeddict-item]
48
+ if data.get("frameMetrics") is not None:
49
+ import capo_codeguruprofiler.types.frame_metrics
50
+
51
+ out["frame_metrics"] = (
52
+ capo_codeguruprofiler.types.frame_metrics.deserialize_json(
53
+ data["frameMetrics"]
54
+ )
55
+ )
56
+ return out
@@ -0,0 +1,130 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#BatchGetFrameMetricDataResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.aggregation_period
11
+ import capo_codeguruprofiler.types.frame_metric_data
12
+ import capo_codeguruprofiler.types.list_of_timestamps
13
+ import capo_codeguruprofiler.types.timestamp
14
+ import capo_codeguruprofiler.types.unprocessed_end_time_map
15
+
16
+
17
+ class BatchGetFrameMetricDataResponse(TypedDict, closed=True):
18
+ start_time: "capo_codeguruprofiler.types.timestamp.Timestamp"
19
+ """<p> The start time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>"""
20
+ end_time: "capo_codeguruprofiler.types.timestamp.Timestamp"
21
+ """<p> The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>"""
22
+ resolution: "capo_codeguruprofiler.types.aggregation_period.AggregationPeriod"
23
+ """<p>Resolution or granularity of the profile data used to generate the time series. This is the value used to jump through time steps in a time series. There are 3 valid values. </p> <ul> <li> <p> <code>P1D</code> — 1 day </p> </li> <li> <p> <code>PT1H</code> — 1 hour </p> </li> <li> <p> <code>PT5M</code> — 5 minutes </p> </li> </ul>"""
24
+ end_times: "capo_codeguruprofiler.types.list_of_timestamps.ListOfTimestamps"
25
+ """<p> List of instances, or time steps, in the time series. For example, if the <code>period</code> is one day (<code>PT24H)</code>), and the <code>resolution</code> is five minutes (<code>PT5M</code>), then there are 288 <code>endTimes</code> in the list that are each five minutes appart. </p>"""
26
+ unprocessed_end_times: (
27
+ "capo_codeguruprofiler.types.unprocessed_end_time_map.UnprocessedEndTimeMap"
28
+ )
29
+ """<p>List of instances which remained unprocessed. This will create a missing time step in the list of end times.</p>"""
30
+ frame_metric_data: "capo_codeguruprofiler.types.frame_metric_data.FrameMetricData"
31
+ """<p>Details of the metrics to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.</p>"""
32
+
33
+
34
+ # --- restJson1 ser/de ---
35
+ def serialize_json(value: BatchGetFrameMetricDataResponse) -> dict:
36
+ out: dict = {}
37
+ import capo_codeguruprofiler.types.timestamp
38
+
39
+ out["startTime"] = capo_codeguruprofiler.types.timestamp.serialize_json(
40
+ value["start_time"]
41
+ )
42
+ import capo_codeguruprofiler.types.timestamp
43
+
44
+ out["endTime"] = capo_codeguruprofiler.types.timestamp.serialize_json(
45
+ value["end_time"]
46
+ )
47
+ out["resolution"] = value["resolution"]
48
+ import capo_codeguruprofiler.types.list_of_timestamps
49
+
50
+ out["endTimes"] = capo_codeguruprofiler.types.list_of_timestamps.serialize_json(
51
+ value["end_times"]
52
+ )
53
+ import capo_codeguruprofiler.types.unprocessed_end_time_map
54
+
55
+ out["unprocessedEndTimes"] = (
56
+ capo_codeguruprofiler.types.unprocessed_end_time_map.serialize_json(
57
+ value["unprocessed_end_times"]
58
+ )
59
+ )
60
+ import capo_codeguruprofiler.types.frame_metric_data
61
+
62
+ out["frameMetricData"] = (
63
+ capo_codeguruprofiler.types.frame_metric_data.serialize_json(
64
+ value["frame_metric_data"]
65
+ )
66
+ )
67
+ return out
68
+
69
+
70
+ def deserialize_json(data: dict) -> BatchGetFrameMetricDataResponse:
71
+ out: BatchGetFrameMetricDataResponse = {} # type: ignore[typeddict-item]
72
+ if data.get("startTime") is not None:
73
+ import capo_codeguruprofiler.types.timestamp
74
+
75
+ out["start_time"] = capo_codeguruprofiler.types.timestamp.deserialize_json(
76
+ data["startTime"]
77
+ )
78
+ else:
79
+ raise DeserializationError(
80
+ "BatchGetFrameMetricDataResponse.start_time required"
81
+ )
82
+ if data.get("endTime") is not None:
83
+ import capo_codeguruprofiler.types.timestamp
84
+
85
+ out["end_time"] = capo_codeguruprofiler.types.timestamp.deserialize_json(
86
+ data["endTime"]
87
+ )
88
+ else:
89
+ raise DeserializationError("BatchGetFrameMetricDataResponse.end_time required")
90
+ if data.get("resolution") is not None:
91
+ out["resolution"] = data["resolution"]
92
+ else:
93
+ raise DeserializationError(
94
+ "BatchGetFrameMetricDataResponse.resolution required"
95
+ )
96
+ if data.get("endTimes") is not None:
97
+ import capo_codeguruprofiler.types.list_of_timestamps
98
+
99
+ out["end_times"] = (
100
+ capo_codeguruprofiler.types.list_of_timestamps.deserialize_json(
101
+ data["endTimes"]
102
+ )
103
+ )
104
+ else:
105
+ raise DeserializationError("BatchGetFrameMetricDataResponse.end_times required")
106
+ if data.get("unprocessedEndTimes") is not None:
107
+ import capo_codeguruprofiler.types.unprocessed_end_time_map
108
+
109
+ out["unprocessed_end_times"] = (
110
+ capo_codeguruprofiler.types.unprocessed_end_time_map.deserialize_json(
111
+ data["unprocessedEndTimes"]
112
+ )
113
+ )
114
+ else:
115
+ raise DeserializationError(
116
+ "BatchGetFrameMetricDataResponse.unprocessed_end_times required"
117
+ )
118
+ if data.get("frameMetricData") is not None:
119
+ import capo_codeguruprofiler.types.frame_metric_data
120
+
121
+ out["frame_metric_data"] = (
122
+ capo_codeguruprofiler.types.frame_metric_data.deserialize_json(
123
+ data["frameMetricData"]
124
+ )
125
+ )
126
+ else:
127
+ raise DeserializationError(
128
+ "BatchGetFrameMetricDataResponse.frame_metric_data required"
129
+ )
130
+ return out
@@ -0,0 +1,58 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Channel``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.channel_id
11
+ import capo_codeguruprofiler.types.channel_uri
12
+ import capo_codeguruprofiler.types.event_publishers
13
+
14
+
15
+ class Channel(TypedDict, closed=True):
16
+ id: NotRequired["capo_codeguruprofiler.types.channel_id.ChannelId"]
17
+ """<p>Unique identifier for each <code>Channel</code> in the notification configuration of a Profiling Group. A random UUID for channelId is used when adding a channel to the notification configuration if not specified in the request.</p>"""
18
+ uri: "capo_codeguruprofiler.types.channel_uri.ChannelUri"
19
+ """<p>Unique arn of the resource to be used for notifications. We support a valid SNS topic arn as a channel uri.</p>"""
20
+ event_publishers: "capo_codeguruprofiler.types.event_publishers.EventPublishers"
21
+ """<p>List of publishers for different type of events that may be detected in an application from the profile. Anomaly detection is the only event publisher in Profiler.</p>"""
22
+
23
+
24
+ # --- restJson1 ser/de ---
25
+ def serialize_json(value: Channel) -> dict:
26
+ out: dict = {}
27
+ if "id" in value:
28
+ out["id"] = value["id"]
29
+ out["uri"] = value["uri"]
30
+ import capo_codeguruprofiler.types.event_publishers
31
+
32
+ out["eventPublishers"] = (
33
+ capo_codeguruprofiler.types.event_publishers.serialize_json(
34
+ value["event_publishers"]
35
+ )
36
+ )
37
+ return out
38
+
39
+
40
+ def deserialize_json(data: dict) -> Channel:
41
+ out: Channel = {} # type: ignore[typeddict-item]
42
+ if data.get("id") is not None:
43
+ out["id"] = data["id"]
44
+ if data.get("uri") is not None:
45
+ out["uri"] = data["uri"]
46
+ else:
47
+ raise DeserializationError("Channel.uri required")
48
+ if data.get("eventPublishers") is not None:
49
+ import capo_codeguruprofiler.types.event_publishers
50
+
51
+ out["event_publishers"] = (
52
+ capo_codeguruprofiler.types.event_publishers.deserialize_json(
53
+ data["eventPublishers"]
54
+ )
55
+ )
56
+ else:
57
+ raise DeserializationError("Channel.event_publishers required")
58
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ChannelId``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ ChannelId: TypeAlias = str
@@ -0,0 +1,6 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ChannelUri``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ """Channel URI uniquely identifies a Notification Channel. TopicArn is the uri for an SNS channel, emailId is uri for an email channel etc. Currently we only support SNS channels and thus required to be an ARN"""
6
+ ChannelUri: TypeAlias = str
@@ -0,0 +1,29 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Channels``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.channel
7
+
8
+ Channels: TypeAlias = list["capo_codeguruprofiler.types.channel.Channel"]
9
+
10
+
11
+ # --- restJson1 ser/de ---
12
+ def serialize_json(value: Channels) -> list:
13
+ import capo_codeguruprofiler.types.channel
14
+
15
+ out: list = []
16
+ for item in value:
17
+ out.append(capo_codeguruprofiler.types.channel.serialize_json(item))
18
+ return out
19
+
20
+
21
+ def deserialize_json(data: list) -> Channels:
22
+ import capo_codeguruprofiler.types.channel
23
+
24
+ out: Channels = []
25
+ for item in data:
26
+ if item is None:
27
+ continue
28
+ out.append(capo_codeguruprofiler.types.channel.deserialize_json(item))
29
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ClientToken``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ ClientToken: TypeAlias = str
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ComputePlatform``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ ComputePlatform: TypeAlias = str
@@ -0,0 +1,50 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ConfigureAgentRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.fleet_instance_id
9
+ import capo_codeguruprofiler.types.metadata
10
+ import capo_codeguruprofiler.types.profiling_group_name
11
+
12
+
13
+ class ConfigureAgentRequest(TypedDict, closed=True):
14
+ profiling_group_name: (
15
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
16
+ )
17
+ """<p> The name of the profiling group for which the configured agent is collecting profiling data. </p>"""
18
+ fleet_instance_id: NotRequired[
19
+ "capo_codeguruprofiler.types.fleet_instance_id.FleetInstanceId"
20
+ ]
21
+ """<p> A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID. </p>"""
22
+ metadata: NotRequired["capo_codeguruprofiler.types.metadata.Metadata"]
23
+ """<p> Metadata captured about the compute platform the agent is running on. It includes information about sampling and reporting. The valid fields are:</p> <ul> <li> <p> <code>COMPUTE_PLATFORM</code> - The compute platform on which the agent is running </p> </li> <li> <p> <code>AGENT_ID</code> - The ID for an agent instance. </p> </li> <li> <p> <code>AWS_REQUEST_ID</code> - The AWS request ID of a Lambda invocation. </p> </li> <li> <p> <code>EXECUTION_ENVIRONMENT</code> - The execution environment a Lambda function is running on. </p> </li> <li> <p> <code>LAMBDA_FUNCTION_ARN</code> - The Amazon Resource Name (ARN) that is used to invoke a Lambda function. </p> </li> <li> <p> <code>LAMBDA_MEMORY_LIMIT_IN_MB</code> - The memory allocated to a Lambda function. </p> </li> <li> <p> <code>LAMBDA_REMAINING_TIME_IN_MILLISECONDS</code> - The time in milliseconds before execution of a Lambda function times out. </p> </li> <li> <p> <code>LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS</code> - The time in milliseconds between two invocations of a Lambda function. </p> </li> <li> <p> <code>LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS</code> - The time in milliseconds for the previous Lambda invocation. </p> </li> </ul>"""
24
+
25
+
26
+ # --- restJson1 ser/de ---
27
+ def serialize_json(value: ConfigureAgentRequest) -> dict:
28
+ out: dict = {}
29
+ if "fleet_instance_id" in value:
30
+ out["fleetInstanceId"] = value["fleet_instance_id"]
31
+ if "metadata" in value:
32
+ import capo_codeguruprofiler.types.metadata
33
+
34
+ out["metadata"] = capo_codeguruprofiler.types.metadata.serialize_json(
35
+ value["metadata"]
36
+ )
37
+ return out
38
+
39
+
40
+ def deserialize_json(data: dict) -> ConfigureAgentRequest:
41
+ out: ConfigureAgentRequest = {} # type: ignore[typeddict-item]
42
+ if data.get("fleetInstanceId") is not None:
43
+ out["fleet_instance_id"] = data["fleetInstanceId"]
44
+ if data.get("metadata") is not None:
45
+ import capo_codeguruprofiler.types.metadata
46
+
47
+ out["metadata"] = capo_codeguruprofiler.types.metadata.deserialize_json(
48
+ data["metadata"]
49
+ )
50
+ return out
@@ -0,0 +1,43 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ConfigureAgentResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.agent_configuration
11
+
12
+
13
+ class ConfigureAgentResponse(TypedDict, closed=True):
14
+ configuration: "capo_codeguruprofiler.types.agent_configuration.AgentConfiguration"
15
+ r"""<p> An <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AgentConfiguration.html\"> <code>AgentConfiguration</code> </a> object that specifies if an agent profiles or not and for how long to return profiling data. </p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: ConfigureAgentResponse) -> dict:
20
+ out: dict = {}
21
+ import capo_codeguruprofiler.types.agent_configuration
22
+
23
+ out["configuration"] = (
24
+ capo_codeguruprofiler.types.agent_configuration.serialize_json(
25
+ value["configuration"]
26
+ )
27
+ )
28
+ return out
29
+
30
+
31
+ def deserialize_json(data: dict) -> ConfigureAgentResponse:
32
+ out: ConfigureAgentResponse = {} # type: ignore[typeddict-item]
33
+ if data.get("configuration") is not None:
34
+ import capo_codeguruprofiler.types.agent_configuration
35
+
36
+ out["configuration"] = (
37
+ capo_codeguruprofiler.types.agent_configuration.deserialize_json(
38
+ data["configuration"]
39
+ )
40
+ )
41
+ else:
42
+ raise DeserializationError("ConfigureAgentResponse.configuration required")
43
+ return out
@@ -0,0 +1,81 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#CreateProfilingGroupRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.agent_orchestration_config
11
+ import capo_codeguruprofiler.types.client_token
12
+ import capo_codeguruprofiler.types.compute_platform
13
+ import capo_codeguruprofiler.types.profiling_group_name
14
+ import capo_codeguruprofiler.types.tags_map
15
+
16
+
17
+ class CreateProfilingGroupRequest(TypedDict, closed=True):
18
+ profiling_group_name: (
19
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
20
+ )
21
+ """<p>The name of the profiling group to create.</p>"""
22
+ compute_platform: NotRequired[
23
+ "capo_codeguruprofiler.types.compute_platform.ComputePlatform"
24
+ ]
25
+ """<p> The compute platform of the profiling group. Use <code>AWSLambda</code> if your application runs on AWS Lambda. Use <code>Default</code> if your application runs on a compute platform that is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform. If not specified, <code>Default</code> is used. </p>"""
26
+ client_token: "capo_codeguruprofiler.types.client_token.ClientToken"
27
+ """<p> Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental creation of duplicate profiling groups if there are failures and retries. </p>"""
28
+ agent_orchestration_config: NotRequired[
29
+ "capo_codeguruprofiler.types.agent_orchestration_config.AgentOrchestrationConfig"
30
+ ]
31
+ """<p> Specifies whether profiling is enabled or disabled for the created profiling group. </p>"""
32
+ tags: NotRequired["capo_codeguruprofiler.types.tags_map.TagsMap"]
33
+ """<p> A list of tags to add to the created profiling group. </p>"""
34
+
35
+
36
+ # --- restJson1 ser/de ---
37
+ def serialize_json(value: CreateProfilingGroupRequest) -> dict:
38
+ out: dict = {}
39
+ out["profilingGroupName"] = value["profiling_group_name"]
40
+ if "compute_platform" in value:
41
+ out["computePlatform"] = value["compute_platform"]
42
+ if "agent_orchestration_config" in value:
43
+ import capo_codeguruprofiler.types.agent_orchestration_config
44
+
45
+ out["agentOrchestrationConfig"] = (
46
+ capo_codeguruprofiler.types.agent_orchestration_config.serialize_json(
47
+ value["agent_orchestration_config"]
48
+ )
49
+ )
50
+ if "tags" in value:
51
+ import capo_codeguruprofiler.types.tags_map
52
+
53
+ out["tags"] = capo_codeguruprofiler.types.tags_map.serialize_json(value["tags"])
54
+ return out
55
+
56
+
57
+ def deserialize_json(data: dict) -> CreateProfilingGroupRequest:
58
+ out: CreateProfilingGroupRequest = {} # type: ignore[typeddict-item]
59
+ if data.get("profilingGroupName") is not None:
60
+ out["profiling_group_name"] = data["profilingGroupName"]
61
+ else:
62
+ raise DeserializationError(
63
+ "CreateProfilingGroupRequest.profiling_group_name required"
64
+ )
65
+ if data.get("computePlatform") is not None:
66
+ out["compute_platform"] = data["computePlatform"]
67
+ if data.get("agentOrchestrationConfig") is not None:
68
+ import capo_codeguruprofiler.types.agent_orchestration_config
69
+
70
+ out["agent_orchestration_config"] = (
71
+ capo_codeguruprofiler.types.agent_orchestration_config.deserialize_json(
72
+ data["agentOrchestrationConfig"]
73
+ )
74
+ )
75
+ if data.get("tags") is not None:
76
+ import capo_codeguruprofiler.types.tags_map
77
+
78
+ out["tags"] = capo_codeguruprofiler.types.tags_map.deserialize_json(
79
+ data["tags"]
80
+ )
81
+ return out
@@ -0,0 +1,45 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#CreateProfilingGroupResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.profiling_group_description
11
+
12
+
13
+ class CreateProfilingGroupResponse(TypedDict, closed=True):
14
+ profiling_group: "capo_codeguruprofiler.types.profiling_group_description.ProfilingGroupDescription"
15
+ r"""<p> The returned <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingGroupDescription.html\"> <code>ProfilingGroupDescription</code> </a> object that contains information about the created profiling group. </p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: CreateProfilingGroupResponse) -> dict:
20
+ out: dict = {}
21
+ import capo_codeguruprofiler.types.profiling_group_description
22
+
23
+ out["profilingGroup"] = (
24
+ capo_codeguruprofiler.types.profiling_group_description.serialize_json(
25
+ value["profiling_group"]
26
+ )
27
+ )
28
+ return out
29
+
30
+
31
+ def deserialize_json(data: dict) -> CreateProfilingGroupResponse:
32
+ out: CreateProfilingGroupResponse = {} # type: ignore[typeddict-item]
33
+ if data.get("profilingGroup") is not None:
34
+ import capo_codeguruprofiler.types.profiling_group_description
35
+
36
+ out["profiling_group"] = (
37
+ capo_codeguruprofiler.types.profiling_group_description.deserialize_json(
38
+ data["profilingGroup"]
39
+ )
40
+ )
41
+ else:
42
+ raise DeserializationError(
43
+ "CreateProfilingGroupResponse.profiling_group required"
44
+ )
45
+ return out
@@ -0,0 +1,26 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#DeleteProfilingGroupRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.profiling_group_name
9
+
10
+
11
+ class DeleteProfilingGroupRequest(TypedDict, closed=True):
12
+ profiling_group_name: (
13
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
14
+ )
15
+ """<p>The name of the profiling group to delete.</p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: DeleteProfilingGroupRequest) -> dict:
20
+ out: dict = {}
21
+ return out
22
+
23
+
24
+ def deserialize_json(data: dict) -> DeleteProfilingGroupRequest:
25
+ out: DeleteProfilingGroupRequest = {} # type: ignore[typeddict-item]
26
+ return out
@@ -0,0 +1,18 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#DeleteProfilingGroupResponse``."""
2
+
3
+ from typing_extensions import TypedDict
4
+
5
+
6
+ class DeleteProfilingGroupResponse(TypedDict, closed=True):
7
+ pass
8
+
9
+
10
+ # --- restJson1 ser/de ---
11
+ def serialize_json(value: DeleteProfilingGroupResponse) -> dict:
12
+ out: dict = {}
13
+ return out
14
+
15
+
16
+ def deserialize_json(data: dict) -> DeleteProfilingGroupResponse:
17
+ out: DeleteProfilingGroupResponse = {} # type: ignore[typeddict-item]
18
+ return out
@@ -0,0 +1,26 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#DescribeProfilingGroupRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.profiling_group_name
9
+
10
+
11
+ class DescribeProfilingGroupRequest(TypedDict, closed=True):
12
+ profiling_group_name: (
13
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
14
+ )
15
+ """<p> The name of the profiling group to get information about. </p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: DescribeProfilingGroupRequest) -> dict:
20
+ out: dict = {}
21
+ return out
22
+
23
+
24
+ def deserialize_json(data: dict) -> DescribeProfilingGroupRequest:
25
+ out: DescribeProfilingGroupRequest = {} # type: ignore[typeddict-item]
26
+ return out