create_omni_dashboard
async
¶
create_omni_dashboard(
space_id: SpaceId,
name: str,
body: str,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
description: Optional[str] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateOmniDashboardOutput
Creates a new dashboard within a space. Use GetOmniDashboard and ListOmniDashboards to retrieve dashboards, UpdateOmniDashboard to modify one, and DeleteOmniDashboard to remove it.
Parameters:
-
space_id(SpaceId) –The unique ID of the space to create the dashboard in.
-
name(str) –A name that identifies the dashboard.
-
body(str) –The dashboard definition, as a JSON document. Maximum 1 MiB.
-
description(Optional[str], default:None) –An optional description of the dashboard.
-
tags(Optional[TagMap], default:None) –The tags to associate with the dashboard.
-
client_token(Optional[ClientToken], default:None) –Idempotency token for safe retries. Repeated requests with the same token return the original result 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.
-
ResourceNotFoundException–The specified resource does not exist.
-
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 dashboard The following example creates a dashboard in a space from a JSON dashboard definition. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.create_omni_dashboard(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', name='service-health-overview', body='{"widgets":[{"type":"metric","x":0,"y":0,"width":12,"height":6,"properties":{"metrics":[["AWS/Lambda","Errors","FunctionName","OrderProcessor"]],"region":"us-east-1","title":"Lambda Errors"}}]}', description='Overview of service health metrics.', tags={'Team': 'observability'}, client_token='3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | |