CloudTrail / Client / update_dashboard
update_dashboard¶
- CloudTrail.Client.update_dashboard(**kwargs)¶
- Updates the specified dashboard. - To set a refresh schedule, CloudTrail must be granted permissions to run the - StartDashboardRefreshoperation to refresh the dashboard on your behalf. To provide permissions, run the- PutResourcePolicyoperation to attach a resource-based policy to the dashboard. For more information, see Resource-based policy example for a dashboard in the CloudTrail User Guide.- CloudTrail runs queries to populate the dashboard’s widgets during a manual or scheduled refresh. CloudTrail must be granted permissions to run the - StartQueryoperation on your behalf. To provide permissions, run the- PutResourcePolicyoperation to attach a resource-based policy to each event data store. For more information, see Example: Allow CloudTrail to run queries to populate a dashboard in the CloudTrail User Guide.- See also: AWS API Documentation - Request Syntax- response = client.update_dashboard( DashboardId='string', Widgets=[ { 'QueryStatement': 'string', 'QueryParameters': [ 'string', ], 'ViewProperties': { 'string': 'string' } }, ], RefreshSchedule={ 'Frequency': { 'Unit': 'HOURS'|'DAYS', 'Value': 123 }, 'Status': 'ENABLED'|'DISABLED', 'TimeOfDay': 'string' }, TerminationProtectionEnabled=True|False ) - Parameters:
- DashboardId (string) – - [REQUIRED] - The name or ARN of the dashboard. 
- Widgets (list) – - An array of widgets for the dashboard. A custom dashboard can have a maximum of 10 widgets. - To add new widgets, pass in an array that includes the existing widgets along with any new widgets. Run the - GetDashboardoperation to get the list of widgets for the dashboard.- To remove widgets, pass in an array that includes the existing widgets minus the widgets you want removed. - (dict) – - Contains information about a widget on a CloudTrail Lake dashboard. - QueryStatement (string) – [REQUIRED] - The query statement for the widget. For custom dashboard widgets, you can query across multiple event data stores as long as all event data stores exist in your account. - Note- When a query uses - ?with- eventTime,- ?must be surrounded by single quotes as follows:- '?'.
- QueryParameters (list) – - The optional query parameters. The following query parameters are valid: - $StartTime$,- $EndTime$, and- $Period$.- (string) – 
 
- ViewProperties (dict) – [REQUIRED] - The view properties for the widget. For more information about view properties, see View properties for widgets in the CloudTrail User Guide. - (string) – - (string) – 
 
 
 
 
- RefreshSchedule (dict) – - The refresh schedule configuration for the dashboard. - Frequency (dict) – - The frequency at which you want the dashboard refreshed. - Unit (string) – - The unit to use for the refresh. - For custom dashboards, the unit can be - HOURSor- DAYS.- For the Highlights dashboard, the - Unitmust be- HOURS.
- Value (integer) – - The value for the refresh schedule. - For custom dashboards, the following values are valid when the unit is - HOURS:- 1,- 6,- 12,- 24- For custom dashboards, the only valid value when the unit is - DAYSis- 1.- For the Highlights dashboard, the - Valuemust be- 6.
 
- Status (string) – - Specifies whether the refresh schedule is enabled. Set the value to - ENABLEDto enable the refresh schedule, or to- DISABLEDto turn off the refresh schedule.
- TimeOfDay (string) – - The time of day in UTC to run the schedule; for hourly only refer to minutes; default is 00:00. 
 
- TerminationProtectionEnabled (boolean) – Specifies whether termination protection is enabled for the dashboard. If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'DashboardArn': 'string', 'Name': 'string', 'Type': 'MANAGED'|'CUSTOM', 'Widgets': [ { 'QueryAlias': 'string', 'QueryStatement': 'string', 'QueryParameters': [ 'string', ], 'ViewProperties': { 'string': 'string' } }, ], 'RefreshSchedule': { 'Frequency': { 'Unit': 'HOURS'|'DAYS', 'Value': 123 }, 'Status': 'ENABLED'|'DISABLED', 'TimeOfDay': 'string' }, 'TerminationProtectionEnabled': True|False, 'CreatedTimestamp': datetime(2015, 1, 1), 'UpdatedTimestamp': datetime(2015, 1, 1) } - Response Structure- (dict) – - DashboardArn (string) – - The ARN for the dashboard. 
- Name (string) – - The name for the dashboard. 
- Type (string) – - The type of dashboard. 
- Widgets (list) – - An array of widgets for the dashboard. - (dict) – - A widget on a CloudTrail Lake dashboard. - QueryAlias (string) – - The query alias used to identify the query for the widget. 
- QueryStatement (string) – - The SQL query statement for the widget. 
- QueryParameters (list) – - The query parameters for the widget. - (string) – 
 
- ViewProperties (dict) – - The view properties for the widget. For more information about view properties, see View properties for widgets in the CloudTrail User Guide.. - (string) – - (string) – 
 
 
 
 
- RefreshSchedule (dict) – - The refresh schedule for the dashboard, if configured. - Frequency (dict) – - The frequency at which you want the dashboard refreshed. - Unit (string) – - The unit to use for the refresh. - For custom dashboards, the unit can be - HOURSor- DAYS.- For the Highlights dashboard, the - Unitmust be- HOURS.
- Value (integer) – - The value for the refresh schedule. - For custom dashboards, the following values are valid when the unit is - HOURS:- 1,- 6,- 12,- 24- For custom dashboards, the only valid value when the unit is - DAYSis- 1.- For the Highlights dashboard, the - Valuemust be- 6.
 
- Status (string) – - Specifies whether the refresh schedule is enabled. Set the value to - ENABLEDto enable the refresh schedule, or to- DISABLEDto turn off the refresh schedule.
- TimeOfDay (string) – - The time of day in UTC to run the schedule; for hourly only refer to minutes; default is 00:00. 
 
- TerminationProtectionEnabled (boolean) – - Indicates whether termination protection is enabled for the dashboard. 
- CreatedTimestamp (datetime) – - The timestamp that shows when the dashboard was created. 
- UpdatedTimestamp (datetime) – - The timestamp that shows when the dashboard was updated. 
 
 
 - Exceptions- CloudTrail.Client.exceptions.ConflictException
- CloudTrail.Client.exceptions.ResourceNotFoundException
- CloudTrail.Client.exceptions.EventDataStoreNotFoundException
- CloudTrail.Client.exceptions.InactiveEventDataStoreException
- CloudTrail.Client.exceptions.InsufficientEncryptionPolicyException
- CloudTrail.Client.exceptions.InvalidQueryStatementException
- CloudTrail.Client.exceptions.ServiceQuotaExceededException
- CloudTrail.Client.exceptions.UnsupportedOperationException