Delete a dashboard

Updated at:

Deletes a dashboard by calling the DeleteDashboard operation.

Prerequisites

Make sure that the following prerequisites are met:

Parameters

def delete_dashboard(self, project, entity):

Request parameters

Parameter

Type

Required

Description

Example

project

str

Yes

The name of the project.

ali-test-project

entity

str

Yes

The name of the dashboard.

dashboard-1727682337978-123456

Response parameters

For more information about the response parameters, see DeleteDashboard.

Sample code

from aliyun.log import LogClient
import os


def main():
    # This example retrieves the AccessKey ID and AccessKey Secret from environment variables.
    accessKeyId = os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', '')
    accessKey = os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', '')

    # The Log Service endpoint.
    endpoint = "cn-hangzhou.log.aliyuncs.com"

    project = 'ali-test-project'
    dashboard = 'dashboard-1727682337978-123456'

    client = LogClient(endpoint, accessKeyId, accessKey, "")

    res = client.delete_dashboard(project, dashboard)
    res.log_print()


if __name__ == '__main__':
    main()

References