scaleway.cockpit.v1 package
Submodules
scaleway.cockpit.v1.api module
- class scaleway.cockpit.v1.api.CockpitV1GlobalAPI(client: Client, *, bypass_validation: bool = False)
Bases:
API
The Cockpit Global API allows you to manage your Cockpit’s Grafana and plans.
- create_grafana_user(*, login: str, project_id: Optional[str] = None, role: Optional[GrafanaUserRole] = None) GrafanaUser
Create a Grafana user. Create a Grafana user to connect to your Cockpit’s Grafana. Upon creation, your user password displays only once, so make sure that you save it. Each Grafana user is associated with a role: viewer or editor. A viewer can only view dashboards, whereas an editor can create and edit dashboards. Note that the admin username is not available for creation. :param login: Username of the Grafana user. Note that the admin username is not available for creation. :param project_id: ID of the Project in which to create the Grafana user. :param role: Role assigned to the Grafana user. :return:
GrafanaUser
Usage:
result = api.create_grafana_user( login="example", )
- delete_grafana_user(*, project_id: Optional[str] = None, grafana_user_id: int) None
Delete a Grafana user. Delete a Grafana user from your Cockpit’s Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user. :param project_id: ID of the Project to target. :param grafana_user_id: ID of the Grafana user.
Usage:
result = api.delete_grafana_user( grafana_user_id=1, )
- get_current_plan(*, project_id: Optional[str] = None) Plan
Get current plan. Retrieve a pricing plan for the given Project, specified by the ID of the Project. Deprecated, retention is now managed at the data source level. :param project_id: ID of the Project. :return:
Plan
:deprecatedUsage:
result = api.get_current_plan()
- get_grafana(*, project_id: Optional[str] = None) Grafana
Get your Cockpit’s Grafana. Retrieve information on your Cockpit’s Grafana, specified by the ID of the Project the Cockpit belongs to. The output returned displays the URL to access your Cockpit’s Grafana. :param project_id: ID of the Project. :return:
Grafana
Usage:
result = api.get_grafana()
- get_grafana_product_dashboard(*, project_id: Optional[str] = None, dashboard_name: str) GrafanaProductDashboard
Get Scaleway resource dashboard. Retrieve information about the dashboard of a Scaleway resource in Grafana, specified by the ID of the Project the Cockpit belongs to, and the name of the dashboard. :param project_id: ID of the Project the dashboard belongs to. :param dashboard_name: Name of the dashboard. :return:
GrafanaProductDashboard
Usage:
result = api.get_grafana_product_dashboard( dashboard_name="example", )
- list_grafana_product_dashboards(*, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None) ListGrafanaProductDashboardsResponse
List Scaleway resources dashboards. Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit. :param project_id: ID of the Project to target. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter for. :return:
ListGrafanaProductDashboardsResponse
Usage:
result = api.list_grafana_product_dashboards()
- list_grafana_product_dashboards_all(*, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None) List[GrafanaProductDashboard]
List Scaleway resources dashboards. Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit. :param project_id: ID of the Project to target. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter for. :return:
List[GrafanaProductDashboard]
Usage:
result = api.list_grafana_product_dashboards_all()
- list_grafana_users(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListGrafanaUsersRequestOrderBy] = None, project_id: Optional[str] = None) ListGrafanaUsersResponse
List Grafana users. List all Grafana users created in your Cockpit’s Grafana. By default, the Grafana users returned in the list are ordered in ascending order. :param page: Page number. :param page_size: Page size. :param order_by: Order of the Grafana users. :param project_id: ID of the Project to target. :return:
ListGrafanaUsersResponse
Usage:
result = api.list_grafana_users()
- list_grafana_users_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListGrafanaUsersRequestOrderBy] = None, project_id: Optional[str] = None) List[GrafanaUser]
List Grafana users. List all Grafana users created in your Cockpit’s Grafana. By default, the Grafana users returned in the list are ordered in ascending order. :param page: Page number. :param page_size: Page size. :param order_by: Order of the Grafana users. :param project_id: ID of the Project to target. :return:
List[GrafanaUser]
Usage:
result = api.list_grafana_users_all()
- list_plans(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) ListPlansResponse
List plan types. Retrieve a list of available pricing plan types. Deprecated, retention is now managed at the data source level. :param page: Page number. :param page_size: Page size. :param order_by: :return:
ListPlansResponse
:deprecatedUsage:
result = api.list_plans()
- list_plans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) List[Plan]
List plan types. Retrieve a list of available pricing plan types. Deprecated, retention is now managed at the data source level. :param page: Page number. :param page_size: Page size. :param order_by: :return:
List[Plan]
:deprecatedUsage:
result = api.list_plans_all()
- reset_grafana_user_password(*, project_id: Optional[str] = None, grafana_user_id: int) GrafanaUser
Reset a Grafana user password. Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user. A new password regenerates and only displays once. Make sure that you save it. :param project_id: ID of the Project to target. :param grafana_user_id: ID of the Grafana user. :return:
GrafanaUser
Usage:
result = api.reset_grafana_user_password( grafana_user_id=1, )
- select_plan(*, project_id: Optional[str] = None, plan_name: Optional[PlanName] = None) Plan
Apply a pricing plan. Apply a pricing plan on a given Project. You must specify the ID of the pricing plan type. Note that you will be billed for the plan you apply. Deprecated, retention is now managed at the data source level. :param project_id: ID of the Project. :param plan_name: Name of the pricing plan. :return:
Plan
:deprecatedUsage:
result = api.select_plan()
- sync_grafana_data_sources(*, project_id: Optional[str] = None) None
Synchronize Grafana data sources. Trigger the synchronization of all your data sources and the alert manager in the relevant regions. The alert manager will only be synchronized if you have enabled it. :param project_id: ID of the Project to target.
Usage:
result = api.sync_grafana_data_sources()
- class scaleway.cockpit.v1.api.CockpitV1RegionalAPI(client: Client, *, bypass_validation: bool = False)
Bases:
API
The Cockpit Regional API allows you to create data sources and tokens to store and query data types such as metrics, logs, and traces. You can also push your data into Cockpit, and send alerts to your contact points when your resources may require your attention, using the regional Alert manager.
- create_contact_point(*, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[ContactPointEmail] = None) ContactPoint
Create a contact point. Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to. The source of the alerts are data sources within the same Project and region as the Alert manager. If you need to receive alerts for other receivers, you can create additional contact points and receivers in Grafana. Make sure that you select the Scaleway Alert manager. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to create the contact point in. :param email: Email address of the contact point to create. One-Of (‘configuration’): at most one of ‘email’ could be set. :return:
ContactPoint
Usage:
result = api.create_contact_point()
- create_data_source(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, type_: Optional[DataSourceType] = None, retention_days: Optional[int] = None) DataSource
Create a data source. You must specify the data source type upon creation. Available data source types include:
metrics
logs
traces
The name of the data source will then be used as reference to name the associated Grafana data source. :param name: Data source name. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project the data source belongs to. :param type_: Data source type. :param retention_days: Default values are 30 days for metrics, 7 days for logs and traces. :return:
DataSource
Usage:
result = api.create_data_source( name="example", )
- create_token(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) Token
Create a token. Give your token the relevant scopes to ensure it has the right permissions to interact with your data sources and the Alert manager. Make sure that you create your token in the same regions as the data sources you want to use it for. Upon creation, your token’s secret key display only once. Make sure that you save it. :param name: Name of the token. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project the token belongs to. :param token_scopes: Token permission scopes. :return:
Token
Usage:
result = api.create_token( name="example", )
- delete_contact_point(*, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[ContactPointEmail] = None) None
Delete a contact point. Delete a contact point associated with the default receiver. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the contact point to delete. :param email: Email address of the contact point to delete. One-Of (‘configuration’): at most one of ‘email’ could be set.
Usage:
result = api.delete_contact_point()
- delete_data_source(*, data_source_id: str, region: Optional[str] = None) None
Delete a data source. Delete a given data source, specified by the data source ID. Note that deleting a data source is irreversible, and cannot be undone. :param data_source_id: ID of the data source to delete. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = api.delete_data_source( data_source_id="example", )
- delete_token(*, token_id: str, region: Optional[str] = None) None
Delete a token. Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone. :param token_id: ID of the token to delete. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = api.delete_token( token_id="example", )
- disable_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Disable the Alert manager. Disabling the Alert manager deletes the contact points you have created and disables managed alerts in the specified Project and region. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to disable the Alert manager in. :return:
AlertManager
Usage:
result = api.disable_alert_manager()
- disable_managed_alerts(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Disable managed alerts. Disable the sending of managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project. :return:
AlertManager
Usage:
result = api.disable_managed_alerts()
- enable_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Enable the Alert manager. Enabling the Alert manager allows you to enable managed alerts and create contact points in the specified Project and region, to be notified when your Scaleway resources may require your attention. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to enable the Alert manager in. :return:
AlertManager
Usage:
result = api.enable_alert_manager()
- enable_managed_alerts(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Enable managed alerts. Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway recources integrated with Cockpit by default. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project. :return:
AlertManager
Usage:
result = api.enable_managed_alerts()
- get_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Get the Alert manager. Retrieve information about the Alert manager which is unique per Project and region. By default the Alert manager is disabled. The output returned displays a URL to access the Alert manager, and whether the Alert manager and managed alerts are enabled. :param region: Region to target. If none is passed will use default region from the config. :param project_id: Project ID of the requested Alert manager. :return:
AlertManager
Usage:
result = api.get_alert_manager()
- get_config(*, region: Optional[str] = None) GetConfigResponse
Get the Cockpit configuration. :param region: Region to target. If none is passed will use default region from the config. :return:
GetConfigResponse
Usage:
result = api.get_config()
- get_data_source(*, data_source_id: str, region: Optional[str] = None) DataSource
Get a data source. Retrieve information about a given data source, specified by the data source ID. The data source’s information such as its name, type, URL, origin, and retention period, is returned. :param data_source_id: ID of the relevant data source. :param region: Region to target. If none is passed will use default region from the config. :return:
DataSource
Usage:
result = api.get_data_source( data_source_id="example", )
- get_token(*, token_id: str, region: Optional[str] = None) Token
Get a token. Retrieve information about a given token, specified by the token ID. The token’s information such as its scopes, is returned. :param token_id: Token ID. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- get_usage_overview(*, region: Optional[str] = None, project_id: Optional[str] = None, interval: Optional[str] = None) UsageOverview
Get data source usage overview. Retrieve the data source usage overview per type for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: :param interval: :return:
UsageOverview
Usage:
result = api.get_usage_overview()
- list_contact_points(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) ListContactPointsResponse
List contact points. Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Total count of contact points to return per page. :param project_id: ID of the Project containing the contact points to list. :return:
ListContactPointsResponse
Usage:
result = api.list_contact_points()
- list_contact_points_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) List[ContactPoint]
List contact points. Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Total count of contact points to return per page. :param project_id: ID of the Project containing the contact points to list. :return:
List[ContactPoint]
Usage:
result = api.list_contact_points_all()
- list_data_sources(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDataSourcesRequestOrderBy] = None, project_id: Optional[str] = None, origin: Optional[DataSourceOrigin] = None, types: Optional[List[DataSourceType]] = None) ListDataSourcesResponse
List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order. You can list data sources by Project, type and origin. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :param origin: Origin to filter for, only data sources with matching origin will be returned. :param types: Types to filter for, only data sources with matching types will be returned. :return:
ListDataSourcesResponse
Usage:
result = api.list_data_sources()
- list_data_sources_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDataSourcesRequestOrderBy] = None, project_id: Optional[str] = None, origin: Optional[DataSourceOrigin] = None, types: Optional[List[DataSourceType]] = None) List[DataSource]
List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order. You can list data sources by Project, type and origin. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :param origin: Origin to filter for, only data sources with matching origin will be returned. :param types: Types to filter for, only data sources with matching types will be returned. :return:
List[DataSource]
Usage:
result = api.list_data_sources_all()
- list_managed_alerts(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListManagedAlertsRequestOrderBy] = None, project_id: Optional[str] = None) ListManagedAlertsResponse
List managed alerts. List all managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :return:
ListManagedAlertsResponse
Usage:
result = api.list_managed_alerts()
- list_managed_alerts_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListManagedAlertsRequestOrderBy] = None, project_id: Optional[str] = None) List[Alert]
List managed alerts. List all managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :return:
List[Alert]
Usage:
result = api.list_managed_alerts_all()
- list_tokens(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) ListTokensResponse
List tokens. Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of tokens to return per page. :param order_by: Order in which to return results. :param project_id: ID of the Project the tokens belong to. :param token_scopes: Token scopes to filter for. :return:
ListTokensResponse
Usage:
result = api.list_tokens()
- list_tokens_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) List[Token]
List tokens. Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of tokens to return per page. :param order_by: Order in which to return results. :param project_id: ID of the Project the tokens belong to. :param token_scopes: Token scopes to filter for. :return:
List[Token]
Usage:
result = api.list_tokens_all()
- trigger_test_alert(*, region: Optional[str] = None, project_id: Optional[str] = None) None
Trigger a test alert. Send a test alert to the Alert manager to make sure your contact points get notified. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project.
Usage:
result = api.trigger_test_alert()
- update_data_source(*, data_source_id: str, region: Optional[str] = None, name: Optional[str] = None, retention_days: Optional[int] = None) DataSource
Update a data source. Update a given data source name, specified by the data source ID. :param data_source_id: ID of the data source to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Updated name of the data source. :param retention_days: BETA - Duration for which the data will be retained in the data source. :return:
DataSource
Usage:
result = api.update_data_source( data_source_id="example", )
scaleway.cockpit.v1.marshalling module
- scaleway.cockpit.v1.marshalling.marshal_ContactPointEmail(request: ContactPointEmail, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_GlobalApiCreateGrafanaUserRequest(request: GlobalApiCreateGrafanaUserRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_GlobalApiResetGrafanaUserPasswordRequest(request: GlobalApiResetGrafanaUserPasswordRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_GlobalApiSelectPlanRequest(request: GlobalApiSelectPlanRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_GlobalApiSyncGrafanaDataSourcesRequest(request: GlobalApiSyncGrafanaDataSourcesRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiCreateContactPointRequest(request: RegionalApiCreateContactPointRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiCreateDataSourceRequest(request: RegionalApiCreateDataSourceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiCreateTokenRequest(request: RegionalApiCreateTokenRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiDeleteContactPointRequest(request: RegionalApiDeleteContactPointRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiDisableAlertManagerRequest(request: RegionalApiDisableAlertManagerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiDisableManagedAlertsRequest(request: RegionalApiDisableManagedAlertsRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiEnableAlertManagerRequest(request: RegionalApiEnableAlertManagerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiEnableManagedAlertsRequest(request: RegionalApiEnableManagedAlertsRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiTriggerTestAlertRequest(request: RegionalApiTriggerTestAlertRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.marshal_RegionalApiUpdateDataSourceRequest(request: RegionalApiUpdateDataSourceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.cockpit.v1.marshalling.unmarshal_AlertManager(data: Any) AlertManager
- scaleway.cockpit.v1.marshalling.unmarshal_ContactPoint(data: Any) ContactPoint
- scaleway.cockpit.v1.marshalling.unmarshal_ContactPointEmail(data: Any) ContactPointEmail
- scaleway.cockpit.v1.marshalling.unmarshal_DataSource(data: Any) DataSource
- scaleway.cockpit.v1.marshalling.unmarshal_GetConfigResponse(data: Any) GetConfigResponse
- scaleway.cockpit.v1.marshalling.unmarshal_GetConfigResponseRetention(data: Any) GetConfigResponseRetention
- scaleway.cockpit.v1.marshalling.unmarshal_GrafanaProductDashboard(data: Any) GrafanaProductDashboard
- scaleway.cockpit.v1.marshalling.unmarshal_GrafanaUser(data: Any) GrafanaUser
- scaleway.cockpit.v1.marshalling.unmarshal_ListContactPointsResponse(data: Any) ListContactPointsResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListDataSourcesResponse(data: Any) ListDataSourcesResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListGrafanaProductDashboardsResponse(data: Any) ListGrafanaProductDashboardsResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListGrafanaUsersResponse(data: Any) ListGrafanaUsersResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListManagedAlertsResponse(data: Any) ListManagedAlertsResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListPlansResponse(data: Any) ListPlansResponse
- scaleway.cockpit.v1.marshalling.unmarshal_ListTokensResponse(data: Any) ListTokensResponse
- scaleway.cockpit.v1.marshalling.unmarshal_UsageOverview(data: Any) UsageOverview
scaleway.cockpit.v1.types module
- class scaleway.cockpit.v1.types.Alert(product_family: 'str', product: 'str', name: 'str', rule: 'str', description: 'str')
Bases:
object
- description: str
- name: str
- product: str
- product_family: str
- rule: str
- class scaleway.cockpit.v1.types.AlertManager(alert_manager_enabled: bool, managed_alerts_enabled: bool, region: str, alert_manager_url: Optional[str])
Bases:
object
Alert manager information.
- alert_manager_enabled: bool
The Alert manager is enabled.
- alert_manager_url: Optional[str]
Alert manager URL.
- managed_alerts_enabled: bool
Managed alerts are enabled.
- region: str
Regions where the Alert manager is enabled.
- class scaleway.cockpit.v1.types.ContactPoint(region: str, email: Optional[ContactPointEmail])
Bases:
object
Contact point.
- email: Optional[ContactPointEmail]
- region: str
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.DataSource(id: str, project_id: str, name: str, url: str, type_: DataSourceType, origin: DataSourceOrigin, synchronized_with_grafana: bool, retention_days: int, region: str, created_at: Optional[datetime], updated_at: Optional[datetime])
Bases:
object
Data source.
- created_at: Optional[datetime]
Date the data source was created.
- id: str
ID of the data source.
- name: str
Data source name.
- origin: DataSourceOrigin
Data source origin.
- project_id: str
ID of the Project the data source belongs to.
- region: str
Region of the data source.
- retention_days: int
BETA - Duration for which the data will be retained in the data source.
- synchronized_with_grafana: bool
Indicates whether the data source is synchronized with Grafana.
- type_: DataSourceType
Data source type.
- updated_at: Optional[datetime]
Date the data source was last updated.
- url: str
Data source URL.
- class scaleway.cockpit.v1.types.DataSourceOrigin(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CUSTOM = 'custom'
- EXTERNAL = 'external'
- SCALEWAY = 'scaleway'
- UNKNOWN_ORIGIN = 'unknown_origin'
- class scaleway.cockpit.v1.types.DataSourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOGS = 'logs'
- METRICS = 'metrics'
- TRACES = 'traces'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway.cockpit.v1.types.GetConfigResponse(custom_metrics_retention: Optional[GetConfigResponseRetention], custom_logs_retention: Optional[GetConfigResponseRetention], custom_traces_retention: Optional[GetConfigResponseRetention], product_metrics_retention: Optional[GetConfigResponseRetention], product_logs_retention: Optional[GetConfigResponseRetention])
Bases:
object
Cockpit configuration.
- custom_logs_retention: Optional[GetConfigResponseRetention]
Custom logs retention configuration.
- custom_metrics_retention: Optional[GetConfigResponseRetention]
Custom metrics retention configuration.
- custom_traces_retention: Optional[GetConfigResponseRetention]
Custom traces retention configuration.
- product_logs_retention: Optional[GetConfigResponseRetention]
Scaleway logs retention configuration.
- product_metrics_retention: Optional[GetConfigResponseRetention]
Scaleway metrics retention configuration.
- class scaleway.cockpit.v1.types.GetConfigResponseRetention(min_days: 'int', max_days: 'int', default_days: 'int')
Bases:
object
- default_days: int
- max_days: int
- min_days: int
- class scaleway.cockpit.v1.types.GlobalApiCreateGrafanaUserRequest(login: str, project_id: Optional[str], role: Optional[GrafanaUserRole])
Bases:
object
Create a Grafana user.
- login: str
Username of the Grafana user. Note that the admin username is not available for creation.
- project_id: Optional[str]
ID of the Project in which to create the Grafana user.
- role: Optional[GrafanaUserRole]
Role assigned to the Grafana user.
- class scaleway.cockpit.v1.types.GlobalApiDeleteGrafanaUserRequest(project_id: Optional[str], grafana_user_id: int)
Bases:
object
Delete a Grafana user.
- grafana_user_id: int
ID of the Grafana user.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.types.GlobalApiGetCurrentPlanRequest(project_id: Optional[str])
Bases:
object
Retrieve a pricing plan for the given Project.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.types.GlobalApiGetGrafanaProductDashboardRequest(project_id: Optional[str], dashboard_name: str)
Bases:
object
Retrieve a specific dashboard.
- dashboard_name: str
Name of the dashboard.
- project_id: Optional[str]
ID of the Project the dashboard belongs to.
- class scaleway.cockpit.v1.types.GlobalApiGetGrafanaRequest(project_id: Optional[str])
Bases:
object
Request a Grafana.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.types.GlobalApiListGrafanaProductDashboardsRequest(project_id: Optional[str], page: Optional[int], page_size: Optional[int], tags: Optional[List[str]])
Bases:
object
Retrieve a list of available product dashboards.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- project_id: Optional[str]
ID of the Project to target.
- tags: Optional[List[str]]
Tags to filter for.
- class scaleway.cockpit.v1.types.GlobalApiListGrafanaUsersRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListGrafanaUsersRequestOrderBy], project_id: Optional[str])
Bases:
object
List all Grafana users.
- order_by: Optional[ListGrafanaUsersRequestOrderBy]
Order of the Grafana users.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.types.GlobalApiListPlansRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListPlansRequestOrderBy])
Bases:
object
Retrieve a list of available pricing plans.
- order_by: Optional[ListPlansRequestOrderBy]
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- class scaleway.cockpit.v1.types.GlobalApiResetGrafanaUserPasswordRequest(project_id: Optional[str], grafana_user_id: int)
Bases:
object
Reset a Grafana user’s password.
- grafana_user_id: int
ID of the Grafana user.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.types.GlobalApiSelectPlanRequest(project_id: Optional[str], plan_name: Optional[PlanName])
Bases:
object
Select a specific pricing plan.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.types.GlobalApiSyncGrafanaDataSourcesRequest(project_id: Optional[str])
Bases:
object
Trigger the synchronization of all data sources created in the relevant regions.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.types.Grafana(grafana_url: str)
Bases:
object
Grafana user.
- grafana_url: str
URL to access your Cockpit’s Grafana.
- class scaleway.cockpit.v1.types.GrafanaProductDashboard(name: str, title: str, url: str, tags: List[str], variables: List[str])
Bases:
object
Grafana dashboard.
- name: str
Dashboard name.
- tags: List[str]
Dashboard tags.
- title: str
Dashboard title.
- url: str
Dashboard URL.
- variables: List[str]
Dashboard variables.
- class scaleway.cockpit.v1.types.GrafanaUser(id: int, login: str, role: GrafanaUserRole, password: Optional[str])
Bases:
object
Grafana user.
- id: int
ID of the Grafana user.
- login: str
Username of the Grafana user.
- password: Optional[str]
Grafana user’s password.
- role: GrafanaUserRole
Role assigned to the Grafana user.
- class scaleway.cockpit.v1.types.GrafanaUserRole(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- EDITOR = 'editor'
- UNKNOWN_ROLE = 'unknown_role'
- VIEWER = 'viewer'
- class scaleway.cockpit.v1.types.ListContactPointsResponse(total_count: int, contact_points: List[ContactPoint], has_additional_receivers: bool, has_additional_contact_points: bool)
Bases:
object
Response returned when listing contact points.
- contact_points: List[ContactPoint]
List of contact points associated with the default receiver.
- has_additional_contact_points: bool
Indicates whether there are unmanaged contact points on the default receiver.
- has_additional_receivers: bool
Indicates whether the Alert manager has other receivers than the default one.
- total_count: int
Total count of contact points associated with the default receiver.
- class scaleway.cockpit.v1.types.ListDataSourcesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.cockpit.v1.types.ListDataSourcesResponse(total_count: int, data_sources: List[DataSource])
Bases:
object
Response returned when listing data sources.
- data_sources: List[DataSource]
Data sources matching the request within the pagination.
- total_count: int
Total count of data sources matching the request.
- class scaleway.cockpit.v1.types.ListGrafanaProductDashboardsResponse(total_count: int, dashboards: List[GrafanaProductDashboard])
Bases:
object
Output returned when listing dashboards.
- dashboards: List[GrafanaProductDashboard]
Grafana dashboards information.
- total_count: int
Total count of Grafana dashboards.
- class scaleway.cockpit.v1.types.ListGrafanaUsersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOGIN_ASC = 'login_asc'
- LOGIN_DESC = 'login_desc'
- class scaleway.cockpit.v1.types.ListGrafanaUsersResponse(total_count: int, grafana_users: List[GrafanaUser])
Bases:
object
Ouptut returned when listing Grafana users.
- grafana_users: List[GrafanaUser]
Grafana users information.
- total_count: int
Total count of Grafana users.
- class scaleway.cockpit.v1.types.ListManagedAlertsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.cockpit.v1.types.ListManagedAlertsResponse(total_count: int, alerts: List[Alert])
Bases:
object
Response returned when listing data sources.
- total_count: int
Total count of data sources matching the request.
- class scaleway.cockpit.v1.types.ListPlansRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.cockpit.v1.types.ListPlansResponse(total_count: int, plans: List[Plan])
Bases:
object
Output returned when listing pricing plans.
- total_count: int
Total count of available pricing plans.
- class scaleway.cockpit.v1.types.ListTokensRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.cockpit.v1.types.ListTokensResponse(total_count: int, tokens: List[Token])
Bases:
object
Response returned when listing tokens.
- total_count: int
Total count of tokens matching the request.
- class scaleway.cockpit.v1.types.Plan(name: PlanName, sample_ingestion_price: int, logs_ingestion_price: int, traces_ingestion_price: int, monthly_price: int, retention_metrics_interval: Optional[str], retention_logs_interval: Optional[str], retention_traces_interval: Optional[str])
Bases:
object
Type of pricing plan.
- logs_ingestion_price: int
Ingestion price in cents for 1 GB of logs.
- monthly_price: int
Retention price in euros per month.
- retention_logs_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your logs.
- retention_metrics_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your metrics.
- retention_traces_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your traces.
- sample_ingestion_price: int
Ingestion price in cents for 1 million samples.
- traces_ingestion_price: int
Ingestion price in cents for 1 GB of traces.
- class scaleway.cockpit.v1.types.PlanName(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CUSTOM = 'custom'
- FREE = 'free'
- PREMIUM = 'premium'
- UNKNOWN_NAME = 'unknown_name'
- class scaleway.cockpit.v1.types.RegionalApiCreateContactPointRequest(region: Optional[str], project_id: Optional[str], email: Optional[ContactPointEmail])
Bases:
object
Create a contact point.
- email: Optional[ContactPointEmail]
- project_id: Optional[str]
ID of the Project to create the contact point in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiCreateDataSourceRequest(name: str, region: Optional[str], project_id: Optional[str], type_: Optional[DataSourceType], retention_days: Optional[int])
Bases:
object
Create a data source.
- name: str
Data source name.
- project_id: Optional[str]
ID of the Project the data source belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- retention_days: Optional[int]
Default values are 30 days for metrics, 7 days for logs and traces.
- type_: Optional[DataSourceType]
Data source type.
- class scaleway.cockpit.v1.types.RegionalApiCreateTokenRequest(name: str, region: Optional[str], project_id: Optional[str], token_scopes: Optional[List[TokenScope]])
Bases:
object
Create a token.
- name: str
Name of the token.
- project_id: Optional[str]
ID of the Project the token belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_scopes: Optional[List[TokenScope]]
Token permission scopes.
- class scaleway.cockpit.v1.types.RegionalApiDeleteContactPointRequest(region: Optional[str], project_id: Optional[str], email: Optional[ContactPointEmail])
Bases:
object
Delete a contact point.
- email: Optional[ContactPointEmail]
- project_id: Optional[str]
ID of the Project containing the contact point to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiDeleteDataSourceRequest(data_source_id: str, region: Optional[str])
Bases:
object
Delete a data source.
- data_source_id: str
ID of the data source to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiDeleteTokenRequest(token_id: str, region: Optional[str])
Bases:
object
Delete a token.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
ID of the token to delete.
- class scaleway.cockpit.v1.types.RegionalApiDisableAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Disable the Alert manager.
- project_id: Optional[str]
ID of the Project to disable the Alert manager in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiDisableManagedAlertsRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Disable the sending of managed alerts.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiEnableAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Enable the Alert manager.
- project_id: Optional[str]
ID of the Project to enable the Alert manager in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiEnableManagedAlertsRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Enable the sending of managed alerts.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiGetAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Get the Alert manager.
- project_id: Optional[str]
Project ID of the requested Alert manager.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiGetConfigRequest(region: Optional[str])
Bases:
object
Get Cockpit configuration.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiGetDataSourceRequest(data_source_id: str, region: Optional[str])
Bases:
object
Retrieve a data source.
- data_source_id: str
ID of the relevant data source.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiGetTokenRequest(token_id: str, region: Optional[str])
Bases:
object
Get a token.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
Token ID.
- class scaleway.cockpit.v1.types.RegionalApiGetUsageOverviewRequest(region: 'Optional[Region]', project_id: 'Optional[str]', interval: 'Optional[str]')
Bases:
object
- interval: Optional[str]
- project_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiListContactPointsRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], project_id: Optional[str])
Bases:
object
List contact points.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Total count of contact points to return per page.
- project_id: Optional[str]
ID of the Project containing the contact points to list.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiListDataSourcesRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListDataSourcesRequestOrderBy], project_id: Optional[str], origin: Optional[DataSourceOrigin], types: Optional[List[DataSourceType]])
Bases:
object
List data sources.
- order_by: Optional[ListDataSourcesRequestOrderBy]
Sort order for data sources in the response.
- origin: Optional[DataSourceOrigin]
Origin to filter for, only data sources with matching origin will be returned.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of data sources to return per page.
- project_id: Optional[str]
Project ID to filter for, only data sources from this Project will be returned.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- types: Optional[List[DataSourceType]]
Types to filter for, only data sources with matching types will be returned.
- class scaleway.cockpit.v1.types.RegionalApiListManagedAlertsRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListManagedAlertsRequestOrderBy], project_id: Optional[str])
Bases:
object
Enable the sending of managed alerts.
- order_by: Optional[ListManagedAlertsRequestOrderBy]
Sort order for data sources in the response.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of data sources to return per page.
- project_id: Optional[str]
Project ID to filter for, only data sources from this Project will be returned.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiListTokensRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListTokensRequestOrderBy], project_id: Optional[str], token_scopes: Optional[List[TokenScope]])
Bases:
object
List tokens.
- order_by: Optional[ListTokensRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of tokens to return per page.
- project_id: Optional[str]
ID of the Project the tokens belong to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_scopes: Optional[List[TokenScope]]
Token scopes to filter for.
- class scaleway.cockpit.v1.types.RegionalApiTriggerTestAlertRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Request to trigger a test alert.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.types.RegionalApiUpdateDataSourceRequest(data_source_id: str, region: Optional[str], name: Optional[str], retention_days: Optional[int])
Bases:
object
Update a data source name.
- data_source_id: str
ID of the data source to update.
- name: Optional[str]
Updated name of the data source.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- retention_days: Optional[int]
BETA - Duration for which the data will be retained in the data source.
- class scaleway.cockpit.v1.types.Token(id: str, project_id: str, name: str, scopes: List[TokenScope], region: str, created_at: Optional[datetime], updated_at: Optional[datetime], secret_key: Optional[str])
Bases:
object
Token.
- created_at: Optional[datetime]
Token creation date.
- id: str
ID of the token.
- name: str
Name of the token.
- project_id: str
ID of the Project the token belongs to.
- region: str
Regions where the token is located.
- scopes: List[TokenScope]
Token permission scopes.
- secret_key: Optional[str]
Token secret key.
- updated_at: Optional[datetime]
Token last modification date.
- class scaleway.cockpit.v1.types.TokenScope(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- FULL_ACCESS_ALERT_MANAGER = 'full_access_alert_manager'
- FULL_ACCESS_LOGS_RULES = 'full_access_logs_rules'
- FULL_ACCESS_METRICS_RULES = 'full_access_metrics_rules'
- READ_ONLY_LOGS = 'read_only_logs'
- READ_ONLY_METRICS = 'read_only_metrics'
- READ_ONLY_TRACES = 'read_only_traces'
- UNKNOWN_SCOPE = 'unknown_scope'
- WRITE_ONLY_LOGS = 'write_only_logs'
- WRITE_ONLY_METRICS = 'write_only_metrics'
- WRITE_ONLY_TRACES = 'write_only_traces'
- class scaleway.cockpit.v1.types.Usage(project_id: str, data_source_origin: DataSourceOrigin, data_source_type: DataSourceType, unit: UsageUnit, quantity_over_interval: int, region: str, data_source_id: Optional[str], interval: Optional[str])
Bases:
object
Data source usage.
- data_source_id: Optional[str]
ID of the data source.
- data_source_origin: DataSourceOrigin
Origin of the data source.
- data_source_type: DataSourceType
Type of the data source.
- interval: Optional[str]
Interval for the data source usage.
- project_id: str
ID of the Project the data source belongs to.
- quantity_over_interval: int
Data source usage for the given interval.
- region: str
Region of the data source usage.
- class scaleway.cockpit.v1.types.UsageOverview(scaleway_metrics_usage: 'Optional[Usage]', scaleway_logs_usage: 'Optional[Usage]', external_metrics_usage: 'Optional[Usage]', external_logs_usage: 'Optional[Usage]', external_traces_usage: 'Optional[Usage]')
Bases:
object
Module contents
- class scaleway.cockpit.v1.Alert(product_family: 'str', product: 'str', name: 'str', rule: 'str', description: 'str')
Bases:
object
- description: str
- name: str
- product: str
- product_family: str
- rule: str
- class scaleway.cockpit.v1.AlertManager(alert_manager_enabled: bool, managed_alerts_enabled: bool, region: str, alert_manager_url: Optional[str])
Bases:
object
Alert manager information.
- alert_manager_enabled: bool
The Alert manager is enabled.
- alert_manager_url: Optional[str]
Alert manager URL.
- managed_alerts_enabled: bool
Managed alerts are enabled.
- region: str
Regions where the Alert manager is enabled.
- class scaleway.cockpit.v1.CockpitV1GlobalAPI(client: Client, *, bypass_validation: bool = False)
Bases:
API
The Cockpit Global API allows you to manage your Cockpit’s Grafana and plans.
- create_grafana_user(*, login: str, project_id: Optional[str] = None, role: Optional[GrafanaUserRole] = None) GrafanaUser
Create a Grafana user. Create a Grafana user to connect to your Cockpit’s Grafana. Upon creation, your user password displays only once, so make sure that you save it. Each Grafana user is associated with a role: viewer or editor. A viewer can only view dashboards, whereas an editor can create and edit dashboards. Note that the admin username is not available for creation. :param login: Username of the Grafana user. Note that the admin username is not available for creation. :param project_id: ID of the Project in which to create the Grafana user. :param role: Role assigned to the Grafana user. :return:
GrafanaUser
Usage:
result = api.create_grafana_user( login="example", )
- delete_grafana_user(*, project_id: Optional[str] = None, grafana_user_id: int) None
Delete a Grafana user. Delete a Grafana user from your Cockpit’s Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user. :param project_id: ID of the Project to target. :param grafana_user_id: ID of the Grafana user.
Usage:
result = api.delete_grafana_user( grafana_user_id=1, )
- get_current_plan(*, project_id: Optional[str] = None) Plan
Get current plan. Retrieve a pricing plan for the given Project, specified by the ID of the Project. Deprecated, retention is now managed at the data source level. :param project_id: ID of the Project. :return:
Plan
:deprecatedUsage:
result = api.get_current_plan()
- get_grafana(*, project_id: Optional[str] = None) Grafana
Get your Cockpit’s Grafana. Retrieve information on your Cockpit’s Grafana, specified by the ID of the Project the Cockpit belongs to. The output returned displays the URL to access your Cockpit’s Grafana. :param project_id: ID of the Project. :return:
Grafana
Usage:
result = api.get_grafana()
- get_grafana_product_dashboard(*, project_id: Optional[str] = None, dashboard_name: str) GrafanaProductDashboard
Get Scaleway resource dashboard. Retrieve information about the dashboard of a Scaleway resource in Grafana, specified by the ID of the Project the Cockpit belongs to, and the name of the dashboard. :param project_id: ID of the Project the dashboard belongs to. :param dashboard_name: Name of the dashboard. :return:
GrafanaProductDashboard
Usage:
result = api.get_grafana_product_dashboard( dashboard_name="example", )
- list_grafana_product_dashboards(*, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None) ListGrafanaProductDashboardsResponse
List Scaleway resources dashboards. Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit. :param project_id: ID of the Project to target. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter for. :return:
ListGrafanaProductDashboardsResponse
Usage:
result = api.list_grafana_product_dashboards()
- list_grafana_product_dashboards_all(*, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None) List[GrafanaProductDashboard]
List Scaleway resources dashboards. Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit. :param project_id: ID of the Project to target. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter for. :return:
List[GrafanaProductDashboard]
Usage:
result = api.list_grafana_product_dashboards_all()
- list_grafana_users(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListGrafanaUsersRequestOrderBy] = None, project_id: Optional[str] = None) ListGrafanaUsersResponse
List Grafana users. List all Grafana users created in your Cockpit’s Grafana. By default, the Grafana users returned in the list are ordered in ascending order. :param page: Page number. :param page_size: Page size. :param order_by: Order of the Grafana users. :param project_id: ID of the Project to target. :return:
ListGrafanaUsersResponse
Usage:
result = api.list_grafana_users()
- list_grafana_users_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListGrafanaUsersRequestOrderBy] = None, project_id: Optional[str] = None) List[GrafanaUser]
List Grafana users. List all Grafana users created in your Cockpit’s Grafana. By default, the Grafana users returned in the list are ordered in ascending order. :param page: Page number. :param page_size: Page size. :param order_by: Order of the Grafana users. :param project_id: ID of the Project to target. :return:
List[GrafanaUser]
Usage:
result = api.list_grafana_users_all()
- list_plans(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) ListPlansResponse
List plan types. Retrieve a list of available pricing plan types. Deprecated, retention is now managed at the data source level. :param page: Page number. :param page_size: Page size. :param order_by: :return:
ListPlansResponse
:deprecatedUsage:
result = api.list_plans()
- list_plans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) List[Plan]
List plan types. Retrieve a list of available pricing plan types. Deprecated, retention is now managed at the data source level. :param page: Page number. :param page_size: Page size. :param order_by: :return:
List[Plan]
:deprecatedUsage:
result = api.list_plans_all()
- reset_grafana_user_password(*, project_id: Optional[str] = None, grafana_user_id: int) GrafanaUser
Reset a Grafana user password. Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user. A new password regenerates and only displays once. Make sure that you save it. :param project_id: ID of the Project to target. :param grafana_user_id: ID of the Grafana user. :return:
GrafanaUser
Usage:
result = api.reset_grafana_user_password( grafana_user_id=1, )
- select_plan(*, project_id: Optional[str] = None, plan_name: Optional[PlanName] = None) Plan
Apply a pricing plan. Apply a pricing plan on a given Project. You must specify the ID of the pricing plan type. Note that you will be billed for the plan you apply. Deprecated, retention is now managed at the data source level. :param project_id: ID of the Project. :param plan_name: Name of the pricing plan. :return:
Plan
:deprecatedUsage:
result = api.select_plan()
- sync_grafana_data_sources(*, project_id: Optional[str] = None) None
Synchronize Grafana data sources. Trigger the synchronization of all your data sources and the alert manager in the relevant regions. The alert manager will only be synchronized if you have enabled it. :param project_id: ID of the Project to target.
Usage:
result = api.sync_grafana_data_sources()
- class scaleway.cockpit.v1.CockpitV1RegionalAPI(client: Client, *, bypass_validation: bool = False)
Bases:
API
The Cockpit Regional API allows you to create data sources and tokens to store and query data types such as metrics, logs, and traces. You can also push your data into Cockpit, and send alerts to your contact points when your resources may require your attention, using the regional Alert manager.
- create_contact_point(*, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[ContactPointEmail] = None) ContactPoint
Create a contact point. Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to. The source of the alerts are data sources within the same Project and region as the Alert manager. If you need to receive alerts for other receivers, you can create additional contact points and receivers in Grafana. Make sure that you select the Scaleway Alert manager. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to create the contact point in. :param email: Email address of the contact point to create. One-Of (‘configuration’): at most one of ‘email’ could be set. :return:
ContactPoint
Usage:
result = api.create_contact_point()
- create_data_source(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, type_: Optional[DataSourceType] = None, retention_days: Optional[int] = None) DataSource
Create a data source. You must specify the data source type upon creation. Available data source types include:
metrics
logs
traces
The name of the data source will then be used as reference to name the associated Grafana data source. :param name: Data source name. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project the data source belongs to. :param type_: Data source type. :param retention_days: Default values are 30 days for metrics, 7 days for logs and traces. :return:
DataSource
Usage:
result = api.create_data_source( name="example", )
- create_token(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) Token
Create a token. Give your token the relevant scopes to ensure it has the right permissions to interact with your data sources and the Alert manager. Make sure that you create your token in the same regions as the data sources you want to use it for. Upon creation, your token’s secret key display only once. Make sure that you save it. :param name: Name of the token. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project the token belongs to. :param token_scopes: Token permission scopes. :return:
Token
Usage:
result = api.create_token( name="example", )
- delete_contact_point(*, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[ContactPointEmail] = None) None
Delete a contact point. Delete a contact point associated with the default receiver. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the contact point to delete. :param email: Email address of the contact point to delete. One-Of (‘configuration’): at most one of ‘email’ could be set.
Usage:
result = api.delete_contact_point()
- delete_data_source(*, data_source_id: str, region: Optional[str] = None) None
Delete a data source. Delete a given data source, specified by the data source ID. Note that deleting a data source is irreversible, and cannot be undone. :param data_source_id: ID of the data source to delete. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = api.delete_data_source( data_source_id="example", )
- delete_token(*, token_id: str, region: Optional[str] = None) None
Delete a token. Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone. :param token_id: ID of the token to delete. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = api.delete_token( token_id="example", )
- disable_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Disable the Alert manager. Disabling the Alert manager deletes the contact points you have created and disables managed alerts in the specified Project and region. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to disable the Alert manager in. :return:
AlertManager
Usage:
result = api.disable_alert_manager()
- disable_managed_alerts(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Disable managed alerts. Disable the sending of managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project. :return:
AlertManager
Usage:
result = api.disable_managed_alerts()
- enable_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Enable the Alert manager. Enabling the Alert manager allows you to enable managed alerts and create contact points in the specified Project and region, to be notified when your Scaleway resources may require your attention. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to enable the Alert manager in. :return:
AlertManager
Usage:
result = api.enable_alert_manager()
- enable_managed_alerts(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Enable managed alerts. Enable the sending of managed alerts for the specified Project. Managed alerts are predefined alerts that apply to Scaleway recources integrated with Cockpit by default. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project. :return:
AlertManager
Usage:
result = api.enable_managed_alerts()
- get_alert_manager(*, region: Optional[str] = None, project_id: Optional[str] = None) AlertManager
Get the Alert manager. Retrieve information about the Alert manager which is unique per Project and region. By default the Alert manager is disabled. The output returned displays a URL to access the Alert manager, and whether the Alert manager and managed alerts are enabled. :param region: Region to target. If none is passed will use default region from the config. :param project_id: Project ID of the requested Alert manager. :return:
AlertManager
Usage:
result = api.get_alert_manager()
- get_config(*, region: Optional[str] = None) GetConfigResponse
Get the Cockpit configuration. :param region: Region to target. If none is passed will use default region from the config. :return:
GetConfigResponse
Usage:
result = api.get_config()
- get_data_source(*, data_source_id: str, region: Optional[str] = None) DataSource
Get a data source. Retrieve information about a given data source, specified by the data source ID. The data source’s information such as its name, type, URL, origin, and retention period, is returned. :param data_source_id: ID of the relevant data source. :param region: Region to target. If none is passed will use default region from the config. :return:
DataSource
Usage:
result = api.get_data_source( data_source_id="example", )
- get_token(*, token_id: str, region: Optional[str] = None) Token
Get a token. Retrieve information about a given token, specified by the token ID. The token’s information such as its scopes, is returned. :param token_id: Token ID. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- get_usage_overview(*, region: Optional[str] = None, project_id: Optional[str] = None, interval: Optional[str] = None) UsageOverview
Get data source usage overview. Retrieve the data source usage overview per type for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: :param interval: :return:
UsageOverview
Usage:
result = api.get_usage_overview()
- list_contact_points(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) ListContactPointsResponse
List contact points. Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Total count of contact points to return per page. :param project_id: ID of the Project containing the contact points to list. :return:
ListContactPointsResponse
Usage:
result = api.list_contact_points()
- list_contact_points_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) List[ContactPoint]
List contact points. Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Total count of contact points to return per page. :param project_id: ID of the Project containing the contact points to list. :return:
List[ContactPoint]
Usage:
result = api.list_contact_points_all()
- list_data_sources(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDataSourcesRequestOrderBy] = None, project_id: Optional[str] = None, origin: Optional[DataSourceOrigin] = None, types: Optional[List[DataSourceType]] = None) ListDataSourcesResponse
List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order. You can list data sources by Project, type and origin. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :param origin: Origin to filter for, only data sources with matching origin will be returned. :param types: Types to filter for, only data sources with matching types will be returned. :return:
ListDataSourcesResponse
Usage:
result = api.list_data_sources()
- list_data_sources_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDataSourcesRequestOrderBy] = None, project_id: Optional[str] = None, origin: Optional[DataSourceOrigin] = None, types: Optional[List[DataSourceType]] = None) List[DataSource]
List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order. You can list data sources by Project, type and origin. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :param origin: Origin to filter for, only data sources with matching origin will be returned. :param types: Types to filter for, only data sources with matching types will be returned. :return:
List[DataSource]
Usage:
result = api.list_data_sources_all()
- list_managed_alerts(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListManagedAlertsRequestOrderBy] = None, project_id: Optional[str] = None) ListManagedAlertsResponse
List managed alerts. List all managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :return:
ListManagedAlertsResponse
Usage:
result = api.list_managed_alerts()
- list_managed_alerts_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListManagedAlertsRequestOrderBy] = None, project_id: Optional[str] = None) List[Alert]
List managed alerts. List all managed alerts for the specified Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of data sources to return per page. :param order_by: Sort order for data sources in the response. :param project_id: Project ID to filter for, only data sources from this Project will be returned. :return:
List[Alert]
Usage:
result = api.list_managed_alerts_all()
- list_tokens(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) ListTokensResponse
List tokens. Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of tokens to return per page. :param order_by: Order in which to return results. :param project_id: ID of the Project the tokens belong to. :param token_scopes: Token scopes to filter for. :return:
ListTokensResponse
Usage:
result = api.list_tokens()
- list_tokens_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None, token_scopes: Optional[List[TokenScope]] = None) List[Token]
List tokens. Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results. :param page_size: Number of tokens to return per page. :param order_by: Order in which to return results. :param project_id: ID of the Project the tokens belong to. :param token_scopes: Token scopes to filter for. :return:
List[Token]
Usage:
result = api.list_tokens_all()
- trigger_test_alert(*, region: Optional[str] = None, project_id: Optional[str] = None) None
Trigger a test alert. Send a test alert to the Alert manager to make sure your contact points get notified. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project.
Usage:
result = api.trigger_test_alert()
- update_data_source(*, data_source_id: str, region: Optional[str] = None, name: Optional[str] = None, retention_days: Optional[int] = None) DataSource
Update a data source. Update a given data source name, specified by the data source ID. :param data_source_id: ID of the data source to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Updated name of the data source. :param retention_days: BETA - Duration for which the data will be retained in the data source. :return:
DataSource
Usage:
result = api.update_data_source( data_source_id="example", )
- class scaleway.cockpit.v1.ContactPoint(region: str, email: Optional[ContactPointEmail])
Bases:
object
Contact point.
- email: Optional[ContactPointEmail]
- region: str
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.DataSource(id: str, project_id: str, name: str, url: str, type_: DataSourceType, origin: DataSourceOrigin, synchronized_with_grafana: bool, retention_days: int, region: str, created_at: Optional[datetime], updated_at: Optional[datetime])
Bases:
object
Data source.
- created_at: Optional[datetime]
Date the data source was created.
- id: str
ID of the data source.
- name: str
Data source name.
- origin: DataSourceOrigin
Data source origin.
- project_id: str
ID of the Project the data source belongs to.
- region: str
Region of the data source.
- retention_days: int
BETA - Duration for which the data will be retained in the data source.
- synchronized_with_grafana: bool
Indicates whether the data source is synchronized with Grafana.
- type_: DataSourceType
Data source type.
- updated_at: Optional[datetime]
Date the data source was last updated.
- url: str
Data source URL.
- class scaleway.cockpit.v1.DataSourceOrigin(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CUSTOM = 'custom'
- EXTERNAL = 'external'
- SCALEWAY = 'scaleway'
- UNKNOWN_ORIGIN = 'unknown_origin'
- class scaleway.cockpit.v1.DataSourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOGS = 'logs'
- METRICS = 'metrics'
- TRACES = 'traces'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway.cockpit.v1.GetConfigResponse(custom_metrics_retention: Optional[GetConfigResponseRetention], custom_logs_retention: Optional[GetConfigResponseRetention], custom_traces_retention: Optional[GetConfigResponseRetention], product_metrics_retention: Optional[GetConfigResponseRetention], product_logs_retention: Optional[GetConfigResponseRetention])
Bases:
object
Cockpit configuration.
- custom_logs_retention: Optional[GetConfigResponseRetention]
Custom logs retention configuration.
- custom_metrics_retention: Optional[GetConfigResponseRetention]
Custom metrics retention configuration.
- custom_traces_retention: Optional[GetConfigResponseRetention]
Custom traces retention configuration.
- product_logs_retention: Optional[GetConfigResponseRetention]
Scaleway logs retention configuration.
- product_metrics_retention: Optional[GetConfigResponseRetention]
Scaleway metrics retention configuration.
- class scaleway.cockpit.v1.GetConfigResponseRetention(min_days: 'int', max_days: 'int', default_days: 'int')
Bases:
object
- default_days: int
- max_days: int
- min_days: int
- class scaleway.cockpit.v1.GlobalApiCreateGrafanaUserRequest(login: str, project_id: Optional[str], role: Optional[GrafanaUserRole])
Bases:
object
Create a Grafana user.
- login: str
Username of the Grafana user. Note that the admin username is not available for creation.
- project_id: Optional[str]
ID of the Project in which to create the Grafana user.
- role: Optional[GrafanaUserRole]
Role assigned to the Grafana user.
- class scaleway.cockpit.v1.GlobalApiDeleteGrafanaUserRequest(project_id: Optional[str], grafana_user_id: int)
Bases:
object
Delete a Grafana user.
- grafana_user_id: int
ID of the Grafana user.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.GlobalApiGetCurrentPlanRequest(project_id: Optional[str])
Bases:
object
Retrieve a pricing plan for the given Project.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.GlobalApiGetGrafanaProductDashboardRequest(project_id: Optional[str], dashboard_name: str)
Bases:
object
Retrieve a specific dashboard.
- dashboard_name: str
Name of the dashboard.
- project_id: Optional[str]
ID of the Project the dashboard belongs to.
- class scaleway.cockpit.v1.GlobalApiGetGrafanaRequest(project_id: Optional[str])
Bases:
object
Request a Grafana.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.GlobalApiListGrafanaProductDashboardsRequest(project_id: Optional[str], page: Optional[int], page_size: Optional[int], tags: Optional[List[str]])
Bases:
object
Retrieve a list of available product dashboards.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- project_id: Optional[str]
ID of the Project to target.
- tags: Optional[List[str]]
Tags to filter for.
- class scaleway.cockpit.v1.GlobalApiListGrafanaUsersRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListGrafanaUsersRequestOrderBy], project_id: Optional[str])
Bases:
object
List all Grafana users.
- order_by: Optional[ListGrafanaUsersRequestOrderBy]
Order of the Grafana users.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.GlobalApiListPlansRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListPlansRequestOrderBy])
Bases:
object
Retrieve a list of available pricing plans.
- order_by: Optional[ListPlansRequestOrderBy]
- page: Optional[int]
Page number.
- page_size: Optional[int]
Page size.
- class scaleway.cockpit.v1.GlobalApiResetGrafanaUserPasswordRequest(project_id: Optional[str], grafana_user_id: int)
Bases:
object
Reset a Grafana user’s password.
- grafana_user_id: int
ID of the Grafana user.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.GlobalApiSelectPlanRequest(project_id: Optional[str], plan_name: Optional[PlanName])
Bases:
object
Select a specific pricing plan.
- project_id: Optional[str]
ID of the Project.
- class scaleway.cockpit.v1.GlobalApiSyncGrafanaDataSourcesRequest(project_id: Optional[str])
Bases:
object
Trigger the synchronization of all data sources created in the relevant regions.
- project_id: Optional[str]
ID of the Project to target.
- class scaleway.cockpit.v1.Grafana(grafana_url: str)
Bases:
object
Grafana user.
- grafana_url: str
URL to access your Cockpit’s Grafana.
- class scaleway.cockpit.v1.GrafanaProductDashboard(name: str, title: str, url: str, tags: List[str], variables: List[str])
Bases:
object
Grafana dashboard.
- name: str
Dashboard name.
- tags: List[str]
Dashboard tags.
- title: str
Dashboard title.
- url: str
Dashboard URL.
- variables: List[str]
Dashboard variables.
- class scaleway.cockpit.v1.GrafanaUser(id: int, login: str, role: GrafanaUserRole, password: Optional[str])
Bases:
object
Grafana user.
- id: int
ID of the Grafana user.
- login: str
Username of the Grafana user.
- password: Optional[str]
Grafana user’s password.
- role: GrafanaUserRole
Role assigned to the Grafana user.
- class scaleway.cockpit.v1.GrafanaUserRole(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- EDITOR = 'editor'
- UNKNOWN_ROLE = 'unknown_role'
- VIEWER = 'viewer'
- class scaleway.cockpit.v1.ListContactPointsResponse(total_count: int, contact_points: List[ContactPoint], has_additional_receivers: bool, has_additional_contact_points: bool)
Bases:
object
Response returned when listing contact points.
- contact_points: List[ContactPoint]
List of contact points associated with the default receiver.
- has_additional_contact_points: bool
Indicates whether there are unmanaged contact points on the default receiver.
- has_additional_receivers: bool
Indicates whether the Alert manager has other receivers than the default one.
- total_count: int
Total count of contact points associated with the default receiver.
- class scaleway.cockpit.v1.ListDataSourcesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.cockpit.v1.ListDataSourcesResponse(total_count: int, data_sources: List[DataSource])
Bases:
object
Response returned when listing data sources.
- data_sources: List[DataSource]
Data sources matching the request within the pagination.
- total_count: int
Total count of data sources matching the request.
- class scaleway.cockpit.v1.ListGrafanaProductDashboardsResponse(total_count: int, dashboards: List[GrafanaProductDashboard])
Bases:
object
Output returned when listing dashboards.
- dashboards: List[GrafanaProductDashboard]
Grafana dashboards information.
- total_count: int
Total count of Grafana dashboards.
- class scaleway.cockpit.v1.ListGrafanaUsersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOGIN_ASC = 'login_asc'
- LOGIN_DESC = 'login_desc'
- class scaleway.cockpit.v1.ListGrafanaUsersResponse(total_count: int, grafana_users: List[GrafanaUser])
Bases:
object
Ouptut returned when listing Grafana users.
- grafana_users: List[GrafanaUser]
Grafana users information.
- total_count: int
Total count of Grafana users.
- class scaleway.cockpit.v1.ListManagedAlertsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.cockpit.v1.ListManagedAlertsResponse(total_count: int, alerts: List[Alert])
Bases:
object
Response returned when listing data sources.
- total_count: int
Total count of data sources matching the request.
- class scaleway.cockpit.v1.ListPlansRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.cockpit.v1.ListPlansResponse(total_count: int, plans: List[Plan])
Bases:
object
Output returned when listing pricing plans.
- total_count: int
Total count of available pricing plans.
- class scaleway.cockpit.v1.ListTokensRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.cockpit.v1.ListTokensResponse(total_count: int, tokens: List[Token])
Bases:
object
Response returned when listing tokens.
- total_count: int
Total count of tokens matching the request.
- class scaleway.cockpit.v1.Plan(name: PlanName, sample_ingestion_price: int, logs_ingestion_price: int, traces_ingestion_price: int, monthly_price: int, retention_metrics_interval: Optional[str], retention_logs_interval: Optional[str], retention_traces_interval: Optional[str])
Bases:
object
Type of pricing plan.
- logs_ingestion_price: int
Ingestion price in cents for 1 GB of logs.
- monthly_price: int
Retention price in euros per month.
- retention_logs_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your logs.
- retention_metrics_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your metrics.
- retention_traces_interval: Optional[str]
Interval of time during which Scaleway’s Cockpit keeps your traces.
- sample_ingestion_price: int
Ingestion price in cents for 1 million samples.
- traces_ingestion_price: int
Ingestion price in cents for 1 GB of traces.
- class scaleway.cockpit.v1.PlanName(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CUSTOM = 'custom'
- FREE = 'free'
- PREMIUM = 'premium'
- UNKNOWN_NAME = 'unknown_name'
- class scaleway.cockpit.v1.RegionalApiCreateContactPointRequest(region: Optional[str], project_id: Optional[str], email: Optional[ContactPointEmail])
Bases:
object
Create a contact point.
- email: Optional[ContactPointEmail]
- project_id: Optional[str]
ID of the Project to create the contact point in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiCreateDataSourceRequest(name: str, region: Optional[str], project_id: Optional[str], type_: Optional[DataSourceType], retention_days: Optional[int])
Bases:
object
Create a data source.
- name: str
Data source name.
- project_id: Optional[str]
ID of the Project the data source belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- retention_days: Optional[int]
Default values are 30 days for metrics, 7 days for logs and traces.
- type_: Optional[DataSourceType]
Data source type.
- class scaleway.cockpit.v1.RegionalApiCreateTokenRequest(name: str, region: Optional[str], project_id: Optional[str], token_scopes: Optional[List[TokenScope]])
Bases:
object
Create a token.
- name: str
Name of the token.
- project_id: Optional[str]
ID of the Project the token belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_scopes: Optional[List[TokenScope]]
Token permission scopes.
- class scaleway.cockpit.v1.RegionalApiDeleteContactPointRequest(region: Optional[str], project_id: Optional[str], email: Optional[ContactPointEmail])
Bases:
object
Delete a contact point.
- email: Optional[ContactPointEmail]
- project_id: Optional[str]
ID of the Project containing the contact point to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiDeleteDataSourceRequest(data_source_id: str, region: Optional[str])
Bases:
object
Delete a data source.
- data_source_id: str
ID of the data source to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiDeleteTokenRequest(token_id: str, region: Optional[str])
Bases:
object
Delete a token.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
ID of the token to delete.
- class scaleway.cockpit.v1.RegionalApiDisableAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Disable the Alert manager.
- project_id: Optional[str]
ID of the Project to disable the Alert manager in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiDisableManagedAlertsRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Disable the sending of managed alerts.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiEnableAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Enable the Alert manager.
- project_id: Optional[str]
ID of the Project to enable the Alert manager in.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiEnableManagedAlertsRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Enable the sending of managed alerts.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiGetAlertManagerRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Get the Alert manager.
- project_id: Optional[str]
Project ID of the requested Alert manager.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiGetConfigRequest(region: Optional[str])
Bases:
object
Get Cockpit configuration.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiGetDataSourceRequest(data_source_id: str, region: Optional[str])
Bases:
object
Retrieve a data source.
- data_source_id: str
ID of the relevant data source.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiGetTokenRequest(token_id: str, region: Optional[str])
Bases:
object
Get a token.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
Token ID.
- class scaleway.cockpit.v1.RegionalApiGetUsageOverviewRequest(region: 'Optional[Region]', project_id: 'Optional[str]', interval: 'Optional[str]')
Bases:
object
- interval: Optional[str]
- project_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiListContactPointsRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], project_id: Optional[str])
Bases:
object
List contact points.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Total count of contact points to return per page.
- project_id: Optional[str]
ID of the Project containing the contact points to list.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiListDataSourcesRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListDataSourcesRequestOrderBy], project_id: Optional[str], origin: Optional[DataSourceOrigin], types: Optional[List[DataSourceType]])
Bases:
object
List data sources.
- order_by: Optional[ListDataSourcesRequestOrderBy]
Sort order for data sources in the response.
- origin: Optional[DataSourceOrigin]
Origin to filter for, only data sources with matching origin will be returned.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of data sources to return per page.
- project_id: Optional[str]
Project ID to filter for, only data sources from this Project will be returned.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- types: Optional[List[DataSourceType]]
Types to filter for, only data sources with matching types will be returned.
- class scaleway.cockpit.v1.RegionalApiListManagedAlertsRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListManagedAlertsRequestOrderBy], project_id: Optional[str])
Bases:
object
Enable the sending of managed alerts.
- order_by: Optional[ListManagedAlertsRequestOrderBy]
Sort order for data sources in the response.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of data sources to return per page.
- project_id: Optional[str]
Project ID to filter for, only data sources from this Project will be returned.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiListTokensRequest(region: Optional[str], page: Optional[int], page_size: Optional[int], order_by: Optional[ListTokensRequestOrderBy], project_id: Optional[str], token_scopes: Optional[List[TokenScope]])
Bases:
object
List tokens.
- order_by: Optional[ListTokensRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number to return, from the paginated results.
- page_size: Optional[int]
Number of tokens to return per page.
- project_id: Optional[str]
ID of the Project the tokens belong to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_scopes: Optional[List[TokenScope]]
Token scopes to filter for.
- class scaleway.cockpit.v1.RegionalApiTriggerTestAlertRequest(region: Optional[str], project_id: Optional[str])
Bases:
object
Request to trigger a test alert.
- project_id: Optional[str]
ID of the Project.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.cockpit.v1.RegionalApiUpdateDataSourceRequest(data_source_id: str, region: Optional[str], name: Optional[str], retention_days: Optional[int])
Bases:
object
Update a data source name.
- data_source_id: str
ID of the data source to update.
- name: Optional[str]
Updated name of the data source.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- retention_days: Optional[int]
BETA - Duration for which the data will be retained in the data source.
- class scaleway.cockpit.v1.Token(id: str, project_id: str, name: str, scopes: List[TokenScope], region: str, created_at: Optional[datetime], updated_at: Optional[datetime], secret_key: Optional[str])
Bases:
object
Token.
- created_at: Optional[datetime]
Token creation date.
- id: str
ID of the token.
- name: str
Name of the token.
- project_id: str
ID of the Project the token belongs to.
- region: str
Regions where the token is located.
- scopes: List[TokenScope]
Token permission scopes.
- secret_key: Optional[str]
Token secret key.
- updated_at: Optional[datetime]
Token last modification date.
- class scaleway.cockpit.v1.TokenScope(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- FULL_ACCESS_ALERT_MANAGER = 'full_access_alert_manager'
- FULL_ACCESS_LOGS_RULES = 'full_access_logs_rules'
- FULL_ACCESS_METRICS_RULES = 'full_access_metrics_rules'
- READ_ONLY_LOGS = 'read_only_logs'
- READ_ONLY_METRICS = 'read_only_metrics'
- READ_ONLY_TRACES = 'read_only_traces'
- UNKNOWN_SCOPE = 'unknown_scope'
- WRITE_ONLY_LOGS = 'write_only_logs'
- WRITE_ONLY_METRICS = 'write_only_metrics'
- WRITE_ONLY_TRACES = 'write_only_traces'
- class scaleway.cockpit.v1.Usage(project_id: str, data_source_origin: DataSourceOrigin, data_source_type: DataSourceType, unit: UsageUnit, quantity_over_interval: int, region: str, data_source_id: Optional[str], interval: Optional[str])
Bases:
object
Data source usage.
- data_source_id: Optional[str]
ID of the data source.
- data_source_origin: DataSourceOrigin
Origin of the data source.
- data_source_type: DataSourceType
Type of the data source.
- interval: Optional[str]
Interval for the data source usage.
- project_id: str
ID of the Project the data source belongs to.
- quantity_over_interval: int
Data source usage for the given interval.
- region: str
Region of the data source usage.
- class scaleway.cockpit.v1.UsageOverview(scaleway_metrics_usage: 'Optional[Usage]', scaleway_logs_usage: 'Optional[Usage]', external_metrics_usage: 'Optional[Usage]', external_logs_usage: 'Optional[Usage]', external_traces_usage: 'Optional[Usage]')
Bases:
object