scaleway.account.v3 package

Submodules

scaleway.account.v3.api module

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

Bases: API

This API allows you to manage your Scaleway Projects.

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

Create a new Project for an Organization. Generate a new Project for an Organization, specifying its configuration including name and description. :param description: Description of the Project. :param name: Name of the Project. :param organization_id: Organization ID of the Project. :return: Project

Usage:

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

Delete an existing Project. 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.

Usage:

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

Get an existing Project. 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

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. 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 includes 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

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. 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 includes 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]

Usage:

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

Update Project. 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

Usage:

result = api.update_project()

scaleway.account.v3.marshalling module

scaleway.account.v3.marshalling.marshal_ProjectApiCreateProjectRequest(request: ProjectApiCreateProjectRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.account.v3.marshalling.marshal_ProjectApiUpdateProjectRequest(request: ProjectApiUpdateProjectRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.account.v3.marshalling.unmarshal_ListProjectsResponse(data: Any) ListProjectsResponse
scaleway.account.v3.marshalling.unmarshal_Project(data: Any) Project

scaleway.account.v3.types module

class scaleway.account.v3.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.v3.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.v3.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.v3.types.ProjectApiCreateProjectRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

description: str

Description of the Project.

name: Optional[str]

Name of the Project.

organization_id: Optional[str]

Organization ID of the Project.

class scaleway.account.v3.types.ProjectApiDeleteProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v3.types.ProjectApiGetProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v3.types.ProjectApiListProjectsRequest(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.v3.types.ProjectApiUpdateProjectRequest(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.v3.AccountV3ProjectAPI(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Scaleway Projects.

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

Create a new Project for an Organization. Generate a new Project for an Organization, specifying its configuration including name and description. :param description: Description of the Project. :param name: Name of the Project. :param organization_id: Organization ID of the Project. :return: Project

Usage:

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

Delete an existing Project. 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.

Usage:

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

Get an existing Project. 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

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. 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 includes 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

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. 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 includes 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]

Usage:

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

Update Project. 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

Usage:

result = api.update_project()
class scaleway.account.v3.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.v3.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.v3.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.v3.ProjectApiCreateProjectRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

description: str

Description of the Project.

name: Optional[str]

Name of the Project.

organization_id: Optional[str]

Organization ID of the Project.

class scaleway.account.v3.ProjectApiDeleteProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v3.ProjectApiGetProjectRequest(project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

Project ID of the Project.

class scaleway.account.v3.ProjectApiListProjectsRequest(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.v3.ProjectApiUpdateProjectRequest(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.