scaleway.account.v2 package

Submodules

scaleway.account.v2.api module

class scaleway.account.v2.api.AccountV2API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Scaleway Projects.

create_project(*, name: Optional[str] = None, organization_id: Optional[str] = None, description: Optional[str] = None) Project

Create a new Project for an Organization. Deprecated in favor of Account API v3. Generate a new Project for an Organization, specifying its configuration including name and description. :param name: Name of the Project. :param organization_id: Organization ID of the Project. :param description: Description of the Project. :return: Project :deprecated

Usage:

result = api.create_project()
delete_project(*, project_id: Optional[str] = None) None

Delete an existing Project. Deprecated in favor of Account API v3. Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone. :param project_id: Project ID of the Project. :deprecated

Usage:

result = api.delete_project()
get_project(*, project_id: Optional[str] = None) Project

Get an existing Project. Deprecated in favor of Account API v3. Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object. :param project_id: Project ID of the Project. :return: Project :deprecated

Usage:

result = api.get_project()
list_projects(*, organization_id: Optional[str] = None, name: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListProjectsRequestOrderBy] = None, project_ids: Optional[List[str]] = None) ListProjectsResponse

List all Projects of an Organization. Deprecated in favor of Account API v3. List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. :param organization_id: Organization ID of the Project. :param name: Name of the Project. :param page: Page number for the returned Projects. :param page_size: Maximum number of Project per page. :param order_by: Sort order of the returned Projects. :param project_ids: Project IDs to filter for. The results will be limited to any Projects with an ID in this array. :return: ListProjectsResponse :deprecated

Usage:

result = api.list_projects()
list_projects_all(*, organization_id: Optional[str] = None, name: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListProjectsRequestOrderBy] = None, project_ids: Optional[List[str]] = None) List[Project]

List all Projects of an Organization. Deprecated in favor of Account API v3. List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. :param organization_id: Organization ID of the Project. :param name: Name of the Project. :param page: Page number for the returned Projects. :param page_size: Maximum number of Project per page. :param order_by: Sort order of the returned Projects. :param project_ids: Project IDs to filter for. The results will be limited to any Projects with an ID in this array. :return: List[Project] :deprecated

Usage:

result = api.list_projects_all()
update_project(*, project_id: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None) Project

Update Project. Deprecated in favor of Account API v3. Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description. :param project_id: Project ID of the Project. :param name: Name of the Project. :param description: Description of the Project. :return: Project :deprecated

Usage:

result = api.update_project()

scaleway.account.v2.marshalling module

scaleway.account.v2.marshalling.marshal_CreateProjectRequest(request: CreateProjectRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.account.v2.marshalling.marshal_UpdateProjectRequest(request: UpdateProjectRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.account.v2.marshalling.unmarshal_ListProjectsResponse(data: Any) ListProjectsResponse
scaleway.account.v2.marshalling.unmarshal_Project(data: Any) Project

scaleway.account.v2.types module

class scaleway.account.v2.types.CreateProjectRequest(name: 'Optional[str]', organization_id: 'Optional[str]', description: 'Optional[str]')

Bases: object

description: Optional[str]

Description of the Project.

name: Optional[str]

Name of the Project.

organization_id: Optional[str]

Organization ID of the Project.

class scaleway.account.v2.types.DeleteProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v2.types.GetProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v2.types.ListProjectsRequest(organization_id: 'Optional[str]', name: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListProjectsRequestOrderBy]', project_ids: 'Optional[List[str]]')

Bases: object

name: Optional[str]

Name of the Project.

order_by: Optional[ListProjectsRequestOrderBy]

Sort order of the returned Projects.

organization_id: Optional[str]

Organization ID of the Project.

page: Optional[int]

Page number for the returned Projects.

page_size: Optional[int]

Maximum number of Project per page.

project_ids: Optional[List[str]]

Project IDs to filter for. The results will be limited to any Projects with an ID in this array.

class scaleway.account.v2.types.ListProjectsRequestOrderBy(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.account.v2.types.ListProjectsResponse(total_count: 'int', projects: 'List[Project]')

Bases: object

projects: List[Project]

Paginated returned Projects.

total_count: int

Total number of Projects.

class scaleway.account.v2.types.Project(id: 'str', name: 'str', organization_id: 'str', description: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of the Project.

description: str

Description of the Project.

id: str

ID of the Project.

name: str

Name of the Project.

organization_id: str

Organization ID of the Project.

updated_at: Optional[datetime]

Update date of the Project.

class scaleway.account.v2.types.UpdateProjectRequest(project_id: 'Optional[str]', name: 'Optional[str]', description: 'Optional[str]')

Bases: object

description: Optional[str]

Description of the Project.

name: Optional[str]

Name of the Project.

project_id: Optional[str]

Project ID of the Project.

Module contents

class scaleway.account.v2.AccountV2API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Scaleway Projects.

create_project(*, name: Optional[str] = None, organization_id: Optional[str] = None, description: Optional[str] = None) Project

Create a new Project for an Organization. Deprecated in favor of Account API v3. Generate a new Project for an Organization, specifying its configuration including name and description. :param name: Name of the Project. :param organization_id: Organization ID of the Project. :param description: Description of the Project. :return: Project :deprecated

Usage:

result = api.create_project()
delete_project(*, project_id: Optional[str] = None) None

Delete an existing Project. Deprecated in favor of Account API v3. Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone. :param project_id: Project ID of the Project. :deprecated

Usage:

result = api.delete_project()
get_project(*, project_id: Optional[str] = None) Project

Get an existing Project. Deprecated in favor of Account API v3. Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object. :param project_id: Project ID of the Project. :return: Project :deprecated

Usage:

result = api.get_project()
list_projects(*, organization_id: Optional[str] = None, name: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListProjectsRequestOrderBy] = None, project_ids: Optional[List[str]] = None) ListProjectsResponse

List all Projects of an Organization. Deprecated in favor of Account API v3. List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. :param organization_id: Organization ID of the Project. :param name: Name of the Project. :param page: Page number for the returned Projects. :param page_size: Maximum number of Project per page. :param order_by: Sort order of the returned Projects. :param project_ids: Project IDs to filter for. The results will be limited to any Projects with an ID in this array. :return: ListProjectsResponse :deprecated

Usage:

result = api.list_projects()
list_projects_all(*, organization_id: Optional[str] = None, name: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListProjectsRequestOrderBy] = None, project_ids: Optional[List[str]] = None) List[Project]

List all Projects of an Organization. Deprecated in favor of Account API v3. List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project. :param organization_id: Organization ID of the Project. :param name: Name of the Project. :param page: Page number for the returned Projects. :param page_size: Maximum number of Project per page. :param order_by: Sort order of the returned Projects. :param project_ids: Project IDs to filter for. The results will be limited to any Projects with an ID in this array. :return: List[Project] :deprecated

Usage:

result = api.list_projects_all()
update_project(*, project_id: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None) Project

Update Project. Deprecated in favor of Account API v3. Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description. :param project_id: Project ID of the Project. :param name: Name of the Project. :param description: Description of the Project. :return: Project :deprecated

Usage:

result = api.update_project()
class scaleway.account.v2.CreateProjectRequest(name: 'Optional[str]', organization_id: 'Optional[str]', description: 'Optional[str]')

Bases: object

description: Optional[str]

Description of the Project.

name: Optional[str]

Name of the Project.

organization_id: Optional[str]

Organization ID of the Project.

class scaleway.account.v2.DeleteProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v2.GetProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v2.ListProjectsRequest(organization_id: 'Optional[str]', name: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListProjectsRequestOrderBy]', project_ids: 'Optional[List[str]]')

Bases: object

name: Optional[str]

Name of the Project.

order_by: Optional[ListProjectsRequestOrderBy]

Sort order of the returned Projects.

organization_id: Optional[str]

Organization ID of the Project.

page: Optional[int]

Page number for the returned Projects.

page_size: Optional[int]

Maximum number of Project per page.

project_ids: Optional[List[str]]

Project IDs to filter for. The results will be limited to any Projects with an ID in this array.

class scaleway.account.v2.ListProjectsRequestOrderBy(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.account.v2.ListProjectsResponse(total_count: 'int', projects: 'List[Project]')

Bases: object

projects: List[Project]

Paginated returned Projects.

total_count: int

Total number of Projects.

class scaleway.account.v2.Project(id: 'str', name: 'str', organization_id: 'str', description: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of the Project.

description: str

Description of the Project.

id: str

ID of the Project.

name: str

Name of the Project.

organization_id: str

Organization ID of the Project.

updated_at: Optional[datetime]

Update date of the Project.

class scaleway.account.v2.UpdateProjectRequest(project_id: 'Optional[str]', name: 'Optional[str]', description: 'Optional[str]')

Bases: object

description: Optional[str]

Description of the Project.

name: Optional[str]

Name of the Project.

project_id: Optional[str]

Project ID of the Project.