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.
- capo_codeguruprofiler/__init__.py +74 -0
- capo_codeguruprofiler/_async.py +25 -0
- capo_codeguruprofiler/_auth/_identity.py +16 -0
- capo_codeguruprofiler/_auth/_providers.py +886 -0
- capo_codeguruprofiler/_auth/_signers.py +88 -0
- capo_codeguruprofiler/_auth/_sigv4.py +434 -0
- capo_codeguruprofiler/_auth/_zapros_handler.py +80 -0
- capo_codeguruprofiler/_iter.py +113 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/add_notification_channels.py +185 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/batch_get_frame_metric_data.py +202 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/configure_agent.py +177 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/create_profiling_group.py +180 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/delete_profiling_group.py +165 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/describe_profiling_group.py +169 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/get_findings_report_account_summary.py +164 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/get_notification_configuration.py +168 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/get_policy.py +161 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/get_profile.py +196 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/get_recommendations.py +196 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/list_findings_reports.py +197 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/list_profile_times.py +196 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/list_profiling_groups.py +160 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/list_tags_for_resource.py +158 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/post_agent_profile.py +168 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/put_permission.py +182 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/remove_notification_channel.py +169 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/remove_permission.py +175 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/submit_feedback.py +170 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/tag_resource.py +158 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/untag_resource.py +156 -0
- capo_codeguruprofiler/_operations/code_guru_profiler/update_profiling_group.py +181 -0
- capo_codeguruprofiler/_pagination.py +21 -0
- capo_codeguruprofiler/_protocol/__init__.py +1 -0
- capo_codeguruprofiler/_protocol/errors.py +93 -0
- capo_codeguruprofiler/_protocol/eventstream.py +238 -0
- capo_codeguruprofiler/_protocol/serialize.py +47 -0
- capo_codeguruprofiler/_protocol/xml.py +33 -0
- capo_codeguruprofiler/_resources/code_guru_profiler/profiling_group.py +2257 -0
- capo_codeguruprofiler/_rule_engine/__init__.py +0 -0
- capo_codeguruprofiler/_rule_engine/_aws_partition.py +160 -0
- capo_codeguruprofiler/_rule_engine/_endpoint_rule_set.py +138 -0
- capo_codeguruprofiler/_rule_engine/_endpoint_runtime.py +389 -0
- capo_codeguruprofiler/_services/_aws_config.py +160 -0
- capo_codeguruprofiler/_services/_pipeline.py +198 -0
- capo_codeguruprofiler/_services/async_code_guru_profiler.py +377 -0
- capo_codeguruprofiler/_services/code_guru_profiler.py +373 -0
- capo_codeguruprofiler/errors/__init__.py +35 -0
- capo_codeguruprofiler/errors/_base.py +94 -0
- capo_codeguruprofiler/errors/conflict_exception.py +45 -0
- capo_codeguruprofiler/errors/internal_server_exception.py +47 -0
- capo_codeguruprofiler/errors/resource_not_found_exception.py +47 -0
- capo_codeguruprofiler/errors/service_quota_exceeded_exception.py +49 -0
- capo_codeguruprofiler/errors/throttling_exception.py +45 -0
- capo_codeguruprofiler/errors/validation_exception.py +45 -0
- capo_codeguruprofiler/py.typed +0 -0
- capo_codeguruprofiler/types/_prelude/blob.py +12 -0
- capo_codeguruprofiler/types/_prelude/timestamp.py +17 -0
- capo_codeguruprofiler/types/action_group.py +5 -0
- capo_codeguruprofiler/types/add_notification_channels_request.py +44 -0
- capo_codeguruprofiler/types/add_notification_channels_response.py +42 -0
- capo_codeguruprofiler/types/agent_configuration.py +58 -0
- capo_codeguruprofiler/types/agent_orchestration_config.py +28 -0
- capo_codeguruprofiler/types/agent_parameter_field.py +5 -0
- capo_codeguruprofiler/types/agent_parameters.py +27 -0
- capo_codeguruprofiler/types/agent_profile.py +15 -0
- capo_codeguruprofiler/types/aggregated_profile.py +15 -0
- capo_codeguruprofiler/types/aggregated_profile_time.py +45 -0
- capo_codeguruprofiler/types/aggregation_period.py +5 -0
- capo_codeguruprofiler/types/anomalies.py +29 -0
- capo_codeguruprofiler/types/anomaly.py +62 -0
- capo_codeguruprofiler/types/anomaly_instance.py +77 -0
- capo_codeguruprofiler/types/anomaly_instance_id.py +5 -0
- capo_codeguruprofiler/types/anomaly_instances.py +31 -0
- capo_codeguruprofiler/types/batch_get_frame_metric_data_request.py +56 -0
- capo_codeguruprofiler/types/batch_get_frame_metric_data_response.py +130 -0
- capo_codeguruprofiler/types/channel.py +58 -0
- capo_codeguruprofiler/types/channel_id.py +5 -0
- capo_codeguruprofiler/types/channel_uri.py +6 -0
- capo_codeguruprofiler/types/channels.py +29 -0
- capo_codeguruprofiler/types/client_token.py +5 -0
- capo_codeguruprofiler/types/compute_platform.py +5 -0
- capo_codeguruprofiler/types/configure_agent_request.py +50 -0
- capo_codeguruprofiler/types/configure_agent_response.py +43 -0
- capo_codeguruprofiler/types/create_profiling_group_request.py +81 -0
- capo_codeguruprofiler/types/create_profiling_group_response.py +45 -0
- capo_codeguruprofiler/types/delete_profiling_group_request.py +26 -0
- capo_codeguruprofiler/types/delete_profiling_group_response.py +18 -0
- capo_codeguruprofiler/types/describe_profiling_group_request.py +26 -0
- capo_codeguruprofiler/types/describe_profiling_group_response.py +45 -0
- capo_codeguruprofiler/types/event_publisher.py +5 -0
- capo_codeguruprofiler/types/event_publishers.py +19 -0
- capo_codeguruprofiler/types/feedback_type.py +5 -0
- capo_codeguruprofiler/types/findings_report_id.py +5 -0
- capo_codeguruprofiler/types/findings_report_summaries.py +35 -0
- capo_codeguruprofiler/types/findings_report_summary.py +73 -0
- capo_codeguruprofiler/types/fleet_instance_id.py +5 -0
- capo_codeguruprofiler/types/frame_metric.py +56 -0
- capo_codeguruprofiler/types/frame_metric_data.py +33 -0
- capo_codeguruprofiler/types/frame_metric_datum.py +56 -0
- capo_codeguruprofiler/types/frame_metric_value.py +5 -0
- capo_codeguruprofiler/types/frame_metric_values.py +30 -0
- capo_codeguruprofiler/types/frame_metrics.py +29 -0
- capo_codeguruprofiler/types/get_findings_report_account_summary_request.py +31 -0
- capo_codeguruprofiler/types/get_findings_report_account_summary_response.py +56 -0
- capo_codeguruprofiler/types/get_notification_configuration_request.py +26 -0
- capo_codeguruprofiler/types/get_notification_configuration_response.py +45 -0
- capo_codeguruprofiler/types/get_policy_request.py +26 -0
- capo_codeguruprofiler/types/get_policy_response.py +38 -0
- capo_codeguruprofiler/types/get_profile_request.py +39 -0
- capo_codeguruprofiler/types/get_profile_response.py +45 -0
- capo_codeguruprofiler/types/get_recommendations_request.py +34 -0
- capo_codeguruprofiler/types/get_recommendations_response.py +110 -0
- capo_codeguruprofiler/types/list_findings_reports_request.py +41 -0
- capo_codeguruprofiler/types/list_findings_reports_response.py +56 -0
- capo_codeguruprofiler/types/list_of_timestamps.py +33 -0
- capo_codeguruprofiler/types/list_profile_times_request.py +45 -0
- capo_codeguruprofiler/types/list_profile_times_response.py +50 -0
- capo_codeguruprofiler/types/list_profiling_groups_request.py +31 -0
- capo_codeguruprofiler/types/list_profiling_groups_response.py +77 -0
- capo_codeguruprofiler/types/list_tags_for_resource_request.py +24 -0
- capo_codeguruprofiler/types/list_tags_for_resource_response.py +34 -0
- capo_codeguruprofiler/types/locale.py +6 -0
- capo_codeguruprofiler/types/match.py +43 -0
- capo_codeguruprofiler/types/matches.py +29 -0
- capo_codeguruprofiler/types/max_depth.py +5 -0
- capo_codeguruprofiler/types/max_results.py +5 -0
- capo_codeguruprofiler/types/metadata.py +27 -0
- capo_codeguruprofiler/types/metadata_field.py +5 -0
- capo_codeguruprofiler/types/metric.py +54 -0
- capo_codeguruprofiler/types/metric_type.py +5 -0
- capo_codeguruprofiler/types/notification_configuration.py +36 -0
- capo_codeguruprofiler/types/order_by.py +5 -0
- capo_codeguruprofiler/types/pagination_token.py +5 -0
- capo_codeguruprofiler/types/pattern.py +95 -0
- capo_codeguruprofiler/types/percentage.py +5 -0
- capo_codeguruprofiler/types/period.py +5 -0
- capo_codeguruprofiler/types/post_agent_profile_request.py +51 -0
- capo_codeguruprofiler/types/post_agent_profile_response.py +18 -0
- capo_codeguruprofiler/types/principal.py +5 -0
- capo_codeguruprofiler/types/principals.py +17 -0
- capo_codeguruprofiler/types/profile_time.py +36 -0
- capo_codeguruprofiler/types/profile_times.py +29 -0
- capo_codeguruprofiler/types/profiling_group_arn.py +5 -0
- capo_codeguruprofiler/types/profiling_group_description.py +132 -0
- capo_codeguruprofiler/types/profiling_group_descriptions.py +37 -0
- capo_codeguruprofiler/types/profiling_group_name.py +5 -0
- capo_codeguruprofiler/types/profiling_group_names.py +19 -0
- capo_codeguruprofiler/types/profiling_status.py +83 -0
- capo_codeguruprofiler/types/put_permission_request.py +54 -0
- capo_codeguruprofiler/types/put_permission_response.py +38 -0
- capo_codeguruprofiler/types/recommendation.py +108 -0
- capo_codeguruprofiler/types/recommendations.py +31 -0
- capo_codeguruprofiler/types/remove_notification_channel_request.py +29 -0
- capo_codeguruprofiler/types/remove_notification_channel_response.py +42 -0
- capo_codeguruprofiler/types/remove_permission_request.py +32 -0
- capo_codeguruprofiler/types/remove_permission_response.py +38 -0
- capo_codeguruprofiler/types/revision_id.py +5 -0
- capo_codeguruprofiler/types/strings.py +14 -0
- capo_codeguruprofiler/types/submit_feedback_request.py +47 -0
- capo_codeguruprofiler/types/submit_feedback_response.py +18 -0
- capo_codeguruprofiler/types/tag_keys.py +14 -0
- capo_codeguruprofiler/types/tag_resource_request.py +40 -0
- capo_codeguruprofiler/types/tag_resource_response.py +18 -0
- capo_codeguruprofiler/types/tags_map.py +22 -0
- capo_codeguruprofiler/types/target_frame.py +14 -0
- capo_codeguruprofiler/types/target_frames.py +29 -0
- capo_codeguruprofiler/types/thread_states.py +14 -0
- capo_codeguruprofiler/types/timestamp.py +20 -0
- capo_codeguruprofiler/types/timestamp_structure.py +37 -0
- capo_codeguruprofiler/types/unprocessed_end_time_map.py +33 -0
- capo_codeguruprofiler/types/untag_resource_request.py +27 -0
- capo_codeguruprofiler/types/untag_resource_response.py +18 -0
- capo_codeguruprofiler/types/update_profiling_group_request.py +50 -0
- capo_codeguruprofiler/types/update_profiling_group_response.py +45 -0
- capo_codeguruprofiler/types/user_feedback.py +31 -0
- capo_codeguruprofiler-0.1.0.dist-info/METADATA +101 -0
- capo_codeguruprofiler-0.1.0.dist-info/RECORD +180 -0
- capo_codeguruprofiler-0.1.0.dist-info/WHEEL +5 -0
- capo_codeguruprofiler-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_codeguruprofiler-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Match``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Match(TypedDict, closed=True):
|
|
7
|
+
target_frames_index: NotRequired["int"]
|
|
8
|
+
"""<p>The target frame that triggered a match.</p>"""
|
|
9
|
+
frame_address: NotRequired["str"]
|
|
10
|
+
"""<p>The location in the profiling graph that contains a recommendation found during analysis.</p>"""
|
|
11
|
+
threshold_breach_value: NotRequired["float"]
|
|
12
|
+
"""<p>The value in the profile data that exceeded the recommendation threshold.</p>"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# --- restJson1 ser/de ---
|
|
16
|
+
def serialize_json(value: Match) -> dict:
|
|
17
|
+
out: dict = {}
|
|
18
|
+
if "target_frames_index" in value:
|
|
19
|
+
out["targetFramesIndex"] = value["target_frames_index"]
|
|
20
|
+
if "frame_address" in value:
|
|
21
|
+
out["frameAddress"] = value["frame_address"]
|
|
22
|
+
if "threshold_breach_value" in value:
|
|
23
|
+
out["thresholdBreachValue"] = (
|
|
24
|
+
"NaN"
|
|
25
|
+
if value["threshold_breach_value"] != value["threshold_breach_value"]
|
|
26
|
+
else "Infinity"
|
|
27
|
+
if value["threshold_breach_value"] == float("inf")
|
|
28
|
+
else "-Infinity"
|
|
29
|
+
if value["threshold_breach_value"] == float("-inf")
|
|
30
|
+
else value["threshold_breach_value"]
|
|
31
|
+
)
|
|
32
|
+
return out
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def deserialize_json(data: dict) -> Match:
|
|
36
|
+
out: Match = {} # type: ignore[typeddict-item]
|
|
37
|
+
if data.get("targetFramesIndex") is not None:
|
|
38
|
+
out["target_frames_index"] = data["targetFramesIndex"]
|
|
39
|
+
if data.get("frameAddress") is not None:
|
|
40
|
+
out["frame_address"] = data["frameAddress"]
|
|
41
|
+
if data.get("thresholdBreachValue") is not None:
|
|
42
|
+
out["threshold_breach_value"] = float(data["thresholdBreachValue"])
|
|
43
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Matches``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_codeguruprofiler.types.match
|
|
7
|
+
|
|
8
|
+
Matches: TypeAlias = list["capo_codeguruprofiler.types.match.Match"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: Matches) -> list:
|
|
13
|
+
import capo_codeguruprofiler.types.match
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_codeguruprofiler.types.match.serialize_json(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_json(data: list) -> Matches:
|
|
22
|
+
import capo_codeguruprofiler.types.match
|
|
23
|
+
|
|
24
|
+
out: Matches = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_codeguruprofiler.types.match.deserialize_json(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Metadata``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_codeguruprofiler.types.metadata_field
|
|
7
|
+
|
|
8
|
+
Metadata: TypeAlias = dict[
|
|
9
|
+
"capo_codeguruprofiler.types.metadata_field.MetadataField", "str"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(input_to_serialize: Metadata) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
for key, value in input_to_serialize.items():
|
|
17
|
+
out[key] = value
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_json(data: dict) -> Metadata:
|
|
22
|
+
out: Metadata = {}
|
|
23
|
+
for key, value in data.items():
|
|
24
|
+
if value is None:
|
|
25
|
+
continue
|
|
26
|
+
out[key] = value
|
|
27
|
+
return out
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Metric``."""
|
|
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.metric_type
|
|
11
|
+
import capo_codeguruprofiler.types.strings
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Metric(TypedDict, closed=True):
|
|
15
|
+
frame_name: "str"
|
|
16
|
+
"""<p> The name of the method that appears as a frame in any stack in a profile. </p>"""
|
|
17
|
+
type: "capo_codeguruprofiler.types.metric_type.MetricType"
|
|
18
|
+
"""<p> A type that specifies how a metric for a frame is analyzed. The supported value <code>AggregatedRelativeTotalTime</code> is an aggregation of the metric value for one frame that is calculated across the occurences of all frames in a profile.</p>"""
|
|
19
|
+
thread_states: "capo_codeguruprofiler.types.strings.Strings"
|
|
20
|
+
"""<p> The list of application runtime thread states that is used to calculate the metric value for the frame. </p>"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# --- restJson1 ser/de ---
|
|
24
|
+
def serialize_json(value: Metric) -> dict:
|
|
25
|
+
out: dict = {}
|
|
26
|
+
out["frameName"] = value["frame_name"]
|
|
27
|
+
out["type"] = value["type"]
|
|
28
|
+
import capo_codeguruprofiler.types.strings
|
|
29
|
+
|
|
30
|
+
out["threadStates"] = capo_codeguruprofiler.types.strings.serialize_json(
|
|
31
|
+
value["thread_states"]
|
|
32
|
+
)
|
|
33
|
+
return out
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def deserialize_json(data: dict) -> Metric:
|
|
37
|
+
out: Metric = {} # type: ignore[typeddict-item]
|
|
38
|
+
if data.get("frameName") is not None:
|
|
39
|
+
out["frame_name"] = data["frameName"]
|
|
40
|
+
else:
|
|
41
|
+
raise DeserializationError("Metric.frame_name required")
|
|
42
|
+
if data.get("type") is not None:
|
|
43
|
+
out["type"] = data["type"]
|
|
44
|
+
else:
|
|
45
|
+
raise DeserializationError("Metric.type required")
|
|
46
|
+
if data.get("threadStates") is not None:
|
|
47
|
+
import capo_codeguruprofiler.types.strings
|
|
48
|
+
|
|
49
|
+
out["thread_states"] = capo_codeguruprofiler.types.strings.deserialize_json(
|
|
50
|
+
data["threadStates"]
|
|
51
|
+
)
|
|
52
|
+
else:
|
|
53
|
+
raise DeserializationError("Metric.thread_states required")
|
|
54
|
+
return out
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#NotificationConfiguration``."""
|
|
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.channels
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class NotificationConfiguration(TypedDict, closed=True):
|
|
12
|
+
channels: NotRequired["capo_codeguruprofiler.types.channels.Channels"]
|
|
13
|
+
"""<p>List of up to two channels to be used for sending notifications for events detected from the application profile.</p>"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# --- restJson1 ser/de ---
|
|
17
|
+
def serialize_json(value: NotificationConfiguration) -> dict:
|
|
18
|
+
out: dict = {}
|
|
19
|
+
if "channels" in value:
|
|
20
|
+
import capo_codeguruprofiler.types.channels
|
|
21
|
+
|
|
22
|
+
out["channels"] = capo_codeguruprofiler.types.channels.serialize_json(
|
|
23
|
+
value["channels"]
|
|
24
|
+
)
|
|
25
|
+
return out
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> NotificationConfiguration:
|
|
29
|
+
out: NotificationConfiguration = {} # type: ignore[typeddict-item]
|
|
30
|
+
if data.get("channels") is not None:
|
|
31
|
+
import capo_codeguruprofiler.types.channels
|
|
32
|
+
|
|
33
|
+
out["channels"] = capo_codeguruprofiler.types.channels.deserialize_json(
|
|
34
|
+
data["channels"]
|
|
35
|
+
)
|
|
36
|
+
return out
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Pattern``."""
|
|
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.percentage
|
|
9
|
+
import capo_codeguruprofiler.types.strings
|
|
10
|
+
import capo_codeguruprofiler.types.target_frames
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Pattern(TypedDict, closed=True):
|
|
14
|
+
id: NotRequired["str"]
|
|
15
|
+
"""<p>The universally unique identifier (UUID) of this pattern.</p>"""
|
|
16
|
+
name: NotRequired["str"]
|
|
17
|
+
"""<p>The name for this pattern.</p>"""
|
|
18
|
+
description: NotRequired["str"]
|
|
19
|
+
"""<p>The description of the recommendation. This explains a potential inefficiency in a profiled application.</p>"""
|
|
20
|
+
resolution_steps: NotRequired["str"]
|
|
21
|
+
"""<p> A string that contains the steps recommended to address the potential inefficiency. </p>"""
|
|
22
|
+
target_frames: NotRequired["capo_codeguruprofiler.types.target_frames.TargetFrames"]
|
|
23
|
+
"""<p>A list of frame names that were searched during the analysis that generated a recommendation.</p>"""
|
|
24
|
+
threshold_percent: "capo_codeguruprofiler.types.percentage.Percentage"
|
|
25
|
+
"""<p> The percentage of time an application spends in one method that triggers a recommendation. The percentage of time is the same as the percentage of the total gathered sample counts during analysis. </p>"""
|
|
26
|
+
counters_to_aggregate: NotRequired["capo_codeguruprofiler.types.strings.Strings"]
|
|
27
|
+
"""<p> A list of the different counters used to determine if there is a match. </p>"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# --- restJson1 ser/de ---
|
|
31
|
+
def serialize_json(value: Pattern) -> dict:
|
|
32
|
+
out: dict = {}
|
|
33
|
+
if "id" in value:
|
|
34
|
+
out["id"] = value["id"]
|
|
35
|
+
if "name" in value:
|
|
36
|
+
out["name"] = value["name"]
|
|
37
|
+
if "description" in value:
|
|
38
|
+
out["description"] = value["description"]
|
|
39
|
+
if "resolution_steps" in value:
|
|
40
|
+
out["resolutionSteps"] = value["resolution_steps"]
|
|
41
|
+
if "target_frames" in value:
|
|
42
|
+
import capo_codeguruprofiler.types.target_frames
|
|
43
|
+
|
|
44
|
+
out["targetFrames"] = capo_codeguruprofiler.types.target_frames.serialize_json(
|
|
45
|
+
value["target_frames"]
|
|
46
|
+
)
|
|
47
|
+
out["thresholdPercent"] = (
|
|
48
|
+
"NaN"
|
|
49
|
+
if value.get("threshold_percent", 0) != value.get("threshold_percent", 0)
|
|
50
|
+
else "Infinity"
|
|
51
|
+
if value.get("threshold_percent", 0) == float("inf")
|
|
52
|
+
else "-Infinity"
|
|
53
|
+
if value.get("threshold_percent", 0) == float("-inf")
|
|
54
|
+
else value.get("threshold_percent", 0)
|
|
55
|
+
)
|
|
56
|
+
if "counters_to_aggregate" in value:
|
|
57
|
+
import capo_codeguruprofiler.types.strings
|
|
58
|
+
|
|
59
|
+
out["countersToAggregate"] = capo_codeguruprofiler.types.strings.serialize_json(
|
|
60
|
+
value["counters_to_aggregate"]
|
|
61
|
+
)
|
|
62
|
+
return out
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def deserialize_json(data: dict) -> Pattern:
|
|
66
|
+
out: Pattern = {} # type: ignore[typeddict-item]
|
|
67
|
+
if data.get("id") is not None:
|
|
68
|
+
out["id"] = data["id"]
|
|
69
|
+
if data.get("name") is not None:
|
|
70
|
+
out["name"] = data["name"]
|
|
71
|
+
if data.get("description") is not None:
|
|
72
|
+
out["description"] = data["description"]
|
|
73
|
+
if data.get("resolutionSteps") is not None:
|
|
74
|
+
out["resolution_steps"] = data["resolutionSteps"]
|
|
75
|
+
if data.get("targetFrames") is not None:
|
|
76
|
+
import capo_codeguruprofiler.types.target_frames
|
|
77
|
+
|
|
78
|
+
out["target_frames"] = (
|
|
79
|
+
capo_codeguruprofiler.types.target_frames.deserialize_json(
|
|
80
|
+
data["targetFrames"]
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
if data.get("thresholdPercent") is not None:
|
|
84
|
+
out["threshold_percent"] = float(data["thresholdPercent"])
|
|
85
|
+
else:
|
|
86
|
+
out["threshold_percent"] = 0
|
|
87
|
+
if data.get("countersToAggregate") is not None:
|
|
88
|
+
import capo_codeguruprofiler.types.strings
|
|
89
|
+
|
|
90
|
+
out["counters_to_aggregate"] = (
|
|
91
|
+
capo_codeguruprofiler.types.strings.deserialize_json(
|
|
92
|
+
data["countersToAggregate"]
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
return out
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#PostAgentProfileRequest``."""
|
|
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_profile
|
|
11
|
+
import capo_codeguruprofiler.types.client_token
|
|
12
|
+
import capo_codeguruprofiler.types.profiling_group_name
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PostAgentProfileRequest(TypedDict, closed=True):
|
|
16
|
+
profiling_group_name: (
|
|
17
|
+
"capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
|
|
18
|
+
)
|
|
19
|
+
"""<p> The name of the profiling group with the aggregated profile that receives the submitted profiling data. </p>"""
|
|
20
|
+
agent_profile: "capo_codeguruprofiler.types.agent_profile.AgentProfile"
|
|
21
|
+
"""<p> The submitted profiling data. </p>"""
|
|
22
|
+
profile_token: NotRequired["capo_codeguruprofiler.types.client_token.ClientToken"]
|
|
23
|
+
"""<p> Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries. </p>"""
|
|
24
|
+
content_type: "str"
|
|
25
|
+
r"""<p> The format of the submitted profiling data. The format maps to the <code>Accept</code> and <code>Content-Type</code> headers of the HTTP request. You can specify one of the following: or the default . </p> <ul> <li> <p> <code>application/json</code> — standard JSON format </p> </li> <li> <p> <code>application/x-amzn-ion</code> — the Amazon Ion data format. For more information, see <a href=\"http://amzn.github.io/ion-docs/\">Amazon Ion</a>. </p> </li> </ul>"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# --- restJson1 ser/de ---
|
|
29
|
+
def serialize_json(value: PostAgentProfileRequest) -> dict:
|
|
30
|
+
out: dict = {}
|
|
31
|
+
import capo_codeguruprofiler.types.agent_profile
|
|
32
|
+
|
|
33
|
+
out["agentProfile"] = capo_codeguruprofiler.types.agent_profile.serialize_json(
|
|
34
|
+
value["agent_profile"]
|
|
35
|
+
)
|
|
36
|
+
return out
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def deserialize_json(data: dict) -> PostAgentProfileRequest:
|
|
40
|
+
out: PostAgentProfileRequest = {} # type: ignore[typeddict-item]
|
|
41
|
+
if data.get("agentProfile") is not None:
|
|
42
|
+
import capo_codeguruprofiler.types.agent_profile
|
|
43
|
+
|
|
44
|
+
out["agent_profile"] = (
|
|
45
|
+
capo_codeguruprofiler.types.agent_profile.deserialize_json(
|
|
46
|
+
data["agentProfile"]
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
else:
|
|
50
|
+
raise DeserializationError("PostAgentProfileRequest.agent_profile required")
|
|
51
|
+
return out
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#PostAgentProfileResponse``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PostAgentProfileResponse(TypedDict, closed=True):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# --- restJson1 ser/de ---
|
|
11
|
+
def serialize_json(value: PostAgentProfileResponse) -> dict:
|
|
12
|
+
out: dict = {}
|
|
13
|
+
return out
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: dict) -> PostAgentProfileResponse:
|
|
17
|
+
out: PostAgentProfileResponse = {} # type: ignore[typeddict-item]
|
|
18
|
+
return out
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#Principals``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_codeguruprofiler.types.principal
|
|
7
|
+
|
|
8
|
+
Principals: TypeAlias = list["capo_codeguruprofiler.types.principal.Principal"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: Principals) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: list) -> Principals:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ProfileTime``."""
|
|
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.timestamp
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProfileTime(TypedDict, closed=True):
|
|
12
|
+
start: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
|
|
13
|
+
"""<p>The start time of a profile. It 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>"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# --- restJson1 ser/de ---
|
|
17
|
+
def serialize_json(value: ProfileTime) -> dict:
|
|
18
|
+
out: dict = {}
|
|
19
|
+
if "start" in value:
|
|
20
|
+
import capo_codeguruprofiler.types.timestamp
|
|
21
|
+
|
|
22
|
+
out["start"] = capo_codeguruprofiler.types.timestamp.serialize_json(
|
|
23
|
+
value["start"]
|
|
24
|
+
)
|
|
25
|
+
return out
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> ProfileTime:
|
|
29
|
+
out: ProfileTime = {} # type: ignore[typeddict-item]
|
|
30
|
+
if data.get("start") is not None:
|
|
31
|
+
import capo_codeguruprofiler.types.timestamp
|
|
32
|
+
|
|
33
|
+
out["start"] = capo_codeguruprofiler.types.timestamp.deserialize_json(
|
|
34
|
+
data["start"]
|
|
35
|
+
)
|
|
36
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ProfileTimes``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_codeguruprofiler.types.profile_time
|
|
7
|
+
|
|
8
|
+
ProfileTimes: TypeAlias = list["capo_codeguruprofiler.types.profile_time.ProfileTime"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: ProfileTimes) -> list:
|
|
13
|
+
import capo_codeguruprofiler.types.profile_time
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_codeguruprofiler.types.profile_time.serialize_json(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_json(data: list) -> ProfileTimes:
|
|
22
|
+
import capo_codeguruprofiler.types.profile_time
|
|
23
|
+
|
|
24
|
+
out: ProfileTimes = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_codeguruprofiler.types.profile_time.deserialize_json(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeguruprofiler#ProfilingGroupDescription``."""
|
|
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.agent_orchestration_config
|
|
9
|
+
import capo_codeguruprofiler.types.compute_platform
|
|
10
|
+
import capo_codeguruprofiler.types.profiling_group_arn
|
|
11
|
+
import capo_codeguruprofiler.types.profiling_group_name
|
|
12
|
+
import capo_codeguruprofiler.types.profiling_status
|
|
13
|
+
import capo_codeguruprofiler.types.tags_map
|
|
14
|
+
import capo_codeguruprofiler.types.timestamp
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ProfilingGroupDescription(TypedDict, closed=True):
|
|
18
|
+
name: NotRequired[
|
|
19
|
+
"capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
|
|
20
|
+
]
|
|
21
|
+
"""<p>The name of the profiling group.</p>"""
|
|
22
|
+
agent_orchestration_config: NotRequired[
|
|
23
|
+
"capo_codeguruprofiler.types.agent_orchestration_config.AgentOrchestrationConfig"
|
|
24
|
+
]
|
|
25
|
+
r"""<p> An <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AgentOrchestrationConfig.html\"> <code>AgentOrchestrationConfig</code> </a> object that indicates if the profiling group is enabled for profiled or not. </p>"""
|
|
26
|
+
arn: NotRequired[
|
|
27
|
+
"capo_codeguruprofiler.types.profiling_group_arn.ProfilingGroupArn"
|
|
28
|
+
]
|
|
29
|
+
"""<p>The Amazon Resource Name (ARN) identifying the profiling group resource.</p>"""
|
|
30
|
+
created_at: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
|
|
31
|
+
"""<p>The time when the profiling group was created. Specify 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>"""
|
|
32
|
+
updated_at: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
|
|
33
|
+
"""<p> The date and time when the profiling group was last updated. Specify 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>"""
|
|
34
|
+
profiling_status: NotRequired[
|
|
35
|
+
"capo_codeguruprofiler.types.profiling_status.ProfilingStatus"
|
|
36
|
+
]
|
|
37
|
+
r"""<p> A <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingStatus.html\"> <code>ProfilingStatus</code> </a> object that includes information about the last time a profile agent pinged back, the last time a profile was received, and the aggregation period and start time for the most recent aggregated profile. </p>"""
|
|
38
|
+
compute_platform: NotRequired[
|
|
39
|
+
"capo_codeguruprofiler.types.compute_platform.ComputePlatform"
|
|
40
|
+
]
|
|
41
|
+
"""<p> The compute platform of the profiling group. If it is set to <code>AWSLambda</code>, then the profiled application runs on AWS Lambda. If it is set to <code>Default</code>, then the profiled application runs on a compute platform that is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform. The default is <code>Default</code>. </p>"""
|
|
42
|
+
tags: NotRequired["capo_codeguruprofiler.types.tags_map.TagsMap"]
|
|
43
|
+
"""<p> A list of the tags that belong to this profiling group. </p>"""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# --- restJson1 ser/de ---
|
|
47
|
+
def serialize_json(value: ProfilingGroupDescription) -> dict:
|
|
48
|
+
out: dict = {}
|
|
49
|
+
if "name" in value:
|
|
50
|
+
out["name"] = value["name"]
|
|
51
|
+
if "agent_orchestration_config" in value:
|
|
52
|
+
import capo_codeguruprofiler.types.agent_orchestration_config
|
|
53
|
+
|
|
54
|
+
out["agentOrchestrationConfig"] = (
|
|
55
|
+
capo_codeguruprofiler.types.agent_orchestration_config.serialize_json(
|
|
56
|
+
value["agent_orchestration_config"]
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
if "arn" in value:
|
|
60
|
+
out["arn"] = value["arn"]
|
|
61
|
+
if "created_at" in value:
|
|
62
|
+
import capo_codeguruprofiler.types.timestamp
|
|
63
|
+
|
|
64
|
+
out["createdAt"] = capo_codeguruprofiler.types.timestamp.serialize_json(
|
|
65
|
+
value["created_at"]
|
|
66
|
+
)
|
|
67
|
+
if "updated_at" in value:
|
|
68
|
+
import capo_codeguruprofiler.types.timestamp
|
|
69
|
+
|
|
70
|
+
out["updatedAt"] = capo_codeguruprofiler.types.timestamp.serialize_json(
|
|
71
|
+
value["updated_at"]
|
|
72
|
+
)
|
|
73
|
+
if "profiling_status" in value:
|
|
74
|
+
import capo_codeguruprofiler.types.profiling_status
|
|
75
|
+
|
|
76
|
+
out["profilingStatus"] = (
|
|
77
|
+
capo_codeguruprofiler.types.profiling_status.serialize_json(
|
|
78
|
+
value["profiling_status"]
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
if "compute_platform" in value:
|
|
82
|
+
out["computePlatform"] = value["compute_platform"]
|
|
83
|
+
if "tags" in value:
|
|
84
|
+
import capo_codeguruprofiler.types.tags_map
|
|
85
|
+
|
|
86
|
+
out["tags"] = capo_codeguruprofiler.types.tags_map.serialize_json(value["tags"])
|
|
87
|
+
return out
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def deserialize_json(data: dict) -> ProfilingGroupDescription:
|
|
91
|
+
out: ProfilingGroupDescription = {} # type: ignore[typeddict-item]
|
|
92
|
+
if data.get("name") is not None:
|
|
93
|
+
out["name"] = data["name"]
|
|
94
|
+
if data.get("agentOrchestrationConfig") is not None:
|
|
95
|
+
import capo_codeguruprofiler.types.agent_orchestration_config
|
|
96
|
+
|
|
97
|
+
out["agent_orchestration_config"] = (
|
|
98
|
+
capo_codeguruprofiler.types.agent_orchestration_config.deserialize_json(
|
|
99
|
+
data["agentOrchestrationConfig"]
|
|
100
|
+
)
|
|
101
|
+
)
|
|
102
|
+
if data.get("arn") is not None:
|
|
103
|
+
out["arn"] = data["arn"]
|
|
104
|
+
if data.get("createdAt") is not None:
|
|
105
|
+
import capo_codeguruprofiler.types.timestamp
|
|
106
|
+
|
|
107
|
+
out["created_at"] = capo_codeguruprofiler.types.timestamp.deserialize_json(
|
|
108
|
+
data["createdAt"]
|
|
109
|
+
)
|
|
110
|
+
if data.get("updatedAt") is not None:
|
|
111
|
+
import capo_codeguruprofiler.types.timestamp
|
|
112
|
+
|
|
113
|
+
out["updated_at"] = capo_codeguruprofiler.types.timestamp.deserialize_json(
|
|
114
|
+
data["updatedAt"]
|
|
115
|
+
)
|
|
116
|
+
if data.get("profilingStatus") is not None:
|
|
117
|
+
import capo_codeguruprofiler.types.profiling_status
|
|
118
|
+
|
|
119
|
+
out["profiling_status"] = (
|
|
120
|
+
capo_codeguruprofiler.types.profiling_status.deserialize_json(
|
|
121
|
+
data["profilingStatus"]
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
if data.get("computePlatform") is not None:
|
|
125
|
+
out["compute_platform"] = data["computePlatform"]
|
|
126
|
+
if data.get("tags") is not None:
|
|
127
|
+
import capo_codeguruprofiler.types.tags_map
|
|
128
|
+
|
|
129
|
+
out["tags"] = capo_codeguruprofiler.types.tags_map.deserialize_json(
|
|
130
|
+
data["tags"]
|
|
131
|
+
)
|
|
132
|
+
return out
|