scaleway.cockpit.v1beta1 package

Submodules

scaleway.cockpit.v1beta1.api module

class scaleway.cockpit.v1beta1.api.CockpitV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs.

activate_cockpit(*, project_id: Optional[str] = None) Cockpit

Activate the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.activate_cockpit()
create_contact_point(*, project_id: Optional[str] = None, contact_point: Optional[ContactPoint] = None) ContactPoint

Create a contact point associated with the default receiver, to receive alerts. :param project_id: ID of the Project in which to create the contact point. :param contact_point: Contact point to create. :return: ContactPoint

Usage:

result = api.create_contact_point()
create_datasource(*, name: str, is_default: bool, project_id: Optional[str] = None, type_: Optional[DatasourceType] = None) Datasource

Create a data source for a given Project specified by the Project ID and the data source type. :param name: Data source name. :param is_default: Specifies that the returned output is the default data source per type. :param project_id: ID of the Project the Cockpit belongs to. :param type_: Data source type. :return: Datasource

Usage:

result = api.create_datasource(
    name="example",
    is_default=False,
)
create_grafana_user(*, login: str, project_id: Optional[str] = None, role: Optional[GrafanaUserRole] = None) GrafanaUser

Create a Grafana user for your Cockpit’s Grafana. Make sure you save the automatically-generated password and the Grafana user ID. :param login: Username of the Grafana user. :param project_id: ID of the Project. :param role: Role assigned to the Grafana user. :return: GrafanaUser

Usage:

result = api.create_grafana_user(
    login="example",
)
create_token(*, project_id: Optional[str] = None, name: Optional[str] = None, scopes: Optional[TokenScopes] = None) Token

Create a token in a given Project specified by the Project ID. :param project_id: ID of the Project. :param name: Name of the token. :param scopes: Token’s permissions. :return: Token

Usage:

result = api.create_token()
deactivate_cockpit(*, project_id: Optional[str] = None) Cockpit

Deactivate the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.deactivate_cockpit()
delete_contact_point(*, project_id: Optional[str] = None, contact_point: Optional[ContactPoint] = None) None

Delete a contact point associated with the default receiver. :param project_id: ID of the Project. :param contact_point: Contact point to delete.

Usage:

result = api.delete_contact_point()
delete_datasource(*, datasource_id: str) None

Delete a given data source specified by the data source ID. :param datasource_id: ID of the data source.

Usage:

result = api.delete_datasource(
    datasource_id="example",
)
delete_grafana_user(*, project_id: Optional[str] = None, grafana_user_id: int) None

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. :param grafana_user_id: ID of the Grafana user.

Usage:

result = api.delete_grafana_user(
    grafana_user_id=1,
)
delete_token(*, token_id: str) None

Delete a given token specified by the token ID. :param token_id: ID of the token.

Usage:

result = api.delete_token(
    token_id="example",
)
disable_managed_alerts(*, project_id: Optional[str] = None) None

Disable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project.

Usage:

result = api.disable_managed_alerts()
enable_managed_alerts(*, project_id: Optional[str] = None) None

Enable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project.

Usage:

result = api.enable_managed_alerts()
get_cockpit(*, project_id: Optional[str] = None) Cockpit

Retrieve the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.get_cockpit()
get_cockpit_metrics(*, project_id: Optional[str] = None, start_date: Optional[datetime] = None, end_date: Optional[datetime] = None, metric_name: Optional[str] = None) CockpitMetrics

Retrieve metrics from your Cockpit specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project the Cockpit belongs to. :param start_date: Desired time range’s start date for the metrics. :param end_date: Desired time range’s end date for the metrics. :param metric_name: Name of the metric requested. :return: CockpitMetrics

Usage:

result = api.get_cockpit_metrics()
get_grafana_product_dashboard(*, project_id: Optional[str] = None, dashboard_name: str) GrafanaProductDashboard

Get a product dashboard. Get a product dashboard specified by the dashboard ID. :param project_id: ID of the Project. :param dashboard_name: Name of the dashboard. :return: GrafanaProductDashboard

Usage:

result = api.get_grafana_product_dashboard(
    dashboard_name="example",
)
get_token(*, token_id: str) Token

Retrieve a given token specified by the token ID. :param token_id: ID of the token. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
list_contact_points(*, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) ListContactPointsResponse

Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param page: Page number. :param page_size: Page size. :param project_id: ID of the Project from which to list the contact points. :return: ListContactPointsResponse

Usage:

result = api.list_contact_points()
list_contact_points_all(*, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) List[ContactPoint]

Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param page: Page number. :param page_size: Page size. :param project_id: ID of the Project from which to list the contact points. :return: List[ContactPoint]

Usage:

result = api.list_contact_points_all()
list_datasources(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDatasourcesRequestOrderBy] = None, project_id: Optional[str] = None, types: Optional[List[DatasourceType]] = None, is_managed_by_scaleway: Optional[bool] = None) ListDatasourcesResponse

Get a list of data sources for the specified Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :param types: Filter by datasource types. :param is_managed_by_scaleway: Filter by managed datasources. :return: ListDatasourcesResponse

Usage:

result = api.list_datasources()
list_datasources_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDatasourcesRequestOrderBy] = None, project_id: Optional[str] = None, types: Optional[List[DatasourceType]] = None, is_managed_by_scaleway: Optional[bool] = None) List[Datasource]

Get a list of data sources for the specified Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :param types: Filter by datasource types. :param is_managed_by_scaleway: Filter by managed datasources. :return: List[Datasource]

Usage:

result = api.list_datasources_all()
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 product dashboards. Get a list of available product dashboards. :param project_id: ID of the Project. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter the dashboards. :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 product dashboards. Get a list of available product dashboards. :param project_id: ID of the Project. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter the dashboards. :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

Get a list of all Grafana users created in your Cockpit’s Grafana. :param page: Page number. :param page_size: Page size. :param order_by: :param project_id: ID of the Project. :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]

Get a list of all Grafana users created in your Cockpit’s Grafana. :param page: Page number. :param page_size: Page size. :param order_by: :param project_id: ID of the Project. :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

Get a list of all pricing plans available. :param page: Page number. :param page_size: Page size. :param order_by: :return: ListPlansResponse

Usage:

result = api.list_plans()
list_plans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) List[Plan]

Get a list of all pricing plans available. :param page: Page number. :param page_size: Page size. :param order_by: :return: List[Plan]

Usage:

result = api.list_plans_all()
list_tokens(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None) ListTokensResponse

Get a list of tokens in a given Project specified by the Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :return: ListTokensResponse

Usage:

result = api.list_tokens()
list_tokens_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None) List[Token]

Get a list of tokens in a given Project specified by the Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :return: List[Token]

Usage:

result = api.list_tokens_all()
reset_grafana_user_password(*, project_id: Optional[str] = None, grafana_user_id: int) GrafanaUser

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. :param project_id: ID of the Project. :param grafana_user_id: ID of the Grafana user. :return: GrafanaUser

Usage:

result = api.reset_grafana_user_password(
    grafana_user_id=1,
)
select_plan(*, plan_id: str, project_id: Optional[str] = None) SelectPlanResponse

Select your chosen pricing plan for your Cockpit, specifying the Cockpit’s Project ID and the pricing plan’s ID in the request. :param plan_id: ID of the pricing plan. :param project_id: ID of the Project. :return: SelectPlanResponse

Usage:

result = api.select_plan(
    plan_id="example",
)
trigger_test_alert(*, project_id: Optional[str] = None) None

Send a test alert to make sure your contact points get notified when an actual alert is triggered. :param project_id:

Usage:

result = api.trigger_test_alert()
wait_for_cockpit(*, project_id: Optional[str] = None, options: Optional[WaitForOptions[Cockpit, bool]] = None) Cockpit

Retrieve the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.get_cockpit()

scaleway.cockpit.v1beta1.content module

scaleway.cockpit.v1beta1.content.COCKPIT_TRANSIENT_STATUSES: List[CockpitStatus] = [<CockpitStatus.CREATING: 'creating'>, <CockpitStatus.DELETING: 'deleting'>, <CockpitStatus.UPDATING: 'updating'>]

Lists transient statutes of the enum CockpitStatus.

scaleway.cockpit.v1beta1.marshalling module

scaleway.cockpit.v1beta1.marshalling.marshal_ActivateCockpitRequest(request: ActivateCockpitRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_ContactPoint(request: ContactPoint, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_ContactPointEmail(request: ContactPointEmail, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_CreateContactPointRequest(request: CreateContactPointRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_CreateDatasourceRequest(request: CreateDatasourceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_CreateGrafanaUserRequest(request: CreateGrafanaUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_CreateTokenRequest(request: CreateTokenRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_DeactivateCockpitRequest(request: DeactivateCockpitRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_DeleteContactPointRequest(request: DeleteContactPointRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_DeleteGrafanaUserRequest(request: DeleteGrafanaUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_DisableManagedAlertsRequest(request: DisableManagedAlertsRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_EnableManagedAlertsRequest(request: EnableManagedAlertsRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_ResetGrafanaUserPasswordRequest(request: ResetGrafanaUserPasswordRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_SelectPlanRequest(request: SelectPlanRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_TokenScopes(request: TokenScopes, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.marshal_TriggerTestAlertRequest(request: TriggerTestAlertRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.cockpit.v1beta1.marshalling.unmarshal_Cockpit(data: Any) Cockpit
scaleway.cockpit.v1beta1.marshalling.unmarshal_CockpitEndpoints(data: Any) CockpitEndpoints
scaleway.cockpit.v1beta1.marshalling.unmarshal_CockpitMetrics(data: Any) CockpitMetrics
scaleway.cockpit.v1beta1.marshalling.unmarshal_ContactPoint(data: Any) ContactPoint
scaleway.cockpit.v1beta1.marshalling.unmarshal_ContactPointEmail(data: Any) ContactPointEmail
scaleway.cockpit.v1beta1.marshalling.unmarshal_Datasource(data: Any) Datasource
scaleway.cockpit.v1beta1.marshalling.unmarshal_GrafanaProductDashboard(data: Any) GrafanaProductDashboard
scaleway.cockpit.v1beta1.marshalling.unmarshal_GrafanaUser(data: Any) GrafanaUser
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListContactPointsResponse(data: Any) ListContactPointsResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListDatasourcesResponse(data: Any) ListDatasourcesResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListGrafanaProductDashboardsResponse(data: Any) ListGrafanaProductDashboardsResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListGrafanaUsersResponse(data: Any) ListGrafanaUsersResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListPlansResponse(data: Any) ListPlansResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_ListTokensResponse(data: Any) ListTokensResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_Plan(data: Any) Plan
scaleway.cockpit.v1beta1.marshalling.unmarshal_SelectPlanResponse(data: Any) SelectPlanResponse
scaleway.cockpit.v1beta1.marshalling.unmarshal_Token(data: Any) Token
scaleway.cockpit.v1beta1.marshalling.unmarshal_TokenScopes(data: Any) TokenScopes

scaleway.cockpit.v1beta1.types module

class scaleway.cockpit.v1beta1.types.ActivateCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.types.Cockpit(project_id: str, status: CockpitStatus, managed_alerts_enabled: bool, created_at: Optional[datetime], updated_at: Optional[datetime], endpoints: Optional[CockpitEndpoints], plan: Optional[Plan])

Bases: object

Cockpit.

created_at: Optional[datetime]

Date and time of the Cockpit’s creation.

endpoints: Optional[CockpitEndpoints]

Endpoints of the Cockpit.

managed_alerts_enabled: bool

Specifies whether managed alerts are enabled or disabled.

plan: Optional[Plan]

Pricing plan information.

project_id: str

ID of the Project the Cockpit belongs to.

status: CockpitStatus

Status of the Cockpit.

updated_at: Optional[datetime]

Date and time of the Cockpit’s last update.

class scaleway.cockpit.v1beta1.types.CockpitEndpoints(metrics_url: 'str', logs_url: 'str', traces_url: 'str', alertmanager_url: 'str', grafana_url: 'str')

Bases: object

alertmanager_url: str

URL for the alert manager.

grafana_url: str

URL for the Grafana dashboard.

logs_url: str

URL for logs.

metrics_url: str

URL for metrics.

traces_url: str

URL for traces.

class scaleway.cockpit.v1beta1.types.CockpitMetrics(timeseries: List[TimeSeries])

Bases: object

Metrics for a given Cockpit.

timeseries: List[TimeSeries]

Time series array.

class scaleway.cockpit.v1beta1.types.CockpitStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
UPDATING = 'updating'
class scaleway.cockpit.v1beta1.types.ContactPoint(email: Optional[ContactPointEmail])

Bases: object

Contact point.

email: Optional[ContactPointEmail]
class scaleway.cockpit.v1beta1.types.ContactPointEmail(to: 'str')

Bases: object

to: str
class scaleway.cockpit.v1beta1.types.CreateContactPointRequest(project_id: Optional[str], contact_point: Optional[ContactPoint])

Bases: object

Request to create a contact point.

contact_point: Optional[ContactPoint]

Contact point to create.

project_id: Optional[str]

ID of the Project in which to create the contact point.

class scaleway.cockpit.v1beta1.types.CreateDatasourceRequest(name: str, is_default: bool, project_id: Optional[str], type_: Optional[DatasourceType])

Bases: object

Request to create a data source.

is_default: bool

Specifies that the returned output is the default data source per type.

name: str

Data source name.

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

type_: Optional[DatasourceType]

Data source type.

class scaleway.cockpit.v1beta1.types.CreateGrafanaUserRequest(login: str, project_id: Optional[str], role: Optional[GrafanaUserRole])

Bases: object

Request to create a Grafana user.

login: str

Username of the Grafana user.

project_id: Optional[str]

ID of the Project.

role: Optional[GrafanaUserRole]

Role assigned to the Grafana user.

class scaleway.cockpit.v1beta1.types.CreateTokenRequest(project_id: 'Optional[str]', name: 'Optional[str]', scopes: 'Optional[TokenScopes]')

Bases: object

name: Optional[str]

Name of the token.

project_id: Optional[str]

ID of the Project.

scopes: Optional[TokenScopes]

Token’s permissions.

class scaleway.cockpit.v1beta1.types.Datasource(id: str, project_id: str, name: str, url: str, type_: DatasourceType, is_managed_by_scaleway: bool)

Bases: object

Data source.

id: str

ID of the data source.

is_managed_by_scaleway: bool

Specifies that the data source receives data from Scaleway products and is managed by Scaleway.

name: str

Data source name.

project_id: str

ID of the Project the Cockpit belongs to.

type_: DatasourceType

Data source type.

url: str

Data source URL.

class scaleway.cockpit.v1beta1.types.DatasourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ALERTS = 'alerts'
LOGS = 'logs'
METRICS = 'metrics'
TRACES = 'traces'
UNKNOWN_DATASOURCE_TYPE = 'unknown_datasource_type'
class scaleway.cockpit.v1beta1.types.DeactivateCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.types.DeleteContactPointRequest(project_id: Optional[str], contact_point: Optional[ContactPoint])

Bases: object

Request to delete a contact point.

contact_point: Optional[ContactPoint]

Contact point to delete.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.DeleteDatasourceRequest(datasource_id: str)

Bases: object

Request to delete a data source.

datasource_id: str

ID of the data source.

class scaleway.cockpit.v1beta1.types.DeleteGrafanaUserRequest(project_id: Optional[str], grafana_user_id: int)

Bases: object

Request to delete a Grafana user.

grafana_user_id: int

ID of the Grafana user.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.DeleteTokenRequest(token_id: 'str')

Bases: object

token_id: str

ID of the token.

class scaleway.cockpit.v1beta1.types.DisableManagedAlertsRequest(project_id: Optional[str])

Bases: object

Request to disable the sending of managed alerts.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.EnableManagedAlertsRequest(project_id: Optional[str])

Bases: object

Request to enable the sending of managed alerts.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.GetCockpitMetricsRequest(project_id: Optional[str], start_date: Optional[datetime], end_date: Optional[datetime], metric_name: Optional[str])

Bases: object

Request to get a given Cockpit’s metrics.

end_date: Optional[datetime]

Desired time range’s end date for the metrics.

metric_name: Optional[str]

Name of the metric requested.

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

start_date: Optional[datetime]

Desired time range’s start date for the metrics.

class scaleway.cockpit.v1beta1.types.GetCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.types.GetGrafanaProductDashboardRequest(project_id: Optional[str], dashboard_name: str)

Bases: object

Request to get a dashboard.

dashboard_name: str

Name of the dashboard.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.GetTokenRequest(token_id: 'str')

Bases: object

token_id: str

ID of the token.

class scaleway.cockpit.v1beta1.types.GrafanaProductDashboard(dashboard_name: str, title: str, url: str, tags: List[str], variables: List[str])

Bases: object

Grafana dashboard.

dashboard_name: str

Name of the dashboard.

tags: List[str]

Tags of the dashboard.

title: str

Title of the dashboard.

url: str

URL of the dashboard.

variables: List[str]

Variables of the dashboard.

class scaleway.cockpit.v1beta1.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]

The Grafana user’s password.

role: GrafanaUserRole

Role assigned to the Grafana user.

class scaleway.cockpit.v1beta1.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.v1beta1.types.ListContactPointsRequest(page: Optional[int], page_size: Optional[int], project_id: Optional[str])

Bases: object

Request to list all contact points.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project from which to list the contact points.

class scaleway.cockpit.v1beta1.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]

Array of contact points.

has_additional_contact_points: bool

Specifies whether there are unmanaged contact points.

has_additional_receivers: bool

Specifies whether the contact point has other receivers than the default receiver.

total_count: int

Count of all contact points created.

class scaleway.cockpit.v1beta1.types.ListDatasourcesRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDatasourcesRequestOrderBy]', project_id: 'Optional[str]', types: 'Optional[List[DatasourceType]]', is_managed_by_scaleway: 'Optional[bool]')

Bases: object

is_managed_by_scaleway: Optional[bool]

Filter by managed datasources.

order_by: Optional[ListDatasourcesRequestOrderBy]

How the response is ordered.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

types: Optional[List[DatasourceType]]

Filter by datasource types.

class scaleway.cockpit.v1beta1.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'
class scaleway.cockpit.v1beta1.types.ListDatasourcesResponse(total_count: 'int', datasources: 'List[Datasource]')

Bases: object

datasources: List[Datasource]

List of the datasources within the pagination.

total_count: int

Count of all datasources corresponding to the request.

class scaleway.cockpit.v1beta1.types.ListGrafanaProductDashboardsRequest(project_id: Optional[str], page: Optional[int], page_size: Optional[int], tags: Optional[List[str]])

Bases: object

Request to get a list of dashboards.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

tags: Optional[List[str]]

Tags to filter the dashboards.

class scaleway.cockpit.v1beta1.types.ListGrafanaProductDashboardsResponse(total_count: int, dashboards: List[GrafanaProductDashboard])

Bases: object

Response returned when getting a list of dashboards.

dashboards: List[GrafanaProductDashboard]

Information on grafana dashboards.

total_count: int

Count of grafana dasboards.

class scaleway.cockpit.v1beta1.types.ListGrafanaUsersRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListGrafanaUsersRequestOrderBy], project_id: Optional[str])

Bases: object

Request to list all Grafana users.

order_by: Optional[ListGrafanaUsersRequestOrderBy]
page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.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.v1beta1.types.ListGrafanaUsersResponse(total_count: int, grafana_users: List[GrafanaUser])

Bases: object

Response returned when listing Grafana users.

grafana_users: List[GrafanaUser]

Information on all Grafana users.

total_count: int

Count of all Grafana users.

class scaleway.cockpit.v1beta1.types.ListPlansRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListPlansRequestOrderBy])

Bases: object

Request to list all pricing plans.

order_by: Optional[ListPlansRequestOrderBy]
page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

class scaleway.cockpit.v1beta1.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.v1beta1.types.ListPlansResponse(total_count: int, plans: List[Plan])

Bases: object

Response returned when listing all pricing plans.

plans: List[Plan]

Information on plans.

total_count: int

Count of all pricing plans.

class scaleway.cockpit.v1beta1.types.ListTokensRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', project_id: 'Optional[str]')

Bases: object

order_by: Optional[ListTokensRequestOrderBy]

How the response is ordered.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.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.v1beta1.types.ListTokensResponse(total_count: 'int', tokens: 'List[Token]')

Bases: object

tokens: List[Token]

List of all tokens created.

total_count: int

Count of all tokens created.

class scaleway.cockpit.v1beta1.types.Plan(id: str, name: PlanName, sample_ingestion_price: int, logs_ingestion_price: int, traces_ingestion_price: int, retention_price: int, retention_metrics_interval: Optional[str], retention_logs_interval: Optional[str], retention_traces_interval: Optional[str])

Bases: object

Pricing plan.

id: str

ID of a given pricing plan.

logs_ingestion_price: int

Ingestion price in cents for 1 GB of logs.

name: PlanName

Name of a given pricing plan.

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_price: int

Retention price in euros per month.

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.v1beta1.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.v1beta1.types.ResetGrafanaUserPasswordRequest(project_id: Optional[str], grafana_user_id: int)

Bases: object

Request to reset a Grafana user’s password.

grafana_user_id: int

ID of the Grafana user.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.SelectPlanRequest(plan_id: str, project_id: Optional[str])

Bases: object

Request to select a specific pricing plan.

plan_id: str

ID of the pricing plan.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.types.SelectPlanResponse

Bases: object

Response returned when selecting a pricing plan.

class scaleway.cockpit.v1beta1.types.Token(id: 'str', project_id: 'str', name: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', scopes: 'Optional[TokenScopes]', secret_key: 'Optional[str]')

Bases: object

created_at: Optional[datetime]

Date and time of the token’s creation.

id: str

ID of the token.

name: str

Name of the token.

project_id: str

ID of the Project.

scopes: Optional[TokenScopes]

Token’s permissions.

secret_key: Optional[str]

Token’s secret key.

updated_at: Optional[datetime]

Date and time of the token’s last update.

class scaleway.cockpit.v1beta1.types.TokenScopes(query_metrics: 'bool', write_metrics: 'bool', setup_metrics_rules: 'bool', query_logs: 'bool', write_logs: 'bool', setup_logs_rules: 'bool', setup_alerts: 'bool', query_traces: 'bool', write_traces: 'bool')

Bases: object

query_logs: bool

Permission to fetch logs.

query_metrics: bool

Permission to fetch metrics.

query_traces: bool

Permission to fetch traces.

setup_alerts: bool

Permission to set up alerts.

setup_logs_rules: bool

Permission to set up logs rules.

setup_metrics_rules: bool

Permission to setup metrics rules.

write_logs: bool

Permission to write logs.

write_metrics: bool

Permission to write metrics.

write_traces: bool

Permission to write traces.

class scaleway.cockpit.v1beta1.types.TriggerTestAlertRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Module contents

class scaleway.cockpit.v1beta1.ActivateCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.Cockpit(project_id: str, status: CockpitStatus, managed_alerts_enabled: bool, created_at: Optional[datetime], updated_at: Optional[datetime], endpoints: Optional[CockpitEndpoints], plan: Optional[Plan])

Bases: object

Cockpit.

created_at: Optional[datetime]

Date and time of the Cockpit’s creation.

endpoints: Optional[CockpitEndpoints]

Endpoints of the Cockpit.

managed_alerts_enabled: bool

Specifies whether managed alerts are enabled or disabled.

plan: Optional[Plan]

Pricing plan information.

project_id: str

ID of the Project the Cockpit belongs to.

status: CockpitStatus

Status of the Cockpit.

updated_at: Optional[datetime]

Date and time of the Cockpit’s last update.

class scaleway.cockpit.v1beta1.CockpitEndpoints(metrics_url: 'str', logs_url: 'str', traces_url: 'str', alertmanager_url: 'str', grafana_url: 'str')

Bases: object

alertmanager_url: str

URL for the alert manager.

grafana_url: str

URL for the Grafana dashboard.

logs_url: str

URL for logs.

metrics_url: str

URL for metrics.

traces_url: str

URL for traces.

class scaleway.cockpit.v1beta1.CockpitMetrics(timeseries: List[TimeSeries])

Bases: object

Metrics for a given Cockpit.

timeseries: List[TimeSeries]

Time series array.

class scaleway.cockpit.v1beta1.CockpitStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
UPDATING = 'updating'
class scaleway.cockpit.v1beta1.CockpitV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs.

activate_cockpit(*, project_id: Optional[str] = None) Cockpit

Activate the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.activate_cockpit()
create_contact_point(*, project_id: Optional[str] = None, contact_point: Optional[ContactPoint] = None) ContactPoint

Create a contact point associated with the default receiver, to receive alerts. :param project_id: ID of the Project in which to create the contact point. :param contact_point: Contact point to create. :return: ContactPoint

Usage:

result = api.create_contact_point()
create_datasource(*, name: str, is_default: bool, project_id: Optional[str] = None, type_: Optional[DatasourceType] = None) Datasource

Create a data source for a given Project specified by the Project ID and the data source type. :param name: Data source name. :param is_default: Specifies that the returned output is the default data source per type. :param project_id: ID of the Project the Cockpit belongs to. :param type_: Data source type. :return: Datasource

Usage:

result = api.create_datasource(
    name="example",
    is_default=False,
)
create_grafana_user(*, login: str, project_id: Optional[str] = None, role: Optional[GrafanaUserRole] = None) GrafanaUser

Create a Grafana user for your Cockpit’s Grafana. Make sure you save the automatically-generated password and the Grafana user ID. :param login: Username of the Grafana user. :param project_id: ID of the Project. :param role: Role assigned to the Grafana user. :return: GrafanaUser

Usage:

result = api.create_grafana_user(
    login="example",
)
create_token(*, project_id: Optional[str] = None, name: Optional[str] = None, scopes: Optional[TokenScopes] = None) Token

Create a token in a given Project specified by the Project ID. :param project_id: ID of the Project. :param name: Name of the token. :param scopes: Token’s permissions. :return: Token

Usage:

result = api.create_token()
deactivate_cockpit(*, project_id: Optional[str] = None) Cockpit

Deactivate the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.deactivate_cockpit()
delete_contact_point(*, project_id: Optional[str] = None, contact_point: Optional[ContactPoint] = None) None

Delete a contact point associated with the default receiver. :param project_id: ID of the Project. :param contact_point: Contact point to delete.

Usage:

result = api.delete_contact_point()
delete_datasource(*, datasource_id: str) None

Delete a given data source specified by the data source ID. :param datasource_id: ID of the data source.

Usage:

result = api.delete_datasource(
    datasource_id="example",
)
delete_grafana_user(*, project_id: Optional[str] = None, grafana_user_id: int) None

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. :param grafana_user_id: ID of the Grafana user.

Usage:

result = api.delete_grafana_user(
    grafana_user_id=1,
)
delete_token(*, token_id: str) None

Delete a given token specified by the token ID. :param token_id: ID of the token.

Usage:

result = api.delete_token(
    token_id="example",
)
disable_managed_alerts(*, project_id: Optional[str] = None) None

Disable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project.

Usage:

result = api.disable_managed_alerts()
enable_managed_alerts(*, project_id: Optional[str] = None) None

Enable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project.

Usage:

result = api.enable_managed_alerts()
get_cockpit(*, project_id: Optional[str] = None) Cockpit

Retrieve the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.get_cockpit()
get_cockpit_metrics(*, project_id: Optional[str] = None, start_date: Optional[datetime] = None, end_date: Optional[datetime] = None, metric_name: Optional[str] = None) CockpitMetrics

Retrieve metrics from your Cockpit specified by the ID of the Project the Cockpit belongs to. :param project_id: ID of the Project the Cockpit belongs to. :param start_date: Desired time range’s start date for the metrics. :param end_date: Desired time range’s end date for the metrics. :param metric_name: Name of the metric requested. :return: CockpitMetrics

Usage:

result = api.get_cockpit_metrics()
get_grafana_product_dashboard(*, project_id: Optional[str] = None, dashboard_name: str) GrafanaProductDashboard

Get a product dashboard. Get a product dashboard specified by the dashboard ID. :param project_id: ID of the Project. :param dashboard_name: Name of the dashboard. :return: GrafanaProductDashboard

Usage:

result = api.get_grafana_product_dashboard(
    dashboard_name="example",
)
get_token(*, token_id: str) Token

Retrieve a given token specified by the token ID. :param token_id: ID of the token. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
list_contact_points(*, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) ListContactPointsResponse

Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param page: Page number. :param page_size: Page size. :param project_id: ID of the Project from which to list the contact points. :return: ListContactPointsResponse

Usage:

result = api.list_contact_points()
list_contact_points_all(*, page: Optional[int] = None, page_size: Optional[int] = None, project_id: Optional[str] = None) List[ContactPoint]

Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to. :param page: Page number. :param page_size: Page size. :param project_id: ID of the Project from which to list the contact points. :return: List[ContactPoint]

Usage:

result = api.list_contact_points_all()
list_datasources(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDatasourcesRequestOrderBy] = None, project_id: Optional[str] = None, types: Optional[List[DatasourceType]] = None, is_managed_by_scaleway: Optional[bool] = None) ListDatasourcesResponse

Get a list of data sources for the specified Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :param types: Filter by datasource types. :param is_managed_by_scaleway: Filter by managed datasources. :return: ListDatasourcesResponse

Usage:

result = api.list_datasources()
list_datasources_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDatasourcesRequestOrderBy] = None, project_id: Optional[str] = None, types: Optional[List[DatasourceType]] = None, is_managed_by_scaleway: Optional[bool] = None) List[Datasource]

Get a list of data sources for the specified Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :param types: Filter by datasource types. :param is_managed_by_scaleway: Filter by managed datasources. :return: List[Datasource]

Usage:

result = api.list_datasources_all()
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 product dashboards. Get a list of available product dashboards. :param project_id: ID of the Project. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter the dashboards. :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 product dashboards. Get a list of available product dashboards. :param project_id: ID of the Project. :param page: Page number. :param page_size: Page size. :param tags: Tags to filter the dashboards. :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

Get a list of all Grafana users created in your Cockpit’s Grafana. :param page: Page number. :param page_size: Page size. :param order_by: :param project_id: ID of the Project. :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]

Get a list of all Grafana users created in your Cockpit’s Grafana. :param page: Page number. :param page_size: Page size. :param order_by: :param project_id: ID of the Project. :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

Get a list of all pricing plans available. :param page: Page number. :param page_size: Page size. :param order_by: :return: ListPlansResponse

Usage:

result = api.list_plans()
list_plans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListPlansRequestOrderBy] = None) List[Plan]

Get a list of all pricing plans available. :param page: Page number. :param page_size: Page size. :param order_by: :return: List[Plan]

Usage:

result = api.list_plans_all()
list_tokens(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None) ListTokensResponse

Get a list of tokens in a given Project specified by the Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :return: ListTokensResponse

Usage:

result = api.list_tokens()
list_tokens_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, project_id: Optional[str] = None) List[Token]

Get a list of tokens in a given Project specified by the Project ID. :param page: Page number. :param page_size: Page size. :param order_by: How the response is ordered. :param project_id: ID of the Project. :return: List[Token]

Usage:

result = api.list_tokens_all()
reset_grafana_user_password(*, project_id: Optional[str] = None, grafana_user_id: int) GrafanaUser

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. :param project_id: ID of the Project. :param grafana_user_id: ID of the Grafana user. :return: GrafanaUser

Usage:

result = api.reset_grafana_user_password(
    grafana_user_id=1,
)
select_plan(*, plan_id: str, project_id: Optional[str] = None) SelectPlanResponse

Select your chosen pricing plan for your Cockpit, specifying the Cockpit’s Project ID and the pricing plan’s ID in the request. :param plan_id: ID of the pricing plan. :param project_id: ID of the Project. :return: SelectPlanResponse

Usage:

result = api.select_plan(
    plan_id="example",
)
trigger_test_alert(*, project_id: Optional[str] = None) None

Send a test alert to make sure your contact points get notified when an actual alert is triggered. :param project_id:

Usage:

result = api.trigger_test_alert()
wait_for_cockpit(*, project_id: Optional[str] = None, options: Optional[WaitForOptions[Cockpit, bool]] = None) Cockpit

Retrieve the Cockpit of a given Project specified by the Project ID. :param project_id: ID of the Project the Cockpit belongs to. :return: Cockpit

Usage:

result = api.get_cockpit()
class scaleway.cockpit.v1beta1.ContactPoint(email: Optional[ContactPointEmail])

Bases: object

Contact point.

email: Optional[ContactPointEmail]
class scaleway.cockpit.v1beta1.ContactPointEmail(to: 'str')

Bases: object

to: str
class scaleway.cockpit.v1beta1.CreateContactPointRequest(project_id: Optional[str], contact_point: Optional[ContactPoint])

Bases: object

Request to create a contact point.

contact_point: Optional[ContactPoint]

Contact point to create.

project_id: Optional[str]

ID of the Project in which to create the contact point.

class scaleway.cockpit.v1beta1.CreateDatasourceRequest(name: str, is_default: bool, project_id: Optional[str], type_: Optional[DatasourceType])

Bases: object

Request to create a data source.

is_default: bool

Specifies that the returned output is the default data source per type.

name: str

Data source name.

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

type_: Optional[DatasourceType]

Data source type.

class scaleway.cockpit.v1beta1.CreateGrafanaUserRequest(login: str, project_id: Optional[str], role: Optional[GrafanaUserRole])

Bases: object

Request to create a Grafana user.

login: str

Username of the Grafana user.

project_id: Optional[str]

ID of the Project.

role: Optional[GrafanaUserRole]

Role assigned to the Grafana user.

class scaleway.cockpit.v1beta1.CreateTokenRequest(project_id: 'Optional[str]', name: 'Optional[str]', scopes: 'Optional[TokenScopes]')

Bases: object

name: Optional[str]

Name of the token.

project_id: Optional[str]

ID of the Project.

scopes: Optional[TokenScopes]

Token’s permissions.

class scaleway.cockpit.v1beta1.Datasource(id: str, project_id: str, name: str, url: str, type_: DatasourceType, is_managed_by_scaleway: bool)

Bases: object

Data source.

id: str

ID of the data source.

is_managed_by_scaleway: bool

Specifies that the data source receives data from Scaleway products and is managed by Scaleway.

name: str

Data source name.

project_id: str

ID of the Project the Cockpit belongs to.

type_: DatasourceType

Data source type.

url: str

Data source URL.

class scaleway.cockpit.v1beta1.DatasourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ALERTS = 'alerts'
LOGS = 'logs'
METRICS = 'metrics'
TRACES = 'traces'
UNKNOWN_DATASOURCE_TYPE = 'unknown_datasource_type'
class scaleway.cockpit.v1beta1.DeactivateCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.DeleteContactPointRequest(project_id: Optional[str], contact_point: Optional[ContactPoint])

Bases: object

Request to delete a contact point.

contact_point: Optional[ContactPoint]

Contact point to delete.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.DeleteDatasourceRequest(datasource_id: str)

Bases: object

Request to delete a data source.

datasource_id: str

ID of the data source.

class scaleway.cockpit.v1beta1.DeleteGrafanaUserRequest(project_id: Optional[str], grafana_user_id: int)

Bases: object

Request to delete a Grafana user.

grafana_user_id: int

ID of the Grafana user.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.DeleteTokenRequest(token_id: 'str')

Bases: object

token_id: str

ID of the token.

class scaleway.cockpit.v1beta1.DisableManagedAlertsRequest(project_id: Optional[str])

Bases: object

Request to disable the sending of managed alerts.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.EnableManagedAlertsRequest(project_id: Optional[str])

Bases: object

Request to enable the sending of managed alerts.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.GetCockpitMetricsRequest(project_id: Optional[str], start_date: Optional[datetime], end_date: Optional[datetime], metric_name: Optional[str])

Bases: object

Request to get a given Cockpit’s metrics.

end_date: Optional[datetime]

Desired time range’s end date for the metrics.

metric_name: Optional[str]

Name of the metric requested.

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

start_date: Optional[datetime]

Desired time range’s start date for the metrics.

class scaleway.cockpit.v1beta1.GetCockpitRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project the Cockpit belongs to.

class scaleway.cockpit.v1beta1.GetGrafanaProductDashboardRequest(project_id: Optional[str], dashboard_name: str)

Bases: object

Request to get a dashboard.

dashboard_name: str

Name of the dashboard.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.GetTokenRequest(token_id: 'str')

Bases: object

token_id: str

ID of the token.

class scaleway.cockpit.v1beta1.GrafanaProductDashboard(dashboard_name: str, title: str, url: str, tags: List[str], variables: List[str])

Bases: object

Grafana dashboard.

dashboard_name: str

Name of the dashboard.

tags: List[str]

Tags of the dashboard.

title: str

Title of the dashboard.

url: str

URL of the dashboard.

variables: List[str]

Variables of the dashboard.

class scaleway.cockpit.v1beta1.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]

The Grafana user’s password.

role: GrafanaUserRole

Role assigned to the Grafana user.

class scaleway.cockpit.v1beta1.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.v1beta1.ListContactPointsRequest(page: Optional[int], page_size: Optional[int], project_id: Optional[str])

Bases: object

Request to list all contact points.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project from which to list the contact points.

class scaleway.cockpit.v1beta1.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]

Array of contact points.

has_additional_contact_points: bool

Specifies whether there are unmanaged contact points.

has_additional_receivers: bool

Specifies whether the contact point has other receivers than the default receiver.

total_count: int

Count of all contact points created.

class scaleway.cockpit.v1beta1.ListDatasourcesRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDatasourcesRequestOrderBy]', project_id: 'Optional[str]', types: 'Optional[List[DatasourceType]]', is_managed_by_scaleway: 'Optional[bool]')

Bases: object

is_managed_by_scaleway: Optional[bool]

Filter by managed datasources.

order_by: Optional[ListDatasourcesRequestOrderBy]

How the response is ordered.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

types: Optional[List[DatasourceType]]

Filter by datasource types.

class scaleway.cockpit.v1beta1.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'
class scaleway.cockpit.v1beta1.ListDatasourcesResponse(total_count: 'int', datasources: 'List[Datasource]')

Bases: object

datasources: List[Datasource]

List of the datasources within the pagination.

total_count: int

Count of all datasources corresponding to the request.

class scaleway.cockpit.v1beta1.ListGrafanaProductDashboardsRequest(project_id: Optional[str], page: Optional[int], page_size: Optional[int], tags: Optional[List[str]])

Bases: object

Request to get a list of dashboards.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

tags: Optional[List[str]]

Tags to filter the dashboards.

class scaleway.cockpit.v1beta1.ListGrafanaProductDashboardsResponse(total_count: int, dashboards: List[GrafanaProductDashboard])

Bases: object

Response returned when getting a list of dashboards.

dashboards: List[GrafanaProductDashboard]

Information on grafana dashboards.

total_count: int

Count of grafana dasboards.

class scaleway.cockpit.v1beta1.ListGrafanaUsersRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListGrafanaUsersRequestOrderBy], project_id: Optional[str])

Bases: object

Request to list all Grafana users.

order_by: Optional[ListGrafanaUsersRequestOrderBy]
page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.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.v1beta1.ListGrafanaUsersResponse(total_count: int, grafana_users: List[GrafanaUser])

Bases: object

Response returned when listing Grafana users.

grafana_users: List[GrafanaUser]

Information on all Grafana users.

total_count: int

Count of all Grafana users.

class scaleway.cockpit.v1beta1.ListPlansRequest(page: Optional[int], page_size: Optional[int], order_by: Optional[ListPlansRequestOrderBy])

Bases: object

Request to list all pricing plans.

order_by: Optional[ListPlansRequestOrderBy]
page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

class scaleway.cockpit.v1beta1.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.v1beta1.ListPlansResponse(total_count: int, plans: List[Plan])

Bases: object

Response returned when listing all pricing plans.

plans: List[Plan]

Information on plans.

total_count: int

Count of all pricing plans.

class scaleway.cockpit.v1beta1.ListTokensRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', project_id: 'Optional[str]')

Bases: object

order_by: Optional[ListTokensRequestOrderBy]

How the response is ordered.

page: Optional[int]

Page number.

page_size: Optional[int]

Page size.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.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.v1beta1.ListTokensResponse(total_count: 'int', tokens: 'List[Token]')

Bases: object

tokens: List[Token]

List of all tokens created.

total_count: int

Count of all tokens created.

class scaleway.cockpit.v1beta1.Plan(id: str, name: PlanName, sample_ingestion_price: int, logs_ingestion_price: int, traces_ingestion_price: int, retention_price: int, retention_metrics_interval: Optional[str], retention_logs_interval: Optional[str], retention_traces_interval: Optional[str])

Bases: object

Pricing plan.

id: str

ID of a given pricing plan.

logs_ingestion_price: int

Ingestion price in cents for 1 GB of logs.

name: PlanName

Name of a given pricing plan.

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_price: int

Retention price in euros per month.

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.v1beta1.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.v1beta1.ResetGrafanaUserPasswordRequest(project_id: Optional[str], grafana_user_id: int)

Bases: object

Request to reset a Grafana user’s password.

grafana_user_id: int

ID of the Grafana user.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.SelectPlanRequest(plan_id: str, project_id: Optional[str])

Bases: object

Request to select a specific pricing plan.

plan_id: str

ID of the pricing plan.

project_id: Optional[str]

ID of the Project.

class scaleway.cockpit.v1beta1.SelectPlanResponse

Bases: object

Response returned when selecting a pricing plan.

class scaleway.cockpit.v1beta1.Token(id: 'str', project_id: 'str', name: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', scopes: 'Optional[TokenScopes]', secret_key: 'Optional[str]')

Bases: object

created_at: Optional[datetime]

Date and time of the token’s creation.

id: str

ID of the token.

name: str

Name of the token.

project_id: str

ID of the Project.

scopes: Optional[TokenScopes]

Token’s permissions.

secret_key: Optional[str]

Token’s secret key.

updated_at: Optional[datetime]

Date and time of the token’s last update.

class scaleway.cockpit.v1beta1.TokenScopes(query_metrics: 'bool', write_metrics: 'bool', setup_metrics_rules: 'bool', query_logs: 'bool', write_logs: 'bool', setup_logs_rules: 'bool', setup_alerts: 'bool', query_traces: 'bool', write_traces: 'bool')

Bases: object

query_logs: bool

Permission to fetch logs.

query_metrics: bool

Permission to fetch metrics.

query_traces: bool

Permission to fetch traces.

setup_alerts: bool

Permission to set up alerts.

setup_logs_rules: bool

Permission to set up logs rules.

setup_metrics_rules: bool

Permission to setup metrics rules.

write_logs: bool

Permission to write logs.

write_metrics: bool

Permission to write metrics.

write_traces: bool

Permission to write traces.

class scaleway.cockpit.v1beta1.TriggerTestAlertRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]