scaleway.iam.v1alpha1 package

Submodules

scaleway.iam.v1alpha1.api module

class scaleway.iam.v1alpha1.api.IamV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources.

add_group_member(*, group_id: str, user_id: Optional[str] = None, application_id: Optional[str] = None) Group

Add a user or an application to a group. Add a user or an application to a group. You can specify a user_id and application_id in the body of your request. Note that you can only add one of each per request. :param group_id: ID of the group. :param user_id: ID of the user to add. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :param application_id: ID of the application to add. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :return: Group

Usage:

result = api.add_group_member(
    group_id="example",
)
add_group_members(*, group_id: str, user_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None) Group

Add multiple users and applications to a group. Add multiple users and applications to a group in a single call. You can specify an array of user_id`s and `application_id`s. Note that any existing users and applications in the group will remain. To add new users/applications and delete pre-existing ones, use the [Overwrite users and applications of a group](#path-groups-overwrite-users-and-applications-of-a-group) method. :param group_id: ID of the group. :param user_ids: IDs of the users to add. :param application_ids: IDs of the applications to add. :return: :class:`Group <Group>

Usage:

result = api.add_group_members(
    group_id="example",
)
clone_policy(*, policy_id: str) Policy

Clone a policy. Clone a policy. You must define specify the policy_id parameter in your request. :param policy_id: :return: Policy

Usage:

result = api.clone_policy(
    policy_id="example",
)
create_api_key(*, description: str, application_id: Optional[str] = None, user_id: Optional[str] = None, expires_at: Optional[datetime] = None, default_project_id: Optional[str] = None) APIKey

Create an API key. Create an API key. You must specify the application_id or the user_id and the description. You can also specify the default_project_id, which is the Project ID of your preferred Project, to use with Object Storage. The access_key and secret_key values are returned in the response. Note that the secret key is only shown once. Make sure that you copy and store both keys somewhere safe. :param description: Description of the API key (max length is 200 characters). :param application_id: ID of the application. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of the user. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param expires_at: Expiration date of the API key. :param default_project_id: Default Project ID to use with Object Storage. :return: APIKey

Usage:

result = api.create_api_key(
    description="example",
)
create_application(*, description: str, name: Optional[str] = None, organization_id: Optional[str] = None, tags: Optional[List[str]] = None) Application

Create a new application. Create a new application. You must define the name parameter in the request. :param description: Description of the application (max length is 200 characters). :param name: Name of the application to create (max length is 64 characters). :param organization_id: ID of the Organization. :param tags: Tags associated with the application (maximum of 10 tags). :return: Application

Usage:

result = api.create_application(
    description="example",
)
create_group(*, description: str, organization_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None) Group

Create a group. Create a new group. You must define the name and organization_id parameters in the request. :param description: Description of the group to create (max length is 200 chars). :param organization_id: ID of Organization linked to the group. :param name: Name of the group to create (max length is 64 chars). MUST be unique inside an Organization. :param tags: Tags associated with the group (maximum of 10 tags). :return: Group

Usage:

result = api.create_group(
    description="example",
)
create_jwt(*, user_id: str, referrer: str) EncodedJWT

Create a JWT. :param user_id: ID of the user the JWT will be created for. :param referrer: Referrer of the JWT. :return: EncodedJWT

Usage:

result = api.create_jwt(
    user_id="example",
    referrer="example",
)
create_policy(*, description: str, name: Optional[str] = None, organization_id: Optional[str] = None, rules: Optional[List[RuleSpecs]] = None, tags: Optional[List[str]] = None, user_id: Optional[str] = None, group_id: Optional[str] = None, application_id: Optional[str] = None, no_principal: Optional[bool] = None) Policy

Create a new policy. Create a new application. You must define the name parameter in the request. You can specify parameters such as user_id, groups_id, application_id, no_principal, rules and its child attributes. :param description: Description of the policy to create (max length is 200 characters). :param name: Name of the policy to create (max length is 64 characters). :param organization_id: ID of the Organization. :param rules: Rules of the policy to create. :param tags: Tags associated with the policy (maximum of 10 tags). :param user_id: ID of user attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param group_id: ID of group attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param application_id: ID of application attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param no_principal: Defines whether or not a policy is attributed to a principal. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :return: Policy

Usage:

result = api.create_policy(
    description="example",
)
create_ssh_key(*, public_key: str, name: Optional[str] = None, project_id: Optional[str] = None) SSHKey

Create an SSH key. Add a new SSH key to a Scaleway Project. You must specify the name, public_key and project_id. :param public_key: SSH public key. Currently only the ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000. :param name: Name of the SSH key. Max length is 1000. :param project_id: Project the resource is attributed to. :return: SSHKey

Usage:

result = api.create_ssh_key(
    public_key="example",
)
create_user(*, organization_id: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, member: Optional[CreateUserRequestMember] = None) User

Create a new user. Create a new user. You must define the organization_id in your request. If you are adding a member, enter the member’s details. If you are adding a guest, you must define the email and not add the member attribute. :param organization_id: ID of the Organization. :param email: Email of the user. One-Of (‘type’): at most one of ‘email’, ‘member’ could be set. :param tags: Tags associated with the user. :param member: Details of IAM member. One-Of (‘type’): at most one of ‘email’, ‘member’ could be set. :return: User

Usage:

result = api.create_user()
create_user_mfaotp(*, user_id: str) MFAOTP

Create a MFA OTP. :param user_id: User ID of the MFA OTP. :return: MFAOTP

Usage:

result = api.create_user_mfaotp(
    user_id="example",
)
delete_api_key(*, access_key: str) None

Delete an API key. Delete an API key. Note that this action is irreversible and cannot be undone. Make sure you update any configurations using the API keys you delete. :param access_key: Access key to delete.

Usage:

result = api.delete_api_key(
    access_key="example",
)
delete_application(*, application_id: str) None

Delete an application. Delete an application. Note that this action is irreversible and will automatically delete the application’s API keys. Policies attached to users and applications via this group will no longer apply. :param application_id: ID of the application to delete.

Usage:

result = api.delete_application(
    application_id="example",
)
delete_group(*, group_id: str) None

Delete a group. Delete a group. Note that this action is irreversible and could delete permissions for group members. Policies attached to users and applications via this group will no longer apply. :param group_id: ID of the group to delete.

Usage:

result = api.delete_group(
    group_id="example",
)
delete_jwt(*, jti: str) None

Delete a JWT. :param jti: JWT ID of the JWT to delete.

Usage:

result = api.delete_jwt(
    jti="example",
)
delete_policy(*, policy_id: str) None

Delete a policy. Delete a policy. You must define specify the policy_id parameter in your request. Note that when deleting a policy, all permissions it gives to its principal (user, group or application) will be revoked. :param policy_id: Id of policy to delete.

Usage:

result = api.delete_policy(
    policy_id="example",
)
delete_ssh_key(*, ssh_key_id: str) None

Delete an SSH key. Delete a given SSH key, specified by the ssh_key_id. Deleting an SSH is permanent, and cannot be undone. Note that you might need to update any configurations that used the SSH key. :param ssh_key_id:

Usage:

result = api.delete_ssh_key(
    ssh_key_id="example",
)
delete_user(*, user_id: str) None

Delete a guest user from an Organization. Remove a user from an Organization in which they are a guest. You must define the user_id in your request. Note that removing a user from an Organization automatically deletes their API keys, and any policies directly attached to them become orphaned. :param user_id: ID of the user to delete.

Usage:

result = api.delete_user(
    user_id="example",
)
delete_user_mfaotp(*, user_id: str) None

Delete a MFA OTP. :param user_id: User ID of the MFA OTP.

Usage:

result = api.delete_user_mfaotp(
    user_id="example",
)
get_api_key(*, access_key: str) APIKey

Get an API key. Retrive information about an API key, specified by the access_key parameter. The API key’s details, including either the user_id or application_id of its bearer are returned in the response. Note that the string value for the secret_key is nullable, and therefore is not displayed in the response. The secret_key value is only displayed upon API key creation. :param access_key: Access key to search for. :return: APIKey

Usage:

result = api.get_api_key(
    access_key="example",
)
get_application(*, application_id: str) Application

Get a given application. Retrieve information about an application, specified by the application_id parameter. The application’s full details, including id, email, organization_id, status and two_factor_enabled are returned in the response. :param application_id: ID of the application to find. :return: Application

Usage:

result = api.get_application(
    application_id="example",
)
get_group(*, group_id: str) Group

Get a group. Retrive information about a given group, specified by the group_id parameter. The group’s full details, including user_ids and application_ids are returned in the response. :param group_id: ID of the group. :return: Group

Usage:

result = api.get_group(
    group_id="example",
)
get_jwt(*, jti: str) JWT

Get a JWT. :param jti: JWT ID of the JWT to get. :return: JWT

Usage:

result = api.get_jwt(
    jti="example",
)
get_log(*, log_id: str) Log

Get a log. Retrieve information about a log, specified by the log_id parameter. The log’s full details, including id, ip, user_agent, action, bearer_id, resource_type and resource_id are returned in the response. :param log_id: ID of the log. :return: Log

Usage:

result = api.get_log(
    log_id="example",
)
get_organization_security_settings(*, organization_id: Optional[str] = None) OrganizationSecuritySettings

Get security settings of an Organization. Retrieve information about the security settings of an Organization, specified by the organization_id parameter. :param organization_id: ID of the Organization. :return: OrganizationSecuritySettings

Usage:

result = api.get_organization_security_settings()
get_policy(*, policy_id: str) Policy

Get an existing policy. Retrieve information about a policy, speficified by the policy_id parameter. The policy’s full details, including id, name, organization_id, nb_rules and nb_scopes, nb_permission_sets are returned in the response. :param policy_id: Id of policy to search. :return: Policy

Usage:

result = api.get_policy(
    policy_id="example",
)
get_quotum(*, quotum_name: str, organization_id: Optional[str] = None) Quotum

Get a quota in the Organization. Retrieve information about a resource quota, specified by the quotum_name parameter. The quota’s limit, or whether it is unlimited, is returned in the response. :param quotum_name: Name of the quota to get. :param organization_id: ID of the Organization. :return: Quotum

Usage:

result = api.get_quotum(
    quotum_name="example",
)
get_ssh_key(*, ssh_key_id: str) SSHKey

Get an SSH key. Retrieve information about a given SSH key, specified by the ssh_key_id parameter. The SSH key’s full details, including id, name, public_key, and project_id are returned in the response. :param ssh_key_id: ID of the SSH key. :return: SSHKey

Usage:

result = api.get_ssh_key(
    ssh_key_id="example",
)
get_user(*, user_id: str) User

Get a given user. Retrieve information about a user, specified by the user_id parameter. The user’s full details, including id, email, organization_id, status and mfa are returned in the response. :param user_id: ID of the user to find. :return: User

Usage:

result = api.get_user(
    user_id="example",
)
get_user_connections(*, user_id: str) GetUserConnectionsResponse
Parameters:

user_id – ID of the user to list connections for.

Returns:

GetUserConnectionsResponse

Usage:

result = api.get_user_connections(
    user_id="example",
)
list_api_keys(*, order_by: Optional[ListAPIKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, application_id: Optional[str] = None, user_id: Optional[str] = None, editable: Optional[bool] = None, expired: Optional[bool] = None, access_key: Optional[str] = None, description: Optional[str] = None, bearer_id: Optional[str] = None, bearer_type: Optional[BearerType] = None, access_keys: Optional[List[str]] = None) ListAPIKeysResponse

List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as editable, expired, access_key and bearer_id. :param order_by: Criteria for sorting results. :param page: Page number. Value must be greater or equal to 1. :param page_size: Number of results per page. Value must be between 1 and 100. :param organization_id: ID of Organization. :param application_id: ID of application that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of user that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param editable: Defines whether to filter out editable API keys or not. :param expired: Defines whether to filter out expired API keys or not. :param access_key: Filter by access key (deprecated in favor of access_keys). :param description: Filter by description. :param bearer_id: Filter by bearer ID. :param bearer_type: Filter by type of bearer. :param access_keys: Filter by a list of access keys. :return: ListAPIKeysResponse

Usage:

result = api.list_api_keys()
list_api_keys_all(*, order_by: Optional[ListAPIKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, application_id: Optional[str] = None, user_id: Optional[str] = None, editable: Optional[bool] = None, expired: Optional[bool] = None, access_key: Optional[str] = None, description: Optional[str] = None, bearer_id: Optional[str] = None, bearer_type: Optional[BearerType] = None, access_keys: Optional[List[str]] = None) List[APIKey]

List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as editable, expired, access_key and bearer_id. :param order_by: Criteria for sorting results. :param page: Page number. Value must be greater or equal to 1. :param page_size: Number of results per page. Value must be between 1 and 100. :param organization_id: ID of Organization. :param application_id: ID of application that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of user that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param editable: Defines whether to filter out editable API keys or not. :param expired: Defines whether to filter out expired API keys or not. :param access_key: Filter by access key (deprecated in favor of access_keys). :param description: Filter by description. :param bearer_id: Filter by bearer ID. :param bearer_type: Filter by type of bearer. :param access_keys: Filter by a list of access keys. :return: List[APIKey]

Usage:

result = api.list_api_keys_all()
list_applications(*, order_by: Optional[ListApplicationsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, name: Optional[str] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, application_ids: Optional[List[str]] = None, tag: Optional[str] = None) ListApplicationsResponse

List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as application_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param name: Name of the application to filter. :param organization_id: ID of the Organization to filter. :param editable: Defines whether to filter out editable applications or not. :param application_ids: Filter by list of IDs. :param tag: Filter by tags containing a given string. :return: ListApplicationsResponse

Usage:

result = api.list_applications()
list_applications_all(*, order_by: Optional[ListApplicationsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, name: Optional[str] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, application_ids: Optional[List[str]] = None, tag: Optional[str] = None) List[Application]

List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as application_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param name: Name of the application to filter. :param organization_id: ID of the Organization to filter. :param editable: Defines whether to filter out editable applications or not. :param application_ids: Filter by list of IDs. :param tag: Filter by tags containing a given string. :return: List[Application]

Usage:

result = api.list_applications_all()
list_grace_periods(*, user_id: Optional[str] = None) ListGracePeriodsResponse

List grace periods of a member. List the grace periods of a member. :param user_id: ID of the user to list grace periods for. :return: ListGracePeriodsResponse

Usage:

result = api.list_grace_periods()
list_groups(*, order_by: Optional[ListGroupsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, application_ids: Optional[List[str]] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, tag: Optional[str] = None) ListGroupsResponse

List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters to filter your query. Use user_ids or application_ids to list all groups certain users or applications belong to. :param order_by: Sort order of groups. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param application_ids: Filter by a list of application IDs. :param user_ids: Filter by a list of user IDs. :param group_ids: Filter by a list of group IDs. :param tag: Filter by tags containing a given string. :return: ListGroupsResponse

Usage:

result = api.list_groups()
list_groups_all(*, order_by: Optional[ListGroupsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, application_ids: Optional[List[str]] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, tag: Optional[str] = None) List[Group]

List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters to filter your query. Use user_ids or application_ids to list all groups certain users or applications belong to. :param order_by: Sort order of groups. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param application_ids: Filter by a list of application IDs. :param user_ids: Filter by a list of user IDs. :param group_ids: Filter by a list of group IDs. :param tag: Filter by tags containing a given string. :return: List[Group]

Usage:

result = api.list_groups_all()
list_jw_ts(*, order_by: Optional[ListJWTsRequestOrderBy] = None, audience_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, expired: Optional[bool] = None) ListJWTsResponse

List JWTs. :param order_by: Criteria for sorting results. :param audience_id: ID of the user to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param expired: Filter out expired JWTs or not. :return: ListJWTsResponse

Usage:

result = api.list_jw_ts()
list_jw_ts_all(*, order_by: Optional[ListJWTsRequestOrderBy] = None, audience_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, expired: Optional[bool] = None) List[JWT]

List JWTs. :param order_by: Criteria for sorting results. :param audience_id: ID of the user to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param expired: Filter out expired JWTs or not. :return: List[JWT]

Usage:

result = api.list_jw_ts_all()
list_logs(*, order_by: Optional[ListLogsRequestOrderBy] = None, organization_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, action: Optional[LogAction] = None, resource_type: Optional[LogResourceType] = None, search: Optional[str] = None) ListLogsResponse

List logs. List logs available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param organization_id: Filter by Organization ID. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param created_after: Defined whether or not to filter out logs created after this timestamp. :param created_before: Defined whether or not to filter out logs created before this timestamp. :param action: Defined whether or not to filter out by a specific action. :param resource_type: Defined whether or not to filter out by a specific type of resource. :param search: Defined whether or not to filter out log by bearer ID or resource ID. :return: ListLogsResponse

Usage:

result = api.list_logs()
list_logs_all(*, order_by: Optional[ListLogsRequestOrderBy] = None, organization_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, action: Optional[LogAction] = None, resource_type: Optional[LogResourceType] = None, search: Optional[str] = None) List[Log]

List logs. List logs available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param organization_id: Filter by Organization ID. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param created_after: Defined whether or not to filter out logs created after this timestamp. :param created_before: Defined whether or not to filter out logs created before this timestamp. :param action: Defined whether or not to filter out by a specific action. :param resource_type: Defined whether or not to filter out by a specific type of resource. :param search: Defined whether or not to filter out log by bearer ID or resource ID. :return: List[Log]

Usage:

result = api.list_logs_all()
list_permission_sets(*, order_by: Optional[ListPermissionSetsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None) ListPermissionSetsResponse

List permission sets. List permission sets available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :return: ListPermissionSetsResponse

Usage:

result = api.list_permission_sets()
list_permission_sets_all(*, order_by: Optional[ListPermissionSetsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None) List[PermissionSet]

List permission sets. List permission sets available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :return: List[PermissionSet]

Usage:

result = api.list_permission_sets_all()
list_policies(*, order_by: Optional[ListPoliciesRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None, no_principal: Optional[bool] = None, policy_name: Optional[str] = None, tag: Optional[str] = None, policy_ids: Optional[List[str]] = None) ListPoliciesResponse

List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters to filter your query, such as user_ids, groups_ids, application_ids, and policy_name. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: ID of the Organization to filter. :param editable: Defines whether or not filter out editable policies. :param user_ids: Defines whether or not to filter by list of user IDs. :param group_ids: Defines whether or not to filter by list of group IDs. :param application_ids: Filter by a list of application IDs. :param no_principal: Defines whether or not the policy is attributed to a principal. :param policy_name: Name of the policy to fetch. :param tag: Filter by tags containing a given string. :param policy_ids: Filter by a list of IDs. :return: ListPoliciesResponse

Usage:

result = api.list_policies()
list_policies_all(*, order_by: Optional[ListPoliciesRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None, no_principal: Optional[bool] = None, policy_name: Optional[str] = None, tag: Optional[str] = None, policy_ids: Optional[List[str]] = None) List[Policy]

List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters to filter your query, such as user_ids, groups_ids, application_ids, and policy_name. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: ID of the Organization to filter. :param editable: Defines whether or not filter out editable policies. :param user_ids: Defines whether or not to filter by list of user IDs. :param group_ids: Defines whether or not to filter by list of group IDs. :param application_ids: Filter by a list of application IDs. :param no_principal: Defines whether or not the policy is attributed to a principal. :param policy_name: Name of the policy to fetch. :param tag: Filter by tags containing a given string. :param policy_ids: Filter by a list of IDs. :return: List[Policy]

Usage:

result = api.list_policies_all()
list_quota(*, order_by: Optional[ListQuotaRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, quotum_names: Optional[List[str]] = None) ListQuotaResponse

List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :param quotum_names: List of quotum names to filter from. :return: ListQuotaResponse

Usage:

result = api.list_quota()
list_quota_all(*, order_by: Optional[ListQuotaRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, quotum_names: Optional[List[str]] = None) List[Quotum]

List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :param quotum_names: List of quotum names to filter from. :return: List[Quotum]

Usage:

result = api.list_quota_all()
list_rules(*, policy_id: str, page_size: Optional[int] = None, page: Optional[int] = None) ListRulesResponse

List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the policy_id in the query path of your request. :param policy_id: Id of policy to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :return: ListRulesResponse

Usage:

result = api.list_rules(
    policy_id="example",
)
list_rules_all(*, policy_id: str, page_size: Optional[int] = None, page: Optional[int] = None) List[Rule]

List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the policy_id in the query path of your request. :param policy_id: Id of policy to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :return: List[Rule]

Usage:

result = api.list_rules_all(
    policy_id="example",
)
list_ssh_keys(*, order_by: Optional[ListSSHKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, project_id: Optional[str] = None, disabled: Optional[bool] = None) ListSSHKeysResponse

List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as organization_id, name, project_id and disabled. :param order_by: Sort order of the SSH keys. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param project_id: Filter by Project ID. :param disabled: Defines whether to include disabled SSH keys or not. :return: ListSSHKeysResponse

Usage:

result = api.list_ssh_keys()
list_ssh_keys_all(*, order_by: Optional[ListSSHKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, project_id: Optional[str] = None, disabled: Optional[bool] = None) List[SSHKey]

List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as organization_id, name, project_id and disabled. :param order_by: Sort order of the SSH keys. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param project_id: Filter by Project ID. :param disabled: Defines whether to include disabled SSH keys or not. :return: List[SSHKey]

Usage:

result = api.list_ssh_keys_all()
list_users(*, order_by: Optional[ListUsersRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, user_ids: Optional[List[str]] = None, mfa: Optional[bool] = None, tag: Optional[str] = None, type_: Optional[UserType] = None) ListUsersResponse

List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as user_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater or equal to 1. :param organization_id: ID of the Organization to filter. :param user_ids: Filter by list of IDs. :param mfa: Filter by MFA status. :param tag: Filter by tags containing a given string. :param type_: Filter by user type. :return: ListUsersResponse

Usage:

result = api.list_users()
list_users_all(*, order_by: Optional[ListUsersRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, user_ids: Optional[List[str]] = None, mfa: Optional[bool] = None, tag: Optional[str] = None, type_: Optional[UserType] = None) List[User]

List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as user_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater or equal to 1. :param organization_id: ID of the Organization to filter. :param user_ids: Filter by list of IDs. :param mfa: Filter by MFA status. :param tag: Filter by tags containing a given string. :param type_: Filter by user type. :return: List[User]

Usage:

result = api.list_users_all()
lock_user(*, user_id: str) User

Lock a member. Lock a member. A locked member cannot log in or use API keys until the locked status is removed. :param user_id: ID of the user to lock. :return: User

Usage:

result = api.lock_user(
    user_id="example",
)
remove_group_member(*, group_id: str, user_id: Optional[str] = None, application_id: Optional[str] = None) Group

Remove a user or an application from a group. Remove a user or an application from a group. You can specify a user_id and application_id in the body of your request. Note that you can only remove one of each per request. Removing a user from a group means that any permissions given to them via the group (i.e. from an attached policy) will no longer apply. Be sure you want to remove these permissions from the user before proceeding. :param group_id: ID of the group. :param user_id: ID of the user to remove. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :param application_id: ID of the application to remove. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :return: Group

Usage:

result = api.remove_group_member(
    group_id="example",
)
set_group_members(*, group_id: str, user_ids: List[str], application_ids: List[str]) Group

Overwrite users and applications of a group. Overwrite users and applications configuration in a group. Any information that you add using this command will overwrite the previous configuration. :param group_id: :param user_ids: :param application_ids: :return: Group

Usage:

result = api.set_group_members(
    group_id="example",
    user_ids=[],
    application_ids=[],
)
set_rules(*, policy_id: str, rules: List[RuleSpecs]) SetRulesResponse

Set rules of a given policy. Overwrite the rules of a given policy. Any information that you add using this command will overwrite the previous configuration. If you include some of the rules you already had in your previous configuration in your new one, but you change their order, the new order of display will apply. While policy rules are ordered, they have no impact on the access logic of IAM because rules are allow-only. :param policy_id: Id of policy to update. :param rules: Rules of the policy to set. :return: SetRulesResponse

Usage:

result = api.set_rules(
    policy_id="example",
    rules=[],
)
unlock_user(*, user_id: str) User

Unlock a member. :param user_id: ID of the user to unlock. :return: User

Usage:

result = api.unlock_user(
    user_id="example",
)
update_api_key(*, access_key: str, default_project_id: Optional[str] = None, description: Optional[str] = None) APIKey

Update an API key. Update the parameters of an API key, including default_project_id and description. :param access_key: Access key to update. :param default_project_id: New default Project ID to set. :param description: New description to update. :return: APIKey

Usage:

result = api.update_api_key(
    access_key="example",
)
update_application(*, application_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None) Application

Update an application. Update the parameters of an application, including name and description. :param application_id: ID of the application to update. :param name: New name for the application (max length is 64 chars). :param description: New description for the application (max length is 200 chars). :param tags: New tags for the application (maximum of 10 tags). :return: Application

Usage:

result = api.update_application(
    application_id="example",
)
update_group(*, group_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None) Group

Update a group. Update the parameters of group, including name and description. :param group_id: ID of the group to update. :param name: New name for the group (max length is 64 chars). MUST be unique inside an Organization. :param description: New description for the group (max length is 200 chars). :param tags: New tags for the group (maximum of 10 tags). :return: Group

Usage:

result = api.update_group(
    group_id="example",
)
update_organization_security_settings(*, organization_id: Optional[str] = None, enforce_password_renewal: Optional[bool] = None, grace_period_duration: Optional[str] = None, login_attempts_before_locked: Optional[int] = None) OrganizationSecuritySettings

Update the security settings of an Organization. :param organization_id: ID of the Organization. :param enforce_password_renewal: Defines whether password renewal is enforced during first login. :param grace_period_duration: Duration of the grace period to renew password or enable MFA. :param login_attempts_before_locked: Number of login attempts before the account is locked. :return: OrganizationSecuritySettings

Usage:

result = api.update_organization_security_settings()
update_policy(*, policy_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, user_id: Optional[str] = None, group_id: Optional[str] = None, application_id: Optional[str] = None, no_principal: Optional[bool] = None) Policy

Update an existing policy. Update the parameters of a policy, including name, description, user_id, group_id, application_id and no_principal. :param policy_id: Id of policy to update. :param name: New name for the policy (max length is 64 characters). :param description: New description of policy (max length is 200 characters). :param tags: New tags for the policy (maximum of 10 tags). :param user_id: New ID of user attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param group_id: New ID of group attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param application_id: New ID of application attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param no_principal: Defines whether or not the policy is attributed to a principal. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :return: Policy

Usage:

result = api.update_policy(
    policy_id="example",
)
update_ssh_key(*, ssh_key_id: str, name: Optional[str] = None, disabled: Optional[bool] = None) SSHKey

Update an SSH key. Update the parameters of an SSH key, including name and disable. :param ssh_key_id: :param name: Name of the SSH key. Max length is 1000. :param disabled: Enable or disable the SSH key. :return: SSHKey

Usage:

result = api.update_ssh_key(
    ssh_key_id="example",
)
update_user(*, user_id: str, tags: Optional[List[str]] = None, email: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, phone_number: Optional[str] = None, locale: Optional[str] = None) User

Update a user. Update the parameters of a user, including tags. :param user_id: ID of the user to update. :param tags: New tags for the user (maximum of 10 tags). :param email: IAM member email. :param first_name: IAM member first name. :param last_name: IAM member last name. :param phone_number: IAM member phone number. :param locale: IAM member locale. :return: User

Usage:

result = api.update_user(
    user_id="example",
)
update_user_password(*, user_id: str, password: str) User

Update an user’s password. :param user_id: ID of the user to update. :param password: The new password. :return: User

Usage:

result = api.update_user_password(
    user_id="example",
    password="example",
)
update_user_username(*, user_id: str, username: str) User

Update an user’s username. :param user_id: ID of the user to update. :param username: The new username. :return: User

Usage:

result = api.update_user_username(
    user_id="example",
    username="example",
)
validate_user_mfaotp(*, user_id: str, one_time_password: str) ValidateUserMFAOTPResponse

Validate a MFA OTP. :param user_id: User ID of the MFA OTP. :param one_time_password: A password generated using the OTP. :return: ValidateUserMFAOTPResponse

Usage:

result = api.validate_user_mfaotp(
    user_id="example",
    one_time_password="example",
)

scaleway.iam.v1alpha1.marshalling module

scaleway.iam.v1alpha1.marshalling.marshal_AddGroupMemberRequest(request: AddGroupMemberRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_AddGroupMembersRequest(request: AddGroupMembersRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateAPIKeyRequest(request: CreateAPIKeyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateApplicationRequest(request: CreateApplicationRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateGroupRequest(request: CreateGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateJWTRequest(request: CreateJWTRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreatePolicyRequest(request: CreatePolicyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateSSHKeyRequest(request: CreateSSHKeyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateUserRequest(request: CreateUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_CreateUserRequestMember(request: CreateUserRequestMember, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_RemoveGroupMemberRequest(request: RemoveGroupMemberRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_RuleSpecs(request: RuleSpecs, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_SetGroupMembersRequest(request: SetGroupMembersRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_SetRulesRequest(request: SetRulesRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateAPIKeyRequest(request: UpdateAPIKeyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateApplicationRequest(request: UpdateApplicationRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateGroupRequest(request: UpdateGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateOrganizationSecuritySettingsRequest(request: UpdateOrganizationSecuritySettingsRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdatePolicyRequest(request: UpdatePolicyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateSSHKeyRequest(request: UpdateSSHKeyRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateUserPasswordRequest(request: UpdateUserPasswordRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateUserRequest(request: UpdateUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_UpdateUserUsernameRequest(request: UpdateUserUsernameRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.marshal_ValidateUserMFAOTPRequest(request: ValidateUserMFAOTPRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.iam.v1alpha1.marshalling.unmarshal_APIKey(data: Any) APIKey
scaleway.iam.v1alpha1.marshalling.unmarshal_Application(data: Any) Application
scaleway.iam.v1alpha1.marshalling.unmarshal_Connection(data: Any) Connection
scaleway.iam.v1alpha1.marshalling.unmarshal_ConnectionConnectedOrganization(data: Any) ConnectionConnectedOrganization
scaleway.iam.v1alpha1.marshalling.unmarshal_ConnectionConnectedUser(data: Any) ConnectionConnectedUser
scaleway.iam.v1alpha1.marshalling.unmarshal_EncodedJWT(data: Any) EncodedJWT
scaleway.iam.v1alpha1.marshalling.unmarshal_GetUserConnectionsResponse(data: Any) GetUserConnectionsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_GracePeriod(data: Any) GracePeriod
scaleway.iam.v1alpha1.marshalling.unmarshal_Group(data: Any) Group
scaleway.iam.v1alpha1.marshalling.unmarshal_JWT(data: Any) JWT
scaleway.iam.v1alpha1.marshalling.unmarshal_ListAPIKeysResponse(data: Any) ListAPIKeysResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListApplicationsResponse(data: Any) ListApplicationsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListGracePeriodsResponse(data: Any) ListGracePeriodsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListGroupsResponse(data: Any) ListGroupsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListJWTsResponse(data: Any) ListJWTsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListLogsResponse(data: Any) ListLogsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListPermissionSetsResponse(data: Any) ListPermissionSetsResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListPoliciesResponse(data: Any) ListPoliciesResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListQuotaResponse(data: Any) ListQuotaResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListRulesResponse(data: Any) ListRulesResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListSSHKeysResponse(data: Any) ListSSHKeysResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_ListUsersResponse(data: Any) ListUsersResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_Log(data: Any) Log
scaleway.iam.v1alpha1.marshalling.unmarshal_MFAOTP(data: Any) MFAOTP
scaleway.iam.v1alpha1.marshalling.unmarshal_OrganizationSecuritySettings(data: Any) OrganizationSecuritySettings
scaleway.iam.v1alpha1.marshalling.unmarshal_PermissionSet(data: Any) PermissionSet
scaleway.iam.v1alpha1.marshalling.unmarshal_Policy(data: Any) Policy
scaleway.iam.v1alpha1.marshalling.unmarshal_Quotum(data: Any) Quotum
scaleway.iam.v1alpha1.marshalling.unmarshal_QuotumLimit(data: Any) QuotumLimit
scaleway.iam.v1alpha1.marshalling.unmarshal_Rule(data: Any) Rule
scaleway.iam.v1alpha1.marshalling.unmarshal_SSHKey(data: Any) SSHKey
scaleway.iam.v1alpha1.marshalling.unmarshal_SetRulesResponse(data: Any) SetRulesResponse
scaleway.iam.v1alpha1.marshalling.unmarshal_User(data: Any) User
scaleway.iam.v1alpha1.marshalling.unmarshal_ValidateUserMFAOTPResponse(data: Any) ValidateUserMFAOTPResponse

scaleway.iam.v1alpha1.types module

class scaleway.iam.v1alpha1.types.APIKey(access_key: 'str', description: 'str', default_project_id: 'str', editable: 'bool', deletable: 'bool', managed: 'bool', creation_ip: 'str', secret_key: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', expires_at: 'Optional[datetime]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

access_key: str

Access key of the API key.

application_id: Optional[str]
created_at: Optional[datetime]

Date and time of API key creation.

creation_ip: str

IP address of the device that created the API key.

default_project_id: str

Default Project ID specified for this API key.

deletable: bool

Defines whether or not the API key is deletable.

description: str

Description of API key.

editable: bool

Defines whether or not the API key is editable.

expires_at: Optional[datetime]

Date and time of API key expiration.

managed: bool

Defines whether or not the API key is managed.

secret_key: Optional[str]

Secret key of the API Key.

updated_at: Optional[datetime]

Date and time of last API key update.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.AddGroupMemberRequest(group_id: 'str', user_id: 'Optional[str]', application_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
group_id: str

ID of the group.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.AddGroupMembersRequest(group_id: 'str', user_ids: 'Optional[List[str]]', application_ids: 'Optional[List[str]]')

Bases: object

application_ids: Optional[List[str]]

IDs of the applications to add.

group_id: str

ID of the group.

user_ids: Optional[List[str]]

IDs of the users to add.

class scaleway.iam.v1alpha1.types.Application(id: 'str', name: 'str', description: 'str', organization_id: 'str', editable: 'bool', deletable: 'bool', managed: 'bool', nb_api_keys: 'int', tags: 'List[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time application was created.

deletable: bool

Defines whether or not the application is deletable.

description: str

Description of the application.

editable: bool

Defines whether or not the application is editable.

id: str

ID of the application.

managed: bool

Defines whether or not the application is managed.

name: str

Name of the application.

nb_api_keys: int

Number of API keys attributed to the application.

organization_id: str

ID of the Organization.

tags: List[str]

Tags associated with the user.

updated_at: Optional[datetime]

Date and time of last application update.

class scaleway.iam.v1alpha1.types.BearerType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

APPLICATION = 'application'
UNKNOWN_BEARER_TYPE = 'unknown_bearer_type'
USER = 'user'
class scaleway.iam.v1alpha1.types.ClonePolicyRequest(policy_id: 'str')

Bases: object

policy_id: str
class scaleway.iam.v1alpha1.types.Connection(organization: 'Optional[ConnectionConnectedOrganization]', user: 'Optional[ConnectionConnectedUser]')

Bases: object

organization: Optional[ConnectionConnectedOrganization]

Information about the connected organization.

user: Optional[ConnectionConnectedUser]

Information about the connected user.

class scaleway.iam.v1alpha1.types.ConnectionConnectedOrganization(id: 'str', name: 'str', locked: 'bool')

Bases: object

id: str
locked: bool
name: str
class scaleway.iam.v1alpha1.types.ConnectionConnectedUser(id: 'str', username: 'str', type_: 'UserType')

Bases: object

id: str
type_: UserType
username: str
class scaleway.iam.v1alpha1.types.CreateAPIKeyRequest(description: 'str', expires_at: 'Optional[datetime]', default_project_id: 'Optional[str]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
default_project_id: Optional[str]

Default Project ID to use with Object Storage.

description: str

Description of the API key (max length is 200 characters).

expires_at: Optional[datetime]

Expiration date of the API key.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.CreateApplicationRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: str

Description of the application (max length is 200 characters).

name: Optional[str]

Name of the application to create (max length is 64 characters).

organization_id: Optional[str]

ID of the Organization.

tags: Optional[List[str]]

Tags associated with the application (maximum of 10 tags).

class scaleway.iam.v1alpha1.types.CreateGroupRequest(description: 'str', organization_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: str

Description of the group to create (max length is 200 chars).

name: Optional[str]

Name of the group to create (max length is 64 chars). MUST be unique inside an Organization.

organization_id: Optional[str]

ID of Organization linked to the group.

tags: Optional[List[str]]

Tags associated with the group (maximum of 10 tags).

class scaleway.iam.v1alpha1.types.CreateJWTRequest(user_id: 'str', referrer: 'str')

Bases: object

referrer: str

Referrer of the JWT.

user_id: str

ID of the user the JWT will be created for.

class scaleway.iam.v1alpha1.types.CreatePolicyRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]', rules: 'Optional[List[RuleSpecs]]', tags: 'Optional[List[str]]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
description: str

Description of the policy to create (max length is 200 characters).

group_id: Optional[str]
name: Optional[str]

Name of the policy to create (max length is 64 characters).

no_principal: Optional[bool]
organization_id: Optional[str]

ID of the Organization.

rules: Optional[List[RuleSpecs]]

Rules of the policy to create.

tags: Optional[List[str]]

Tags associated with the policy (maximum of 10 tags).

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.CreateSSHKeyRequest(public_key: 'str', name: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the SSH key. Max length is 1000.

project_id: Optional[str]

Project the resource is attributed to.

public_key: str

SSH public key. Currently only the ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000.

class scaleway.iam.v1alpha1.types.CreateUserMFAOTPRequest(user_id: 'str')

Bases: object

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.types.CreateUserRequest(organization_id: 'Optional[str]', tags: 'Optional[List[str]]', email: 'Optional[str]', member: 'Optional[CreateUserRequestMember]')

Bases: object

email: Optional[str]
member: Optional[CreateUserRequestMember]
organization_id: Optional[str]

ID of the Organization.

tags: Optional[List[str]]

Tags associated with the user.

class scaleway.iam.v1alpha1.types.CreateUserRequestMember(email: 'str', send_password_email: 'bool', send_welcome_email: 'bool', username: 'str', password: 'str', first_name: 'str', last_name: 'str', phone_number: 'str', locale: 'str')

Bases: object

email: str

Email of the user to create.

first_name: str

The member’s first name.

last_name: str

The member’s last name.

locale: str

The member’s locale.

password: str

The member’s password.

phone_number: str

The member’s phone number.

send_password_email: bool

Whether or not to send an email containing the member’s password.

send_welcome_email: bool

Whether or not to send a welcome email that includes onboarding information.

username: str

The member’s username.

class scaleway.iam.v1alpha1.types.DeleteAPIKeyRequest(access_key: 'str')

Bases: object

access_key: str

Access key to delete.

class scaleway.iam.v1alpha1.types.DeleteApplicationRequest(application_id: 'str')

Bases: object

application_id: str

ID of the application to delete.

class scaleway.iam.v1alpha1.types.DeleteGroupRequest(group_id: 'str')

Bases: object

group_id: str

ID of the group to delete.

class scaleway.iam.v1alpha1.types.DeleteJWTRequest(jti: 'str')

Bases: object

jti: str

JWT ID of the JWT to delete.

class scaleway.iam.v1alpha1.types.DeletePolicyRequest(policy_id: 'str')

Bases: object

policy_id: str

Id of policy to delete.

class scaleway.iam.v1alpha1.types.DeleteSSHKeyRequest(ssh_key_id: 'str')

Bases: object

ssh_key_id: str
class scaleway.iam.v1alpha1.types.DeleteUserMFAOTPRequest(user_id: 'str')

Bases: object

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.types.DeleteUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to delete.

class scaleway.iam.v1alpha1.types.EncodedJWT(token: 'str', renew_token: 'str', jwt: 'Optional[JWT]')

Bases: object

jwt: Optional[JWT]

The renewed JWT.

renew_token: str

The encoded renew token. This token is necessary to renew the JWT.

token: str

The encoded token of the renewed JWT.

class scaleway.iam.v1alpha1.types.GetAPIKeyRequest(access_key: 'str')

Bases: object

access_key: str

Access key to search for.

class scaleway.iam.v1alpha1.types.GetApplicationRequest(application_id: 'str')

Bases: object

application_id: str

ID of the application to find.

class scaleway.iam.v1alpha1.types.GetGroupRequest(group_id: 'str')

Bases: object

group_id: str

ID of the group.

class scaleway.iam.v1alpha1.types.GetJWTRequest(jti: 'str')

Bases: object

jti: str

JWT ID of the JWT to get.

class scaleway.iam.v1alpha1.types.GetLogRequest(log_id: 'str')

Bases: object

log_id: str

ID of the log.

class scaleway.iam.v1alpha1.types.GetOrganizationSecuritySettingsRequest(organization_id: 'Optional[str]')

Bases: object

organization_id: Optional[str]

ID of the Organization.

class scaleway.iam.v1alpha1.types.GetPolicyRequest(policy_id: 'str')

Bases: object

policy_id: str

Id of policy to search.

class scaleway.iam.v1alpha1.types.GetQuotumRequest(quotum_name: 'str', organization_id: 'Optional[str]')

Bases: object

organization_id: Optional[str]

ID of the Organization.

quotum_name: str

Name of the quota to get.

class scaleway.iam.v1alpha1.types.GetSSHKeyRequest(ssh_key_id: 'str')

Bases: object

ssh_key_id: str

ID of the SSH key.

class scaleway.iam.v1alpha1.types.GetUserConnectionsRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to list connections for.

class scaleway.iam.v1alpha1.types.GetUserConnectionsResponse(connections: 'List[Connection]')

Bases: object

connections: List[Connection]

List of connections.

class scaleway.iam.v1alpha1.types.GetUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to find.

class scaleway.iam.v1alpha1.types.GracePeriod(type_: 'GracePeriodType', created_at: 'Optional[datetime]', expires_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time the grace period was created.

expires_at: Optional[datetime]

Date and time the grace period expires.

type_: GracePeriodType

Type of grace period.

class scaleway.iam.v1alpha1.types.GracePeriodType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

SET_MFA = 'set_mfa'
UNKNOWN_GRACE_PERIOD_TYPE = 'unknown_grace_period_type'
UPDATE_PASSWORD = 'update_password'
class scaleway.iam.v1alpha1.types.Group(id: 'str', organization_id: 'str', name: 'str', description: 'str', user_ids: 'List[str]', application_ids: 'List[str]', tags: 'List[str]', editable: 'bool', deletable: 'bool', managed: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

application_ids: List[str]

IDs of applications attached to this group.

created_at: Optional[datetime]

Date and time of group creation.

deletable: bool

Defines whether or not the group is deletable.

description: str

Description of the group.

editable: bool

Defines whether or not the group is editable.

id: str

ID of the group.

managed: bool

Defines whether or not the group is managed.

name: str

Name of the group.

organization_id: str

ID of Organization linked to the group.

tags: List[str]

Tags associated to the group.

updated_at: Optional[datetime]

Date and time of last group update.

user_ids: List[str]

IDs of users attached to this group.

class scaleway.iam.v1alpha1.types.JWT(jti: 'str', issuer_id: 'str', audience_id: 'str', ip: 'str', user_agent: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', expires_at: 'Optional[datetime]')

Bases: object

audience_id: str

ID of the user targeted by the JWT.

created_at: Optional[datetime]

Creation date of the JWT.

expires_at: Optional[datetime]

Expiration date of the JWT.

ip: str

IP address used during the creation of the JWT.

issuer_id: str

ID of the user who issued the JWT.

jti: str

JWT ID.

updated_at: Optional[datetime]

Last update date of the JWT.

user_agent: str

User-agent used during the creation of the JWT.

class scaleway.iam.v1alpha1.types.ListAPIKeysRequest(order_by: 'Optional[ListAPIKeysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', editable: 'Optional[bool]', expired: 'Optional[bool]', access_key: 'Optional[str]', description: 'Optional[str]', bearer_id: 'Optional[str]', bearer_type: 'Optional[BearerType]', access_keys: 'Optional[List[str]]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

access_key: Optional[str]

Filter by access key (deprecated in favor of access_keys).

access_keys: Optional[List[str]]

Filter by a list of access keys.

application_id: Optional[str]
bearer_id: Optional[str]

Filter by bearer ID.

bearer_type: Optional[BearerType]

Filter by type of bearer.

description: Optional[str]

Filter by description.

editable: Optional[bool]

Defines whether to filter out editable API keys or not.

expired: Optional[bool]

Defines whether to filter out expired API keys or not.

order_by: Optional[ListAPIKeysRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of Organization.

page: Optional[int]

Page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.ListAPIKeysRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACCESS_KEY_ASC = 'access_key_asc'
ACCESS_KEY_DESC = 'access_key_desc'
CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
EXPIRES_AT_ASC = 'expires_at_asc'
EXPIRES_AT_DESC = 'expires_at_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.types.ListAPIKeysResponse(api_keys: 'List[APIKey]', total_count: 'int')

Bases: object

api_keys: List[APIKey]

List of API keys.

total_count: int

Total count of API Keys.

class scaleway.iam.v1alpha1.types.ListApplicationsRequest(order_by: 'Optional[ListApplicationsRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', organization_id: 'Optional[str]', editable: 'Optional[bool]', application_ids: 'Optional[List[str]]', tag: 'Optional[str]')

Bases: object

application_ids: Optional[List[str]]

Filter by list of IDs.

editable: Optional[bool]

Defines whether to filter out editable applications or not.

name: Optional[str]

Name of the application to filter.

order_by: Optional[ListApplicationsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

class scaleway.iam.v1alpha1.types.ListApplicationsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.types.ListApplicationsResponse(applications: 'List[Application]', total_count: 'int')

Bases: object

applications: List[Application]

List of applications.

total_count: int

Total count of applications.

class scaleway.iam.v1alpha1.types.ListGracePeriodsRequest(user_id: 'Optional[str]')

Bases: object

user_id: Optional[str]

ID of the user to list grace periods for.

class scaleway.iam.v1alpha1.types.ListGracePeriodsResponse(grace_periods: 'List[GracePeriod]')

Bases: object

grace_periods: List[GracePeriod]

List of grace periods.

class scaleway.iam.v1alpha1.types.ListGroupsRequest(order_by: 'Optional[ListGroupsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', name: 'Optional[str]', application_ids: 'Optional[List[str]]', user_ids: 'Optional[List[str]]', group_ids: 'Optional[List[str]]', tag: 'Optional[str]')

Bases: object

application_ids: Optional[List[str]]

Filter by a list of application IDs.

group_ids: Optional[List[str]]

Filter by a list of group IDs.

name: Optional[str]

Name of group to find.

order_by: Optional[ListGroupsRequestOrderBy]

Sort order of groups.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Requested page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of items per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

user_ids: Optional[List[str]]

Filter by a list of user IDs.

class scaleway.iam.v1alpha1.types.ListGroupsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.types.ListGroupsResponse(groups: 'List[Group]', total_count: 'int')

Bases: object

groups: List[Group]

List of groups.

total_count: int

Total count of groups.

class scaleway.iam.v1alpha1.types.ListJWTsRequest(order_by: 'Optional[ListJWTsRequestOrderBy]', audience_id: 'Optional[str]', page_size: 'Optional[int]', page: 'Optional[int]', expired: 'Optional[bool]')

Bases: object

audience_id: Optional[str]

ID of the user to search.

expired: Optional[bool]

Filter out expired JWTs or not.

order_by: Optional[ListJWTsRequestOrderBy]

Criteria for sorting results.

page: Optional[int]

Page number. Value must be greater to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

class scaleway.iam.v1alpha1.types.ListJWTsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.types.ListJWTsResponse(jwts: 'List[JWT]', total_count: 'int')

Bases: object

jwts: List[JWT]
total_count: int
class scaleway.iam.v1alpha1.types.ListLogsRequest(order_by: 'Optional[ListLogsRequestOrderBy]', organization_id: 'Optional[str]', page_size: 'Optional[int]', page: 'Optional[int]', created_after: 'Optional[datetime]', created_before: 'Optional[datetime]', action: 'Optional[LogAction]', resource_type: 'Optional[LogResourceType]', search: 'Optional[str]')

Bases: object

action: Optional[LogAction]

Defined whether or not to filter out by a specific action.

created_after: Optional[datetime]

Defined whether or not to filter out logs created after this timestamp.

created_before: Optional[datetime]

Defined whether or not to filter out logs created before this timestamp.

order_by: Optional[ListLogsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

resource_type: Optional[LogResourceType]

Defined whether or not to filter out by a specific type of resource.

search: Optional[str]

Defined whether or not to filter out log by bearer ID or resource ID.

class scaleway.iam.v1alpha1.types.ListLogsRequestOrderBy(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'
class scaleway.iam.v1alpha1.types.ListLogsResponse(logs: 'List[Log]', total_count: 'int')

Bases: object

logs: List[Log]

List of logs.

total_count: int

Total count of logs.

class scaleway.iam.v1alpha1.types.ListPermissionSetsRequest(order_by: 'Optional[ListPermissionSetsRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]')

Bases: object

order_by: Optional[ListPermissionSetsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

class scaleway.iam.v1alpha1.types.ListPermissionSetsRequestOrderBy(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.iam.v1alpha1.types.ListPermissionSetsResponse(permission_sets: 'List[PermissionSet]', total_count: 'int')

Bases: object

permission_sets: List[PermissionSet]

List of permission sets.

total_count: int

Total count of permission sets.

class scaleway.iam.v1alpha1.types.ListPoliciesRequest(order_by: 'Optional[ListPoliciesRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', editable: 'Optional[bool]', user_ids: 'Optional[List[str]]', group_ids: 'Optional[List[str]]', application_ids: 'Optional[List[str]]', no_principal: 'Optional[bool]', policy_name: 'Optional[str]', tag: 'Optional[str]', policy_ids: 'Optional[List[str]]')

Bases: object

application_ids: Optional[List[str]]

Filter by a list of application IDs.

editable: Optional[bool]

Defines whether or not filter out editable policies.

group_ids: Optional[List[str]]

Defines whether or not to filter by list of group IDs.

no_principal: Optional[bool]

Defines whether or not the policy is attributed to a principal.

order_by: Optional[ListPoliciesRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

policy_ids: Optional[List[str]]

Filter by a list of IDs.

policy_name: Optional[str]

Name of the policy to fetch.

tag: Optional[str]

Filter by tags containing a given string.

user_ids: Optional[List[str]]

Defines whether or not to filter by list of user IDs.

class scaleway.iam.v1alpha1.types.ListPoliciesRequestOrderBy(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'
POLICY_NAME_ASC = 'policy_name_asc'
POLICY_NAME_DESC = 'policy_name_desc'
class scaleway.iam.v1alpha1.types.ListPoliciesResponse(policies: 'List[Policy]', total_count: 'int')

Bases: object

policies: List[Policy]

List of policies.

total_count: int

Total count of policies.

class scaleway.iam.v1alpha1.types.ListQuotaRequest(order_by: 'Optional[ListQuotaRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', quotum_names: 'Optional[List[str]]')

Bases: object

order_by: Optional[ListQuotaRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

quotum_names: Optional[List[str]]

List of quotum names to filter from.

class scaleway.iam.v1alpha1.types.ListQuotaRequestOrderBy(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.iam.v1alpha1.types.ListQuotaResponse(quota: 'List[Quotum]', total_count: 'int')

Bases: object

quota: List[Quotum]

List of quota.

total_count: int

Total count of quota.

class scaleway.iam.v1alpha1.types.ListRulesRequest(policy_id: 'str', page_size: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

policy_id: str

Id of policy to search.

class scaleway.iam.v1alpha1.types.ListRulesResponse(rules: 'List[Rule]', total_count: 'int')

Bases: object

rules: List[Rule]

Rules of the policy.

total_count: int

Total count of rules.

class scaleway.iam.v1alpha1.types.ListSSHKeysRequest(order_by: 'Optional[ListSSHKeysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', name: 'Optional[str]', project_id: 'Optional[str]', disabled: 'Optional[bool]')

Bases: object

disabled: Optional[bool]

Defines whether to include disabled SSH keys or not.

name: Optional[str]

Name of group to find.

order_by: Optional[ListSSHKeysRequestOrderBy]

Sort order of the SSH keys.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Requested page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of items per page. Value must be between 1 and 100.

project_id: Optional[str]

Filter by Project ID.

class scaleway.iam.v1alpha1.types.ListSSHKeysRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.types.ListSSHKeysResponse(ssh_keys: 'List[SSHKey]', total_count: 'int')

Bases: object

ssh_keys: List[SSHKey]

List of SSH keys.

total_count: int

Total count of SSH keys.

class scaleway.iam.v1alpha1.types.ListUsersRequest(order_by: 'Optional[ListUsersRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', user_ids: 'Optional[List[str]]', mfa: 'Optional[bool]', tag: 'Optional[str]', type_: 'Optional[UserType]')

Bases: object

mfa: Optional[bool]

Filter by MFA status.

order_by: Optional[ListUsersRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

type_: Optional[UserType]

Filter by user type.

user_ids: Optional[List[str]]

Filter by list of IDs.

class scaleway.iam.v1alpha1.types.ListUsersRequestOrderBy(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'
EMAIL_ASC = 'email_asc'
EMAIL_DESC = 'email_desc'
LAST_LOGIN_ASC = 'last_login_asc'
LAST_LOGIN_DESC = 'last_login_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
USERNAME_ASC = 'username_asc'
USERNAME_DESC = 'username_desc'
class scaleway.iam.v1alpha1.types.ListUsersResponse(users: 'List[User]', total_count: 'int')

Bases: object

total_count: int

Total count of users.

users: List[User]

List of users.

class scaleway.iam.v1alpha1.types.LocalityType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

GLOBAL = 'global'
REGION = 'region'
ZONE = 'zone'
class scaleway.iam.v1alpha1.types.LockUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to lock.

class scaleway.iam.v1alpha1.types.Log(id: 'str', ip: 'str', user_agent: 'str', action: 'LogAction', bearer_id: 'str', organization_id: 'str', resource_type: 'LogResourceType', resource_id: 'str', created_at: 'Optional[datetime]')

Bases: object

action: LogAction

Action linked to the log.

bearer_id: str

ID of the principal at the origin of the log.

created_at: Optional[datetime]

Creation date of the log.

id: str

Log ID.

ip: str

IP address of the HTTP request linked to the log.

organization_id: str

ID of Organization linked to the log.

resource_id: str

ID of the resource linked to the log.

resource_type: LogResourceType

Type of the resource linked to the log.

user_agent: str

User-Agent of the HTTP request linked to the log.

class scaleway.iam.v1alpha1.types.LogAction(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED = 'created'
DELETED = 'deleted'
UNKNOWN_ACTION = 'unknown_action'
UPDATED = 'updated'
class scaleway.iam.v1alpha1.types.LogResourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

API_KEY = 'api_key'
APPLICATION = 'application'
GROUP = 'group'
POLICY = 'policy'
UNKNOWN_RESOURCE_TYPE = 'unknown_resource_type'
USER = 'user'
class scaleway.iam.v1alpha1.types.MFAOTP(secret: 'str')

Bases: object

secret: str
class scaleway.iam.v1alpha1.types.OrganizationSecuritySettings(enforce_password_renewal: 'bool', login_attempts_before_locked: 'int', grace_period_duration: 'Optional[str]')

Bases: object

enforce_password_renewal: bool

Defines whether password renewal is enforced during first login.

grace_period_duration: Optional[str]

Duration of the grace period to renew password or enable MFA.

login_attempts_before_locked: int

Number of login attempts before the account is locked.

class scaleway.iam.v1alpha1.types.PermissionSet(id: 'str', name: 'str', scope_type: 'PermissionSetScopeType', description: 'str', categories: 'Optional[List[str]]')

Bases: object

categories: Optional[List[str]]

Categories of the permission set.

description: str

Description of the permission set.

id: str

Id of the permission set.

name: str

Name of the permission set.

scope_type: PermissionSetScopeType

Scope of the permission set.

class scaleway.iam.v1alpha1.types.PermissionSetScopeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACCOUNT_ROOT_USER = 'account_root_user'
ORGANIZATION = 'organization'
PROJECTS = 'projects'
UNKNOWN_SCOPE_TYPE = 'unknown_scope_type'
class scaleway.iam.v1alpha1.types.Policy(id: 'str', name: 'str', description: 'str', organization_id: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', editable: 'bool', deletable: 'bool', managed: 'bool', nb_rules: 'int', nb_scopes: 'int', nb_permission_sets: 'int', tags: 'List[str]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
created_at: Optional[datetime]

Date and time of policy creation.

deletable: bool

Defines whether or not a policy is deletable.

description: str

Description of the policy.

editable: bool

Defines whether or not a policy is editable.

group_id: Optional[str]
id: str

Id of the policy.

managed: bool

Defines whether or not a policy is managed.

name: str

Name of the policy.

nb_permission_sets: int

Number of permission sets of the policy.

nb_rules: int

Number of rules of the policy.

nb_scopes: int

Number of policy scopes.

no_principal: Optional[bool]
organization_id: str

Organization ID of the policy.

tags: List[str]

Tags associated with the policy.

updated_at: Optional[datetime]

Date and time of last policy update.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.Quotum(name: 'str', pretty_name: 'str', unit: 'str', description: 'str', locality_type: 'LocalityType', limits: 'List[QuotumLimit]', limit: 'Optional[int]', unlimited: 'Optional[bool]')

Bases: object

description: str

Details about the quota.

limit: Optional[int]
limits: List[QuotumLimit]

Limits per locality.

locality_type: LocalityType

Whether this quotum is applied on at the zone level, region level, or globally.

name: str

Name of the quota.

pretty_name: str

A human-readable name for the quota.

unit: str

The unit in which the quota is expressed.

unlimited: Optional[bool]
class scaleway.iam.v1alpha1.types.QuotumLimit(global_: 'Optional[bool]', region: 'Optional[ScwRegion]', zone: 'Optional[ScwZone]', limit: 'Optional[int]', unlimited: 'Optional[bool]')

Bases: object

global_: Optional[bool]
limit: Optional[int]
region: Optional[str]
unlimited: Optional[bool]
zone: Optional[str]
class scaleway.iam.v1alpha1.types.RemoveGroupMemberRequest(group_id: 'str', user_id: 'Optional[str]', application_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
group_id: str

ID of the group.

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.Rule(id: 'str', permission_sets_scope_type: 'PermissionSetScopeType', condition: 'str', permission_set_names: 'Optional[List[str]]', project_ids: 'Optional[List[str]]', organization_id: 'Optional[str]', account_root_user_id: 'Optional[str]')

Bases: object

account_root_user_id: Optional[str]
condition: str

Condition expression to evaluate.

id: str

Id of rule.

organization_id: Optional[str]
permission_set_names: Optional[List[str]]

Names of permission sets bound to the rule.

permission_sets_scope_type: PermissionSetScopeType

Permission_set_names have the same scope_type.

project_ids: Optional[List[str]]
class scaleway.iam.v1alpha1.types.RuleSpecs(condition: 'str', permission_set_names: 'Optional[List[str]]', project_ids: 'Optional[List[str]]', organization_id: 'Optional[str]')

Bases: object

condition: str

Condition expression to evaluate.

organization_id: Optional[str]
permission_set_names: Optional[List[str]]

Names of permission sets bound to the rule.

project_ids: Optional[List[str]]
class scaleway.iam.v1alpha1.types.SSHKey(id: 'str', name: 'str', public_key: 'str', fingerprint: 'str', organization_id: 'str', project_id: 'str', disabled: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of SSH key.

disabled: bool

SSH key status.

fingerprint: str

Fingerprint of the SSH key.

id: str

ID of SSH key.

name: str

Name of SSH key.

organization_id: str

ID of Organization linked to the SSH key.

project_id: str

ID of Project linked to the SSH key.

public_key: str

Public key of SSH key.

updated_at: Optional[datetime]

Last update date of SSH key.

class scaleway.iam.v1alpha1.types.SetGroupMembersRequest(group_id: 'str', user_ids: 'List[str]', application_ids: 'List[str]')

Bases: object

application_ids: List[str]
group_id: str
user_ids: List[str]
class scaleway.iam.v1alpha1.types.SetRulesRequest(policy_id: 'str', rules: 'List[RuleSpecs]')

Bases: object

policy_id: str

Id of policy to update.

rules: List[RuleSpecs]

Rules of the policy to set.

class scaleway.iam.v1alpha1.types.SetRulesResponse(rules: 'List[Rule]')

Bases: object

rules: List[Rule]

Rules of the policy.

class scaleway.iam.v1alpha1.types.UnlockUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to unlock.

class scaleway.iam.v1alpha1.types.UpdateAPIKeyRequest(access_key: 'str', default_project_id: 'Optional[str]', description: 'Optional[str]')

Bases: object

access_key: str

Access key to update.

default_project_id: Optional[str]

New default Project ID to set.

description: Optional[str]

New description to update.

class scaleway.iam.v1alpha1.types.UpdateApplicationRequest(application_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

application_id: str

ID of the application to update.

description: Optional[str]

New description for the application (max length is 200 chars).

name: Optional[str]

New name for the application (max length is 64 chars).

tags: Optional[List[str]]

New tags for the application (maximum of 10 tags).

class scaleway.iam.v1alpha1.types.UpdateGroupRequest(group_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

New description for the group (max length is 200 chars).

group_id: str

ID of the group to update.

name: Optional[str]

New name for the group (max length is 64 chars). MUST be unique inside an Organization.

tags: Optional[List[str]]

New tags for the group (maximum of 10 tags).

class scaleway.iam.v1alpha1.types.UpdateOrganizationSecuritySettingsRequest(organization_id: 'Optional[str]', enforce_password_renewal: 'Optional[bool]', grace_period_duration: 'Optional[str]', login_attempts_before_locked: 'Optional[int]')

Bases: object

enforce_password_renewal: Optional[bool]

Defines whether password renewal is enforced during first login.

grace_period_duration: Optional[str]

Duration of the grace period to renew password or enable MFA.

login_attempts_before_locked: Optional[int]

Number of login attempts before the account is locked.

organization_id: Optional[str]

ID of the Organization.

class scaleway.iam.v1alpha1.types.UpdatePolicyRequest(policy_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
description: Optional[str]

New description of policy (max length is 200 characters).

group_id: Optional[str]
name: Optional[str]

New name for the policy (max length is 64 characters).

no_principal: Optional[bool]
policy_id: str

Id of policy to update.

tags: Optional[List[str]]

New tags for the policy (maximum of 10 tags).

user_id: Optional[str]
class scaleway.iam.v1alpha1.types.UpdateSSHKeyRequest(ssh_key_id: 'str', name: 'Optional[str]', disabled: 'Optional[bool]')

Bases: object

disabled: Optional[bool]

Enable or disable the SSH key.

name: Optional[str]

Name of the SSH key. Max length is 1000.

ssh_key_id: str
class scaleway.iam.v1alpha1.types.UpdateUserPasswordRequest(user_id: 'str', password: 'str')

Bases: object

password: str

The new password.

user_id: str

ID of the user to update.

class scaleway.iam.v1alpha1.types.UpdateUserRequest(user_id: 'str', tags: 'Optional[List[str]]', email: 'Optional[str]', first_name: 'Optional[str]', last_name: 'Optional[str]', phone_number: 'Optional[str]', locale: 'Optional[str]')

Bases: object

email: Optional[str]

IAM member email.

first_name: Optional[str]

IAM member first name.

last_name: Optional[str]

IAM member last name.

locale: Optional[str]

IAM member locale.

phone_number: Optional[str]

IAM member phone number.

tags: Optional[List[str]]

New tags for the user (maximum of 10 tags).

user_id: str

ID of the user to update.

class scaleway.iam.v1alpha1.types.UpdateUserUsernameRequest(user_id: 'str', username: 'str')

Bases: object

user_id: str

ID of the user to update.

username: str

The new username.

class scaleway.iam.v1alpha1.types.User(id: 'str', email: 'str', username: 'str', first_name: 'str', last_name: 'str', phone_number: 'str', locale: 'str', organization_id: 'str', deletable: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', last_login_at: 'Optional[datetime]', type_: 'UserType', status: 'UserStatus', mfa: 'bool', account_root_user_id: 'str', tags: 'List[str]', locked: 'bool', two_factor_enabled: 'Optional[bool]')

Bases: object

account_root_user_id: str

ID of the account root user associated with the user.

created_at: Optional[datetime]

Date user was created.

deletable: bool

Deletion status of user. Owners cannot be deleted.

email: str

Email of user.

first_name: str

First name of the user.

id: str

ID of user.

last_login_at: Optional[datetime]

Date of the last login.

last_name: str

Last name of the user.

locale: str

Locale of the user.

locked: bool

Defines whether the user is locked.

mfa: bool

Defines whether MFA is enabled.

organization_id: str

ID of the Organization.

phone_number: str

Phone number of the user.

status: UserStatus

Status of user invitation.

tags: List[str]

Tags associated with the user.

two_factor_enabled: Optional[bool]

Deprecated, use “mfa” instead.

type_: UserType

Type of user.

updated_at: Optional[datetime]

Date of last user update.

username: str

User identifier unique to the Organization.

class scaleway.iam.v1alpha1.types.UserStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACTIVATED = 'activated'
INVITATION_PENDING = 'invitation_pending'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.iam.v1alpha1.types.UserType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

GUEST = 'guest'
MEMBER = 'member'
OWNER = 'owner'
UNKNOWN_TYPE = 'unknown_type'
class scaleway.iam.v1alpha1.types.ValidateUserMFAOTPRequest(user_id: 'str', one_time_password: 'str')

Bases: object

one_time_password: str

A password generated using the OTP.

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.types.ValidateUserMFAOTPResponse(recovery_codes: 'List[str]')

Bases: object

recovery_codes: List[str]

List of recovery codes usable for this OTP method.

Module contents

class scaleway.iam.v1alpha1.APIKey(access_key: 'str', description: 'str', default_project_id: 'str', editable: 'bool', deletable: 'bool', managed: 'bool', creation_ip: 'str', secret_key: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', expires_at: 'Optional[datetime]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

access_key: str

Access key of the API key.

application_id: Optional[str]
created_at: Optional[datetime]

Date and time of API key creation.

creation_ip: str

IP address of the device that created the API key.

default_project_id: str

Default Project ID specified for this API key.

deletable: bool

Defines whether or not the API key is deletable.

description: str

Description of API key.

editable: bool

Defines whether or not the API key is editable.

expires_at: Optional[datetime]

Date and time of API key expiration.

managed: bool

Defines whether or not the API key is managed.

secret_key: Optional[str]

Secret key of the API Key.

updated_at: Optional[datetime]

Date and time of last API key update.

user_id: Optional[str]
class scaleway.iam.v1alpha1.AddGroupMemberRequest(group_id: 'str', user_id: 'Optional[str]', application_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
group_id: str

ID of the group.

user_id: Optional[str]
class scaleway.iam.v1alpha1.AddGroupMembersRequest(group_id: 'str', user_ids: 'Optional[List[str]]', application_ids: 'Optional[List[str]]')

Bases: object

application_ids: Optional[List[str]]

IDs of the applications to add.

group_id: str

ID of the group.

user_ids: Optional[List[str]]

IDs of the users to add.

class scaleway.iam.v1alpha1.Application(id: 'str', name: 'str', description: 'str', organization_id: 'str', editable: 'bool', deletable: 'bool', managed: 'bool', nb_api_keys: 'int', tags: 'List[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time application was created.

deletable: bool

Defines whether or not the application is deletable.

description: str

Description of the application.

editable: bool

Defines whether or not the application is editable.

id: str

ID of the application.

managed: bool

Defines whether or not the application is managed.

name: str

Name of the application.

nb_api_keys: int

Number of API keys attributed to the application.

organization_id: str

ID of the Organization.

tags: List[str]

Tags associated with the user.

updated_at: Optional[datetime]

Date and time of last application update.

class scaleway.iam.v1alpha1.BearerType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

APPLICATION = 'application'
UNKNOWN_BEARER_TYPE = 'unknown_bearer_type'
USER = 'user'
class scaleway.iam.v1alpha1.ClonePolicyRequest(policy_id: 'str')

Bases: object

policy_id: str
class scaleway.iam.v1alpha1.Connection(organization: 'Optional[ConnectionConnectedOrganization]', user: 'Optional[ConnectionConnectedUser]')

Bases: object

organization: Optional[ConnectionConnectedOrganization]

Information about the connected organization.

user: Optional[ConnectionConnectedUser]

Information about the connected user.

class scaleway.iam.v1alpha1.ConnectionConnectedOrganization(id: 'str', name: 'str', locked: 'bool')

Bases: object

id: str
locked: bool
name: str
class scaleway.iam.v1alpha1.ConnectionConnectedUser(id: 'str', username: 'str', type_: 'UserType')

Bases: object

id: str
type_: UserType
username: str
class scaleway.iam.v1alpha1.CreateAPIKeyRequest(description: 'str', expires_at: 'Optional[datetime]', default_project_id: 'Optional[str]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
default_project_id: Optional[str]

Default Project ID to use with Object Storage.

description: str

Description of the API key (max length is 200 characters).

expires_at: Optional[datetime]

Expiration date of the API key.

user_id: Optional[str]
class scaleway.iam.v1alpha1.CreateApplicationRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: str

Description of the application (max length is 200 characters).

name: Optional[str]

Name of the application to create (max length is 64 characters).

organization_id: Optional[str]

ID of the Organization.

tags: Optional[List[str]]

Tags associated with the application (maximum of 10 tags).

class scaleway.iam.v1alpha1.CreateGroupRequest(description: 'str', organization_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: str

Description of the group to create (max length is 200 chars).

name: Optional[str]

Name of the group to create (max length is 64 chars). MUST be unique inside an Organization.

organization_id: Optional[str]

ID of Organization linked to the group.

tags: Optional[List[str]]

Tags associated with the group (maximum of 10 tags).

class scaleway.iam.v1alpha1.CreateJWTRequest(user_id: 'str', referrer: 'str')

Bases: object

referrer: str

Referrer of the JWT.

user_id: str

ID of the user the JWT will be created for.

class scaleway.iam.v1alpha1.CreatePolicyRequest(description: 'str', name: 'Optional[str]', organization_id: 'Optional[str]', rules: 'Optional[List[RuleSpecs]]', tags: 'Optional[List[str]]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
description: str

Description of the policy to create (max length is 200 characters).

group_id: Optional[str]
name: Optional[str]

Name of the policy to create (max length is 64 characters).

no_principal: Optional[bool]
organization_id: Optional[str]

ID of the Organization.

rules: Optional[List[RuleSpecs]]

Rules of the policy to create.

tags: Optional[List[str]]

Tags associated with the policy (maximum of 10 tags).

user_id: Optional[str]
class scaleway.iam.v1alpha1.CreateSSHKeyRequest(public_key: 'str', name: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the SSH key. Max length is 1000.

project_id: Optional[str]

Project the resource is attributed to.

public_key: str

SSH public key. Currently only the ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000.

class scaleway.iam.v1alpha1.CreateUserMFAOTPRequest(user_id: 'str')

Bases: object

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.CreateUserRequest(organization_id: 'Optional[str]', tags: 'Optional[List[str]]', email: 'Optional[str]', member: 'Optional[CreateUserRequestMember]')

Bases: object

email: Optional[str]
member: Optional[CreateUserRequestMember]
organization_id: Optional[str]

ID of the Organization.

tags: Optional[List[str]]

Tags associated with the user.

class scaleway.iam.v1alpha1.CreateUserRequestMember(email: 'str', send_password_email: 'bool', send_welcome_email: 'bool', username: 'str', password: 'str', first_name: 'str', last_name: 'str', phone_number: 'str', locale: 'str')

Bases: object

email: str

Email of the user to create.

first_name: str

The member’s first name.

last_name: str

The member’s last name.

locale: str

The member’s locale.

password: str

The member’s password.

phone_number: str

The member’s phone number.

send_password_email: bool

Whether or not to send an email containing the member’s password.

send_welcome_email: bool

Whether or not to send a welcome email that includes onboarding information.

username: str

The member’s username.

class scaleway.iam.v1alpha1.DeleteAPIKeyRequest(access_key: 'str')

Bases: object

access_key: str

Access key to delete.

class scaleway.iam.v1alpha1.DeleteApplicationRequest(application_id: 'str')

Bases: object

application_id: str

ID of the application to delete.

class scaleway.iam.v1alpha1.DeleteGroupRequest(group_id: 'str')

Bases: object

group_id: str

ID of the group to delete.

class scaleway.iam.v1alpha1.DeleteJWTRequest(jti: 'str')

Bases: object

jti: str

JWT ID of the JWT to delete.

class scaleway.iam.v1alpha1.DeletePolicyRequest(policy_id: 'str')

Bases: object

policy_id: str

Id of policy to delete.

class scaleway.iam.v1alpha1.DeleteSSHKeyRequest(ssh_key_id: 'str')

Bases: object

ssh_key_id: str
class scaleway.iam.v1alpha1.DeleteUserMFAOTPRequest(user_id: 'str')

Bases: object

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.DeleteUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to delete.

class scaleway.iam.v1alpha1.EncodedJWT(token: 'str', renew_token: 'str', jwt: 'Optional[JWT]')

Bases: object

jwt: Optional[JWT]

The renewed JWT.

renew_token: str

The encoded renew token. This token is necessary to renew the JWT.

token: str

The encoded token of the renewed JWT.

class scaleway.iam.v1alpha1.GetAPIKeyRequest(access_key: 'str')

Bases: object

access_key: str

Access key to search for.

class scaleway.iam.v1alpha1.GetApplicationRequest(application_id: 'str')

Bases: object

application_id: str

ID of the application to find.

class scaleway.iam.v1alpha1.GetGroupRequest(group_id: 'str')

Bases: object

group_id: str

ID of the group.

class scaleway.iam.v1alpha1.GetJWTRequest(jti: 'str')

Bases: object

jti: str

JWT ID of the JWT to get.

class scaleway.iam.v1alpha1.GetLogRequest(log_id: 'str')

Bases: object

log_id: str

ID of the log.

class scaleway.iam.v1alpha1.GetOrganizationSecuritySettingsRequest(organization_id: 'Optional[str]')

Bases: object

organization_id: Optional[str]

ID of the Organization.

class scaleway.iam.v1alpha1.GetPolicyRequest(policy_id: 'str')

Bases: object

policy_id: str

Id of policy to search.

class scaleway.iam.v1alpha1.GetQuotumRequest(quotum_name: 'str', organization_id: 'Optional[str]')

Bases: object

organization_id: Optional[str]

ID of the Organization.

quotum_name: str

Name of the quota to get.

class scaleway.iam.v1alpha1.GetSSHKeyRequest(ssh_key_id: 'str')

Bases: object

ssh_key_id: str

ID of the SSH key.

class scaleway.iam.v1alpha1.GetUserConnectionsRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to list connections for.

class scaleway.iam.v1alpha1.GetUserConnectionsResponse(connections: 'List[Connection]')

Bases: object

connections: List[Connection]

List of connections.

class scaleway.iam.v1alpha1.GetUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to find.

class scaleway.iam.v1alpha1.GracePeriod(type_: 'GracePeriodType', created_at: 'Optional[datetime]', expires_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time the grace period was created.

expires_at: Optional[datetime]

Date and time the grace period expires.

type_: GracePeriodType

Type of grace period.

class scaleway.iam.v1alpha1.GracePeriodType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

SET_MFA = 'set_mfa'
UNKNOWN_GRACE_PERIOD_TYPE = 'unknown_grace_period_type'
UPDATE_PASSWORD = 'update_password'
class scaleway.iam.v1alpha1.Group(id: 'str', organization_id: 'str', name: 'str', description: 'str', user_ids: 'List[str]', application_ids: 'List[str]', tags: 'List[str]', editable: 'bool', deletable: 'bool', managed: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

application_ids: List[str]

IDs of applications attached to this group.

created_at: Optional[datetime]

Date and time of group creation.

deletable: bool

Defines whether or not the group is deletable.

description: str

Description of the group.

editable: bool

Defines whether or not the group is editable.

id: str

ID of the group.

managed: bool

Defines whether or not the group is managed.

name: str

Name of the group.

organization_id: str

ID of Organization linked to the group.

tags: List[str]

Tags associated to the group.

updated_at: Optional[datetime]

Date and time of last group update.

user_ids: List[str]

IDs of users attached to this group.

class scaleway.iam.v1alpha1.IamV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources.

add_group_member(*, group_id: str, user_id: Optional[str] = None, application_id: Optional[str] = None) Group

Add a user or an application to a group. Add a user or an application to a group. You can specify a user_id and application_id in the body of your request. Note that you can only add one of each per request. :param group_id: ID of the group. :param user_id: ID of the user to add. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :param application_id: ID of the application to add. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :return: Group

Usage:

result = api.add_group_member(
    group_id="example",
)
add_group_members(*, group_id: str, user_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None) Group

Add multiple users and applications to a group. Add multiple users and applications to a group in a single call. You can specify an array of user_id`s and `application_id`s. Note that any existing users and applications in the group will remain. To add new users/applications and delete pre-existing ones, use the [Overwrite users and applications of a group](#path-groups-overwrite-users-and-applications-of-a-group) method. :param group_id: ID of the group. :param user_ids: IDs of the users to add. :param application_ids: IDs of the applications to add. :return: :class:`Group <Group>

Usage:

result = api.add_group_members(
    group_id="example",
)
clone_policy(*, policy_id: str) Policy

Clone a policy. Clone a policy. You must define specify the policy_id parameter in your request. :param policy_id: :return: Policy

Usage:

result = api.clone_policy(
    policy_id="example",
)
create_api_key(*, description: str, application_id: Optional[str] = None, user_id: Optional[str] = None, expires_at: Optional[datetime] = None, default_project_id: Optional[str] = None) APIKey

Create an API key. Create an API key. You must specify the application_id or the user_id and the description. You can also specify the default_project_id, which is the Project ID of your preferred Project, to use with Object Storage. The access_key and secret_key values are returned in the response. Note that the secret key is only shown once. Make sure that you copy and store both keys somewhere safe. :param description: Description of the API key (max length is 200 characters). :param application_id: ID of the application. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of the user. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param expires_at: Expiration date of the API key. :param default_project_id: Default Project ID to use with Object Storage. :return: APIKey

Usage:

result = api.create_api_key(
    description="example",
)
create_application(*, description: str, name: Optional[str] = None, organization_id: Optional[str] = None, tags: Optional[List[str]] = None) Application

Create a new application. Create a new application. You must define the name parameter in the request. :param description: Description of the application (max length is 200 characters). :param name: Name of the application to create (max length is 64 characters). :param organization_id: ID of the Organization. :param tags: Tags associated with the application (maximum of 10 tags). :return: Application

Usage:

result = api.create_application(
    description="example",
)
create_group(*, description: str, organization_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None) Group

Create a group. Create a new group. You must define the name and organization_id parameters in the request. :param description: Description of the group to create (max length is 200 chars). :param organization_id: ID of Organization linked to the group. :param name: Name of the group to create (max length is 64 chars). MUST be unique inside an Organization. :param tags: Tags associated with the group (maximum of 10 tags). :return: Group

Usage:

result = api.create_group(
    description="example",
)
create_jwt(*, user_id: str, referrer: str) EncodedJWT

Create a JWT. :param user_id: ID of the user the JWT will be created for. :param referrer: Referrer of the JWT. :return: EncodedJWT

Usage:

result = api.create_jwt(
    user_id="example",
    referrer="example",
)
create_policy(*, description: str, name: Optional[str] = None, organization_id: Optional[str] = None, rules: Optional[List[RuleSpecs]] = None, tags: Optional[List[str]] = None, user_id: Optional[str] = None, group_id: Optional[str] = None, application_id: Optional[str] = None, no_principal: Optional[bool] = None) Policy

Create a new policy. Create a new application. You must define the name parameter in the request. You can specify parameters such as user_id, groups_id, application_id, no_principal, rules and its child attributes. :param description: Description of the policy to create (max length is 200 characters). :param name: Name of the policy to create (max length is 64 characters). :param organization_id: ID of the Organization. :param rules: Rules of the policy to create. :param tags: Tags associated with the policy (maximum of 10 tags). :param user_id: ID of user attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param group_id: ID of group attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param application_id: ID of application attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param no_principal: Defines whether or not a policy is attributed to a principal. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :return: Policy

Usage:

result = api.create_policy(
    description="example",
)
create_ssh_key(*, public_key: str, name: Optional[str] = None, project_id: Optional[str] = None) SSHKey

Create an SSH key. Add a new SSH key to a Scaleway Project. You must specify the name, public_key and project_id. :param public_key: SSH public key. Currently only the ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000. :param name: Name of the SSH key. Max length is 1000. :param project_id: Project the resource is attributed to. :return: SSHKey

Usage:

result = api.create_ssh_key(
    public_key="example",
)
create_user(*, organization_id: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, member: Optional[CreateUserRequestMember] = None) User

Create a new user. Create a new user. You must define the organization_id in your request. If you are adding a member, enter the member’s details. If you are adding a guest, you must define the email and not add the member attribute. :param organization_id: ID of the Organization. :param email: Email of the user. One-Of (‘type’): at most one of ‘email’, ‘member’ could be set. :param tags: Tags associated with the user. :param member: Details of IAM member. One-Of (‘type’): at most one of ‘email’, ‘member’ could be set. :return: User

Usage:

result = api.create_user()
create_user_mfaotp(*, user_id: str) MFAOTP

Create a MFA OTP. :param user_id: User ID of the MFA OTP. :return: MFAOTP

Usage:

result = api.create_user_mfaotp(
    user_id="example",
)
delete_api_key(*, access_key: str) None

Delete an API key. Delete an API key. Note that this action is irreversible and cannot be undone. Make sure you update any configurations using the API keys you delete. :param access_key: Access key to delete.

Usage:

result = api.delete_api_key(
    access_key="example",
)
delete_application(*, application_id: str) None

Delete an application. Delete an application. Note that this action is irreversible and will automatically delete the application’s API keys. Policies attached to users and applications via this group will no longer apply. :param application_id: ID of the application to delete.

Usage:

result = api.delete_application(
    application_id="example",
)
delete_group(*, group_id: str) None

Delete a group. Delete a group. Note that this action is irreversible and could delete permissions for group members. Policies attached to users and applications via this group will no longer apply. :param group_id: ID of the group to delete.

Usage:

result = api.delete_group(
    group_id="example",
)
delete_jwt(*, jti: str) None

Delete a JWT. :param jti: JWT ID of the JWT to delete.

Usage:

result = api.delete_jwt(
    jti="example",
)
delete_policy(*, policy_id: str) None

Delete a policy. Delete a policy. You must define specify the policy_id parameter in your request. Note that when deleting a policy, all permissions it gives to its principal (user, group or application) will be revoked. :param policy_id: Id of policy to delete.

Usage:

result = api.delete_policy(
    policy_id="example",
)
delete_ssh_key(*, ssh_key_id: str) None

Delete an SSH key. Delete a given SSH key, specified by the ssh_key_id. Deleting an SSH is permanent, and cannot be undone. Note that you might need to update any configurations that used the SSH key. :param ssh_key_id:

Usage:

result = api.delete_ssh_key(
    ssh_key_id="example",
)
delete_user(*, user_id: str) None

Delete a guest user from an Organization. Remove a user from an Organization in which they are a guest. You must define the user_id in your request. Note that removing a user from an Organization automatically deletes their API keys, and any policies directly attached to them become orphaned. :param user_id: ID of the user to delete.

Usage:

result = api.delete_user(
    user_id="example",
)
delete_user_mfaotp(*, user_id: str) None

Delete a MFA OTP. :param user_id: User ID of the MFA OTP.

Usage:

result = api.delete_user_mfaotp(
    user_id="example",
)
get_api_key(*, access_key: str) APIKey

Get an API key. Retrive information about an API key, specified by the access_key parameter. The API key’s details, including either the user_id or application_id of its bearer are returned in the response. Note that the string value for the secret_key is nullable, and therefore is not displayed in the response. The secret_key value is only displayed upon API key creation. :param access_key: Access key to search for. :return: APIKey

Usage:

result = api.get_api_key(
    access_key="example",
)
get_application(*, application_id: str) Application

Get a given application. Retrieve information about an application, specified by the application_id parameter. The application’s full details, including id, email, organization_id, status and two_factor_enabled are returned in the response. :param application_id: ID of the application to find. :return: Application

Usage:

result = api.get_application(
    application_id="example",
)
get_group(*, group_id: str) Group

Get a group. Retrive information about a given group, specified by the group_id parameter. The group’s full details, including user_ids and application_ids are returned in the response. :param group_id: ID of the group. :return: Group

Usage:

result = api.get_group(
    group_id="example",
)
get_jwt(*, jti: str) JWT

Get a JWT. :param jti: JWT ID of the JWT to get. :return: JWT

Usage:

result = api.get_jwt(
    jti="example",
)
get_log(*, log_id: str) Log

Get a log. Retrieve information about a log, specified by the log_id parameter. The log’s full details, including id, ip, user_agent, action, bearer_id, resource_type and resource_id are returned in the response. :param log_id: ID of the log. :return: Log

Usage:

result = api.get_log(
    log_id="example",
)
get_organization_security_settings(*, organization_id: Optional[str] = None) OrganizationSecuritySettings

Get security settings of an Organization. Retrieve information about the security settings of an Organization, specified by the organization_id parameter. :param organization_id: ID of the Organization. :return: OrganizationSecuritySettings

Usage:

result = api.get_organization_security_settings()
get_policy(*, policy_id: str) Policy

Get an existing policy. Retrieve information about a policy, speficified by the policy_id parameter. The policy’s full details, including id, name, organization_id, nb_rules and nb_scopes, nb_permission_sets are returned in the response. :param policy_id: Id of policy to search. :return: Policy

Usage:

result = api.get_policy(
    policy_id="example",
)
get_quotum(*, quotum_name: str, organization_id: Optional[str] = None) Quotum

Get a quota in the Organization. Retrieve information about a resource quota, specified by the quotum_name parameter. The quota’s limit, or whether it is unlimited, is returned in the response. :param quotum_name: Name of the quota to get. :param organization_id: ID of the Organization. :return: Quotum

Usage:

result = api.get_quotum(
    quotum_name="example",
)
get_ssh_key(*, ssh_key_id: str) SSHKey

Get an SSH key. Retrieve information about a given SSH key, specified by the ssh_key_id parameter. The SSH key’s full details, including id, name, public_key, and project_id are returned in the response. :param ssh_key_id: ID of the SSH key. :return: SSHKey

Usage:

result = api.get_ssh_key(
    ssh_key_id="example",
)
get_user(*, user_id: str) User

Get a given user. Retrieve information about a user, specified by the user_id parameter. The user’s full details, including id, email, organization_id, status and mfa are returned in the response. :param user_id: ID of the user to find. :return: User

Usage:

result = api.get_user(
    user_id="example",
)
get_user_connections(*, user_id: str) GetUserConnectionsResponse
Parameters:

user_id – ID of the user to list connections for.

Returns:

GetUserConnectionsResponse

Usage:

result = api.get_user_connections(
    user_id="example",
)
list_api_keys(*, order_by: Optional[ListAPIKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, application_id: Optional[str] = None, user_id: Optional[str] = None, editable: Optional[bool] = None, expired: Optional[bool] = None, access_key: Optional[str] = None, description: Optional[str] = None, bearer_id: Optional[str] = None, bearer_type: Optional[BearerType] = None, access_keys: Optional[List[str]] = None) ListAPIKeysResponse

List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as editable, expired, access_key and bearer_id. :param order_by: Criteria for sorting results. :param page: Page number. Value must be greater or equal to 1. :param page_size: Number of results per page. Value must be between 1 and 100. :param organization_id: ID of Organization. :param application_id: ID of application that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of user that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param editable: Defines whether to filter out editable API keys or not. :param expired: Defines whether to filter out expired API keys or not. :param access_key: Filter by access key (deprecated in favor of access_keys). :param description: Filter by description. :param bearer_id: Filter by bearer ID. :param bearer_type: Filter by type of bearer. :param access_keys: Filter by a list of access keys. :return: ListAPIKeysResponse

Usage:

result = api.list_api_keys()
list_api_keys_all(*, order_by: Optional[ListAPIKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, application_id: Optional[str] = None, user_id: Optional[str] = None, editable: Optional[bool] = None, expired: Optional[bool] = None, access_key: Optional[str] = None, description: Optional[str] = None, bearer_id: Optional[str] = None, bearer_type: Optional[BearerType] = None, access_keys: Optional[List[str]] = None) List[APIKey]

List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as editable, expired, access_key and bearer_id. :param order_by: Criteria for sorting results. :param page: Page number. Value must be greater or equal to 1. :param page_size: Number of results per page. Value must be between 1 and 100. :param organization_id: ID of Organization. :param application_id: ID of application that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param user_id: ID of user that bears the API key. One-Of (‘bearer’): at most one of ‘application_id’, ‘user_id’ could be set. :param editable: Defines whether to filter out editable API keys or not. :param expired: Defines whether to filter out expired API keys or not. :param access_key: Filter by access key (deprecated in favor of access_keys). :param description: Filter by description. :param bearer_id: Filter by bearer ID. :param bearer_type: Filter by type of bearer. :param access_keys: Filter by a list of access keys. :return: List[APIKey]

Usage:

result = api.list_api_keys_all()
list_applications(*, order_by: Optional[ListApplicationsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, name: Optional[str] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, application_ids: Optional[List[str]] = None, tag: Optional[str] = None) ListApplicationsResponse

List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as application_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param name: Name of the application to filter. :param organization_id: ID of the Organization to filter. :param editable: Defines whether to filter out editable applications or not. :param application_ids: Filter by list of IDs. :param tag: Filter by tags containing a given string. :return: ListApplicationsResponse

Usage:

result = api.list_applications()
list_applications_all(*, order_by: Optional[ListApplicationsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, name: Optional[str] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, application_ids: Optional[List[str]] = None, tag: Optional[str] = None) List[Application]

List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as application_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param name: Name of the application to filter. :param organization_id: ID of the Organization to filter. :param editable: Defines whether to filter out editable applications or not. :param application_ids: Filter by list of IDs. :param tag: Filter by tags containing a given string. :return: List[Application]

Usage:

result = api.list_applications_all()
list_grace_periods(*, user_id: Optional[str] = None) ListGracePeriodsResponse

List grace periods of a member. List the grace periods of a member. :param user_id: ID of the user to list grace periods for. :return: ListGracePeriodsResponse

Usage:

result = api.list_grace_periods()
list_groups(*, order_by: Optional[ListGroupsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, application_ids: Optional[List[str]] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, tag: Optional[str] = None) ListGroupsResponse

List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters to filter your query. Use user_ids or application_ids to list all groups certain users or applications belong to. :param order_by: Sort order of groups. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param application_ids: Filter by a list of application IDs. :param user_ids: Filter by a list of user IDs. :param group_ids: Filter by a list of group IDs. :param tag: Filter by tags containing a given string. :return: ListGroupsResponse

Usage:

result = api.list_groups()
list_groups_all(*, order_by: Optional[ListGroupsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, application_ids: Optional[List[str]] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, tag: Optional[str] = None) List[Group]

List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters to filter your query. Use user_ids or application_ids to list all groups certain users or applications belong to. :param order_by: Sort order of groups. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param application_ids: Filter by a list of application IDs. :param user_ids: Filter by a list of user IDs. :param group_ids: Filter by a list of group IDs. :param tag: Filter by tags containing a given string. :return: List[Group]

Usage:

result = api.list_groups_all()
list_jw_ts(*, order_by: Optional[ListJWTsRequestOrderBy] = None, audience_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, expired: Optional[bool] = None) ListJWTsResponse

List JWTs. :param order_by: Criteria for sorting results. :param audience_id: ID of the user to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param expired: Filter out expired JWTs or not. :return: ListJWTsResponse

Usage:

result = api.list_jw_ts()
list_jw_ts_all(*, order_by: Optional[ListJWTsRequestOrderBy] = None, audience_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, expired: Optional[bool] = None) List[JWT]

List JWTs. :param order_by: Criteria for sorting results. :param audience_id: ID of the user to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param expired: Filter out expired JWTs or not. :return: List[JWT]

Usage:

result = api.list_jw_ts_all()
list_logs(*, order_by: Optional[ListLogsRequestOrderBy] = None, organization_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, action: Optional[LogAction] = None, resource_type: Optional[LogResourceType] = None, search: Optional[str] = None) ListLogsResponse

List logs. List logs available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param organization_id: Filter by Organization ID. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param created_after: Defined whether or not to filter out logs created after this timestamp. :param created_before: Defined whether or not to filter out logs created before this timestamp. :param action: Defined whether or not to filter out by a specific action. :param resource_type: Defined whether or not to filter out by a specific type of resource. :param search: Defined whether or not to filter out log by bearer ID or resource ID. :return: ListLogsResponse

Usage:

result = api.list_logs()
list_logs_all(*, order_by: Optional[ListLogsRequestOrderBy] = None, organization_id: Optional[str] = None, page_size: Optional[int] = None, page: Optional[int] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, action: Optional[LogAction] = None, resource_type: Optional[LogResourceType] = None, search: Optional[str] = None) List[Log]

List logs. List logs available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param organization_id: Filter by Organization ID. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater to 1. :param created_after: Defined whether or not to filter out logs created after this timestamp. :param created_before: Defined whether or not to filter out logs created before this timestamp. :param action: Defined whether or not to filter out by a specific action. :param resource_type: Defined whether or not to filter out by a specific type of resource. :param search: Defined whether or not to filter out log by bearer ID or resource ID. :return: List[Log]

Usage:

result = api.list_logs_all()
list_permission_sets(*, order_by: Optional[ListPermissionSetsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None) ListPermissionSetsResponse

List permission sets. List permission sets available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :return: ListPermissionSetsResponse

Usage:

result = api.list_permission_sets()
list_permission_sets_all(*, order_by: Optional[ListPermissionSetsRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None) List[PermissionSet]

List permission sets. List permission sets available for given Organization. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :return: List[PermissionSet]

Usage:

result = api.list_permission_sets_all()
list_policies(*, order_by: Optional[ListPoliciesRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None, no_principal: Optional[bool] = None, policy_name: Optional[str] = None, tag: Optional[str] = None, policy_ids: Optional[List[str]] = None) ListPoliciesResponse

List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters to filter your query, such as user_ids, groups_ids, application_ids, and policy_name. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: ID of the Organization to filter. :param editable: Defines whether or not filter out editable policies. :param user_ids: Defines whether or not to filter by list of user IDs. :param group_ids: Defines whether or not to filter by list of group IDs. :param application_ids: Filter by a list of application IDs. :param no_principal: Defines whether or not the policy is attributed to a principal. :param policy_name: Name of the policy to fetch. :param tag: Filter by tags containing a given string. :param policy_ids: Filter by a list of IDs. :return: ListPoliciesResponse

Usage:

result = api.list_policies()
list_policies_all(*, order_by: Optional[ListPoliciesRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, editable: Optional[bool] = None, user_ids: Optional[List[str]] = None, group_ids: Optional[List[str]] = None, application_ids: Optional[List[str]] = None, no_principal: Optional[bool] = None, policy_name: Optional[str] = None, tag: Optional[str] = None, policy_ids: Optional[List[str]] = None) List[Policy]

List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters to filter your query, such as user_ids, groups_ids, application_ids, and policy_name. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: ID of the Organization to filter. :param editable: Defines whether or not filter out editable policies. :param user_ids: Defines whether or not to filter by list of user IDs. :param group_ids: Defines whether or not to filter by list of group IDs. :param application_ids: Filter by a list of application IDs. :param no_principal: Defines whether or not the policy is attributed to a principal. :param policy_name: Name of the policy to fetch. :param tag: Filter by tags containing a given string. :param policy_ids: Filter by a list of IDs. :return: List[Policy]

Usage:

result = api.list_policies_all()
list_quota(*, order_by: Optional[ListQuotaRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, quotum_names: Optional[List[str]] = None) ListQuotaResponse

List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :param quotum_names: List of quotum names to filter from. :return: ListQuotaResponse

Usage:

result = api.list_quota()
list_quota_all(*, order_by: Optional[ListQuotaRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, quotum_names: Optional[List[str]] = None) List[Quotum]

List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :param organization_id: Filter by Organization ID. :param quotum_names: List of quotum names to filter from. :return: List[Quotum]

Usage:

result = api.list_quota_all()
list_rules(*, policy_id: str, page_size: Optional[int] = None, page: Optional[int] = None) ListRulesResponse

List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the policy_id in the query path of your request. :param policy_id: Id of policy to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :return: ListRulesResponse

Usage:

result = api.list_rules(
    policy_id="example",
)
list_rules_all(*, policy_id: str, page_size: Optional[int] = None, page: Optional[int] = None) List[Rule]

List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the policy_id in the query path of your request. :param policy_id: Id of policy to search. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater than 1. :return: List[Rule]

Usage:

result = api.list_rules_all(
    policy_id="example",
)
list_ssh_keys(*, order_by: Optional[ListSSHKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, project_id: Optional[str] = None, disabled: Optional[bool] = None) ListSSHKeysResponse

List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as organization_id, name, project_id and disabled. :param order_by: Sort order of the SSH keys. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param project_id: Filter by Project ID. :param disabled: Defines whether to include disabled SSH keys or not. :return: ListSSHKeysResponse

Usage:

result = api.list_ssh_keys()
list_ssh_keys_all(*, order_by: Optional[ListSSHKeysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, name: Optional[str] = None, project_id: Optional[str] = None, disabled: Optional[bool] = None) List[SSHKey]

List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can define additional parameters for your query such as organization_id, name, project_id and disabled. :param order_by: Sort order of the SSH keys. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Number of items per page. Value must be between 1 and 100. :param organization_id: Filter by Organization ID. :param name: Name of group to find. :param project_id: Filter by Project ID. :param disabled: Defines whether to include disabled SSH keys or not. :return: List[SSHKey]

Usage:

result = api.list_ssh_keys_all()
list_users(*, order_by: Optional[ListUsersRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, user_ids: Optional[List[str]] = None, mfa: Optional[bool] = None, tag: Optional[str] = None, type_: Optional[UserType] = None) ListUsersResponse

List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as user_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater or equal to 1. :param organization_id: ID of the Organization to filter. :param user_ids: Filter by list of IDs. :param mfa: Filter by MFA status. :param tag: Filter by tags containing a given string. :param type_: Filter by user type. :return: ListUsersResponse

Usage:

result = api.list_users()
list_users_all(*, order_by: Optional[ListUsersRequestOrderBy] = None, page_size: Optional[int] = None, page: Optional[int] = None, organization_id: Optional[str] = None, user_ids: Optional[List[str]] = None, mfa: Optional[bool] = None, tag: Optional[str] = None, type_: Optional[UserType] = None) List[User]

List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the order_by field. You must define the organization_id in the query path of your request. You can also define additional parameters for your query such as user_ids. :param order_by: Criteria for sorting results. :param page_size: Number of results per page. Value must be between 1 and 100. :param page: Page number. Value must be greater or equal to 1. :param organization_id: ID of the Organization to filter. :param user_ids: Filter by list of IDs. :param mfa: Filter by MFA status. :param tag: Filter by tags containing a given string. :param type_: Filter by user type. :return: List[User]

Usage:

result = api.list_users_all()
lock_user(*, user_id: str) User

Lock a member. Lock a member. A locked member cannot log in or use API keys until the locked status is removed. :param user_id: ID of the user to lock. :return: User

Usage:

result = api.lock_user(
    user_id="example",
)
remove_group_member(*, group_id: str, user_id: Optional[str] = None, application_id: Optional[str] = None) Group

Remove a user or an application from a group. Remove a user or an application from a group. You can specify a user_id and application_id in the body of your request. Note that you can only remove one of each per request. Removing a user from a group means that any permissions given to them via the group (i.e. from an attached policy) will no longer apply. Be sure you want to remove these permissions from the user before proceeding. :param group_id: ID of the group. :param user_id: ID of the user to remove. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :param application_id: ID of the application to remove. One-Of (‘member’): at most one of ‘user_id’, ‘application_id’ could be set. :return: Group

Usage:

result = api.remove_group_member(
    group_id="example",
)
set_group_members(*, group_id: str, user_ids: List[str], application_ids: List[str]) Group

Overwrite users and applications of a group. Overwrite users and applications configuration in a group. Any information that you add using this command will overwrite the previous configuration. :param group_id: :param user_ids: :param application_ids: :return: Group

Usage:

result = api.set_group_members(
    group_id="example",
    user_ids=[],
    application_ids=[],
)
set_rules(*, policy_id: str, rules: List[RuleSpecs]) SetRulesResponse

Set rules of a given policy. Overwrite the rules of a given policy. Any information that you add using this command will overwrite the previous configuration. If you include some of the rules you already had in your previous configuration in your new one, but you change their order, the new order of display will apply. While policy rules are ordered, they have no impact on the access logic of IAM because rules are allow-only. :param policy_id: Id of policy to update. :param rules: Rules of the policy to set. :return: SetRulesResponse

Usage:

result = api.set_rules(
    policy_id="example",
    rules=[],
)
unlock_user(*, user_id: str) User

Unlock a member. :param user_id: ID of the user to unlock. :return: User

Usage:

result = api.unlock_user(
    user_id="example",
)
update_api_key(*, access_key: str, default_project_id: Optional[str] = None, description: Optional[str] = None) APIKey

Update an API key. Update the parameters of an API key, including default_project_id and description. :param access_key: Access key to update. :param default_project_id: New default Project ID to set. :param description: New description to update. :return: APIKey

Usage:

result = api.update_api_key(
    access_key="example",
)
update_application(*, application_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None) Application

Update an application. Update the parameters of an application, including name and description. :param application_id: ID of the application to update. :param name: New name for the application (max length is 64 chars). :param description: New description for the application (max length is 200 chars). :param tags: New tags for the application (maximum of 10 tags). :return: Application

Usage:

result = api.update_application(
    application_id="example",
)
update_group(*, group_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None) Group

Update a group. Update the parameters of group, including name and description. :param group_id: ID of the group to update. :param name: New name for the group (max length is 64 chars). MUST be unique inside an Organization. :param description: New description for the group (max length is 200 chars). :param tags: New tags for the group (maximum of 10 tags). :return: Group

Usage:

result = api.update_group(
    group_id="example",
)
update_organization_security_settings(*, organization_id: Optional[str] = None, enforce_password_renewal: Optional[bool] = None, grace_period_duration: Optional[str] = None, login_attempts_before_locked: Optional[int] = None) OrganizationSecuritySettings

Update the security settings of an Organization. :param organization_id: ID of the Organization. :param enforce_password_renewal: Defines whether password renewal is enforced during first login. :param grace_period_duration: Duration of the grace period to renew password or enable MFA. :param login_attempts_before_locked: Number of login attempts before the account is locked. :return: OrganizationSecuritySettings

Usage:

result = api.update_organization_security_settings()
update_policy(*, policy_id: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, user_id: Optional[str] = None, group_id: Optional[str] = None, application_id: Optional[str] = None, no_principal: Optional[bool] = None) Policy

Update an existing policy. Update the parameters of a policy, including name, description, user_id, group_id, application_id and no_principal. :param policy_id: Id of policy to update. :param name: New name for the policy (max length is 64 characters). :param description: New description of policy (max length is 200 characters). :param tags: New tags for the policy (maximum of 10 tags). :param user_id: New ID of user attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param group_id: New ID of group attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param application_id: New ID of application attributed to the policy. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :param no_principal: Defines whether or not the policy is attributed to a principal. One-Of (‘principal’): at most one of ‘user_id’, ‘group_id’, ‘application_id’, ‘no_principal’ could be set. :return: Policy

Usage:

result = api.update_policy(
    policy_id="example",
)
update_ssh_key(*, ssh_key_id: str, name: Optional[str] = None, disabled: Optional[bool] = None) SSHKey

Update an SSH key. Update the parameters of an SSH key, including name and disable. :param ssh_key_id: :param name: Name of the SSH key. Max length is 1000. :param disabled: Enable or disable the SSH key. :return: SSHKey

Usage:

result = api.update_ssh_key(
    ssh_key_id="example",
)
update_user(*, user_id: str, tags: Optional[List[str]] = None, email: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, phone_number: Optional[str] = None, locale: Optional[str] = None) User

Update a user. Update the parameters of a user, including tags. :param user_id: ID of the user to update. :param tags: New tags for the user (maximum of 10 tags). :param email: IAM member email. :param first_name: IAM member first name. :param last_name: IAM member last name. :param phone_number: IAM member phone number. :param locale: IAM member locale. :return: User

Usage:

result = api.update_user(
    user_id="example",
)
update_user_password(*, user_id: str, password: str) User

Update an user’s password. :param user_id: ID of the user to update. :param password: The new password. :return: User

Usage:

result = api.update_user_password(
    user_id="example",
    password="example",
)
update_user_username(*, user_id: str, username: str) User

Update an user’s username. :param user_id: ID of the user to update. :param username: The new username. :return: User

Usage:

result = api.update_user_username(
    user_id="example",
    username="example",
)
validate_user_mfaotp(*, user_id: str, one_time_password: str) ValidateUserMFAOTPResponse

Validate a MFA OTP. :param user_id: User ID of the MFA OTP. :param one_time_password: A password generated using the OTP. :return: ValidateUserMFAOTPResponse

Usage:

result = api.validate_user_mfaotp(
    user_id="example",
    one_time_password="example",
)
class scaleway.iam.v1alpha1.JWT(jti: 'str', issuer_id: 'str', audience_id: 'str', ip: 'str', user_agent: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', expires_at: 'Optional[datetime]')

Bases: object

audience_id: str

ID of the user targeted by the JWT.

created_at: Optional[datetime]

Creation date of the JWT.

expires_at: Optional[datetime]

Expiration date of the JWT.

ip: str

IP address used during the creation of the JWT.

issuer_id: str

ID of the user who issued the JWT.

jti: str

JWT ID.

updated_at: Optional[datetime]

Last update date of the JWT.

user_agent: str

User-agent used during the creation of the JWT.

class scaleway.iam.v1alpha1.ListAPIKeysRequest(order_by: 'Optional[ListAPIKeysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', editable: 'Optional[bool]', expired: 'Optional[bool]', access_key: 'Optional[str]', description: 'Optional[str]', bearer_id: 'Optional[str]', bearer_type: 'Optional[BearerType]', access_keys: 'Optional[List[str]]', application_id: 'Optional[str]', user_id: 'Optional[str]')

Bases: object

access_key: Optional[str]

Filter by access key (deprecated in favor of access_keys).

access_keys: Optional[List[str]]

Filter by a list of access keys.

application_id: Optional[str]
bearer_id: Optional[str]

Filter by bearer ID.

bearer_type: Optional[BearerType]

Filter by type of bearer.

description: Optional[str]

Filter by description.

editable: Optional[bool]

Defines whether to filter out editable API keys or not.

expired: Optional[bool]

Defines whether to filter out expired API keys or not.

order_by: Optional[ListAPIKeysRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of Organization.

page: Optional[int]

Page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

user_id: Optional[str]
class scaleway.iam.v1alpha1.ListAPIKeysRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACCESS_KEY_ASC = 'access_key_asc'
ACCESS_KEY_DESC = 'access_key_desc'
CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
EXPIRES_AT_ASC = 'expires_at_asc'
EXPIRES_AT_DESC = 'expires_at_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.ListAPIKeysResponse(api_keys: 'List[APIKey]', total_count: 'int')

Bases: object

api_keys: List[APIKey]

List of API keys.

total_count: int

Total count of API Keys.

class scaleway.iam.v1alpha1.ListApplicationsRequest(order_by: 'Optional[ListApplicationsRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', organization_id: 'Optional[str]', editable: 'Optional[bool]', application_ids: 'Optional[List[str]]', tag: 'Optional[str]')

Bases: object

application_ids: Optional[List[str]]

Filter by list of IDs.

editable: Optional[bool]

Defines whether to filter out editable applications or not.

name: Optional[str]

Name of the application to filter.

order_by: Optional[ListApplicationsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

class scaleway.iam.v1alpha1.ListApplicationsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.ListApplicationsResponse(applications: 'List[Application]', total_count: 'int')

Bases: object

applications: List[Application]

List of applications.

total_count: int

Total count of applications.

class scaleway.iam.v1alpha1.ListGracePeriodsRequest(user_id: 'Optional[str]')

Bases: object

user_id: Optional[str]

ID of the user to list grace periods for.

class scaleway.iam.v1alpha1.ListGracePeriodsResponse(grace_periods: 'List[GracePeriod]')

Bases: object

grace_periods: List[GracePeriod]

List of grace periods.

class scaleway.iam.v1alpha1.ListGroupsRequest(order_by: 'Optional[ListGroupsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', name: 'Optional[str]', application_ids: 'Optional[List[str]]', user_ids: 'Optional[List[str]]', group_ids: 'Optional[List[str]]', tag: 'Optional[str]')

Bases: object

application_ids: Optional[List[str]]

Filter by a list of application IDs.

group_ids: Optional[List[str]]

Filter by a list of group IDs.

name: Optional[str]

Name of group to find.

order_by: Optional[ListGroupsRequestOrderBy]

Sort order of groups.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Requested page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of items per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

user_ids: Optional[List[str]]

Filter by a list of user IDs.

class scaleway.iam.v1alpha1.ListGroupsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.ListGroupsResponse(groups: 'List[Group]', total_count: 'int')

Bases: object

groups: List[Group]

List of groups.

total_count: int

Total count of groups.

class scaleway.iam.v1alpha1.ListJWTsRequest(order_by: 'Optional[ListJWTsRequestOrderBy]', audience_id: 'Optional[str]', page_size: 'Optional[int]', page: 'Optional[int]', expired: 'Optional[bool]')

Bases: object

audience_id: Optional[str]

ID of the user to search.

expired: Optional[bool]

Filter out expired JWTs or not.

order_by: Optional[ListJWTsRequestOrderBy]

Criteria for sorting results.

page: Optional[int]

Page number. Value must be greater to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

class scaleway.iam.v1alpha1.ListJWTsRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.ListJWTsResponse(jwts: 'List[JWT]', total_count: 'int')

Bases: object

jwts: List[JWT]
total_count: int
class scaleway.iam.v1alpha1.ListLogsRequest(order_by: 'Optional[ListLogsRequestOrderBy]', organization_id: 'Optional[str]', page_size: 'Optional[int]', page: 'Optional[int]', created_after: 'Optional[datetime]', created_before: 'Optional[datetime]', action: 'Optional[LogAction]', resource_type: 'Optional[LogResourceType]', search: 'Optional[str]')

Bases: object

action: Optional[LogAction]

Defined whether or not to filter out by a specific action.

created_after: Optional[datetime]

Defined whether or not to filter out logs created after this timestamp.

created_before: Optional[datetime]

Defined whether or not to filter out logs created before this timestamp.

order_by: Optional[ListLogsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

resource_type: Optional[LogResourceType]

Defined whether or not to filter out by a specific type of resource.

search: Optional[str]

Defined whether or not to filter out log by bearer ID or resource ID.

class scaleway.iam.v1alpha1.ListLogsRequestOrderBy(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'
class scaleway.iam.v1alpha1.ListLogsResponse(logs: 'List[Log]', total_count: 'int')

Bases: object

logs: List[Log]

List of logs.

total_count: int

Total count of logs.

class scaleway.iam.v1alpha1.ListPermissionSetsRequest(order_by: 'Optional[ListPermissionSetsRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]')

Bases: object

order_by: Optional[ListPermissionSetsRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

class scaleway.iam.v1alpha1.ListPermissionSetsRequestOrderBy(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.iam.v1alpha1.ListPermissionSetsResponse(permission_sets: 'List[PermissionSet]', total_count: 'int')

Bases: object

permission_sets: List[PermissionSet]

List of permission sets.

total_count: int

Total count of permission sets.

class scaleway.iam.v1alpha1.ListPoliciesRequest(order_by: 'Optional[ListPoliciesRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', editable: 'Optional[bool]', user_ids: 'Optional[List[str]]', group_ids: 'Optional[List[str]]', application_ids: 'Optional[List[str]]', no_principal: 'Optional[bool]', policy_name: 'Optional[str]', tag: 'Optional[str]', policy_ids: 'Optional[List[str]]')

Bases: object

application_ids: Optional[List[str]]

Filter by a list of application IDs.

editable: Optional[bool]

Defines whether or not filter out editable policies.

group_ids: Optional[List[str]]

Defines whether or not to filter by list of group IDs.

no_principal: Optional[bool]

Defines whether or not the policy is attributed to a principal.

order_by: Optional[ListPoliciesRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

policy_ids: Optional[List[str]]

Filter by a list of IDs.

policy_name: Optional[str]

Name of the policy to fetch.

tag: Optional[str]

Filter by tags containing a given string.

user_ids: Optional[List[str]]

Defines whether or not to filter by list of user IDs.

class scaleway.iam.v1alpha1.ListPoliciesRequestOrderBy(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'
POLICY_NAME_ASC = 'policy_name_asc'
POLICY_NAME_DESC = 'policy_name_desc'
class scaleway.iam.v1alpha1.ListPoliciesResponse(policies: 'List[Policy]', total_count: 'int')

Bases: object

policies: List[Policy]

List of policies.

total_count: int

Total count of policies.

class scaleway.iam.v1alpha1.ListQuotaRequest(order_by: 'Optional[ListQuotaRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', quotum_names: 'Optional[List[str]]')

Bases: object

order_by: Optional[ListQuotaRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

quotum_names: Optional[List[str]]

List of quotum names to filter from.

class scaleway.iam.v1alpha1.ListQuotaRequestOrderBy(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.iam.v1alpha1.ListQuotaResponse(quota: 'List[Quotum]', total_count: 'int')

Bases: object

quota: List[Quotum]

List of quota.

total_count: int

Total count of quota.

class scaleway.iam.v1alpha1.ListRulesRequest(policy_id: 'str', page_size: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: Optional[int]

Page number. Value must be greater than 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

policy_id: str

Id of policy to search.

class scaleway.iam.v1alpha1.ListRulesResponse(rules: 'List[Rule]', total_count: 'int')

Bases: object

rules: List[Rule]

Rules of the policy.

total_count: int

Total count of rules.

class scaleway.iam.v1alpha1.ListSSHKeysRequest(order_by: 'Optional[ListSSHKeysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', name: 'Optional[str]', project_id: 'Optional[str]', disabled: 'Optional[bool]')

Bases: object

disabled: Optional[bool]

Defines whether to include disabled SSH keys or not.

name: Optional[str]

Name of group to find.

order_by: Optional[ListSSHKeysRequestOrderBy]

Sort order of the SSH keys.

organization_id: Optional[str]

Filter by Organization ID.

page: Optional[int]

Requested page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of items per page. Value must be between 1 and 100.

project_id: Optional[str]

Filter by Project ID.

class scaleway.iam.v1alpha1.ListSSHKeysRequestOrderBy(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'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.iam.v1alpha1.ListSSHKeysResponse(ssh_keys: 'List[SSHKey]', total_count: 'int')

Bases: object

ssh_keys: List[SSHKey]

List of SSH keys.

total_count: int

Total count of SSH keys.

class scaleway.iam.v1alpha1.ListUsersRequest(order_by: 'Optional[ListUsersRequestOrderBy]', page_size: 'Optional[int]', page: 'Optional[int]', organization_id: 'Optional[str]', user_ids: 'Optional[List[str]]', mfa: 'Optional[bool]', tag: 'Optional[str]', type_: 'Optional[UserType]')

Bases: object

mfa: Optional[bool]

Filter by MFA status.

order_by: Optional[ListUsersRequestOrderBy]

Criteria for sorting results.

organization_id: Optional[str]

ID of the Organization to filter.

page: Optional[int]

Page number. Value must be greater or equal to 1.

page_size: Optional[int]

Number of results per page. Value must be between 1 and 100.

tag: Optional[str]

Filter by tags containing a given string.

type_: Optional[UserType]

Filter by user type.

user_ids: Optional[List[str]]

Filter by list of IDs.

class scaleway.iam.v1alpha1.ListUsersRequestOrderBy(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'
EMAIL_ASC = 'email_asc'
EMAIL_DESC = 'email_desc'
LAST_LOGIN_ASC = 'last_login_asc'
LAST_LOGIN_DESC = 'last_login_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
USERNAME_ASC = 'username_asc'
USERNAME_DESC = 'username_desc'
class scaleway.iam.v1alpha1.ListUsersResponse(users: 'List[User]', total_count: 'int')

Bases: object

total_count: int

Total count of users.

users: List[User]

List of users.

class scaleway.iam.v1alpha1.LocalityType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

GLOBAL = 'global'
REGION = 'region'
ZONE = 'zone'
class scaleway.iam.v1alpha1.LockUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to lock.

class scaleway.iam.v1alpha1.Log(id: 'str', ip: 'str', user_agent: 'str', action: 'LogAction', bearer_id: 'str', organization_id: 'str', resource_type: 'LogResourceType', resource_id: 'str', created_at: 'Optional[datetime]')

Bases: object

action: LogAction

Action linked to the log.

bearer_id: str

ID of the principal at the origin of the log.

created_at: Optional[datetime]

Creation date of the log.

id: str

Log ID.

ip: str

IP address of the HTTP request linked to the log.

organization_id: str

ID of Organization linked to the log.

resource_id: str

ID of the resource linked to the log.

resource_type: LogResourceType

Type of the resource linked to the log.

user_agent: str

User-Agent of the HTTP request linked to the log.

class scaleway.iam.v1alpha1.LogAction(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED = 'created'
DELETED = 'deleted'
UNKNOWN_ACTION = 'unknown_action'
UPDATED = 'updated'
class scaleway.iam.v1alpha1.LogResourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

API_KEY = 'api_key'
APPLICATION = 'application'
GROUP = 'group'
POLICY = 'policy'
UNKNOWN_RESOURCE_TYPE = 'unknown_resource_type'
USER = 'user'
class scaleway.iam.v1alpha1.MFAOTP(secret: 'str')

Bases: object

secret: str
class scaleway.iam.v1alpha1.OrganizationSecuritySettings(enforce_password_renewal: 'bool', login_attempts_before_locked: 'int', grace_period_duration: 'Optional[str]')

Bases: object

enforce_password_renewal: bool

Defines whether password renewal is enforced during first login.

grace_period_duration: Optional[str]

Duration of the grace period to renew password or enable MFA.

login_attempts_before_locked: int

Number of login attempts before the account is locked.

class scaleway.iam.v1alpha1.PermissionSet(id: 'str', name: 'str', scope_type: 'PermissionSetScopeType', description: 'str', categories: 'Optional[List[str]]')

Bases: object

categories: Optional[List[str]]

Categories of the permission set.

description: str

Description of the permission set.

id: str

Id of the permission set.

name: str

Name of the permission set.

scope_type: PermissionSetScopeType

Scope of the permission set.

class scaleway.iam.v1alpha1.PermissionSetScopeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACCOUNT_ROOT_USER = 'account_root_user'
ORGANIZATION = 'organization'
PROJECTS = 'projects'
UNKNOWN_SCOPE_TYPE = 'unknown_scope_type'
class scaleway.iam.v1alpha1.Policy(id: 'str', name: 'str', description: 'str', organization_id: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', editable: 'bool', deletable: 'bool', managed: 'bool', nb_rules: 'int', nb_scopes: 'int', nb_permission_sets: 'int', tags: 'List[str]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
created_at: Optional[datetime]

Date and time of policy creation.

deletable: bool

Defines whether or not a policy is deletable.

description: str

Description of the policy.

editable: bool

Defines whether or not a policy is editable.

group_id: Optional[str]
id: str

Id of the policy.

managed: bool

Defines whether or not a policy is managed.

name: str

Name of the policy.

nb_permission_sets: int

Number of permission sets of the policy.

nb_rules: int

Number of rules of the policy.

nb_scopes: int

Number of policy scopes.

no_principal: Optional[bool]
organization_id: str

Organization ID of the policy.

tags: List[str]

Tags associated with the policy.

updated_at: Optional[datetime]

Date and time of last policy update.

user_id: Optional[str]
class scaleway.iam.v1alpha1.Quotum(name: 'str', pretty_name: 'str', unit: 'str', description: 'str', locality_type: 'LocalityType', limits: 'List[QuotumLimit]', limit: 'Optional[int]', unlimited: 'Optional[bool]')

Bases: object

description: str

Details about the quota.

limit: Optional[int]
limits: List[QuotumLimit]

Limits per locality.

locality_type: LocalityType

Whether this quotum is applied on at the zone level, region level, or globally.

name: str

Name of the quota.

pretty_name: str

A human-readable name for the quota.

unit: str

The unit in which the quota is expressed.

unlimited: Optional[bool]
class scaleway.iam.v1alpha1.QuotumLimit(global_: 'Optional[bool]', region: 'Optional[ScwRegion]', zone: 'Optional[ScwZone]', limit: 'Optional[int]', unlimited: 'Optional[bool]')

Bases: object

global_: Optional[bool]
limit: Optional[int]
region: Optional[str]
unlimited: Optional[bool]
zone: Optional[str]
class scaleway.iam.v1alpha1.RemoveGroupMemberRequest(group_id: 'str', user_id: 'Optional[str]', application_id: 'Optional[str]')

Bases: object

application_id: Optional[str]
group_id: str

ID of the group.

user_id: Optional[str]
class scaleway.iam.v1alpha1.Rule(id: 'str', permission_sets_scope_type: 'PermissionSetScopeType', condition: 'str', permission_set_names: 'Optional[List[str]]', project_ids: 'Optional[List[str]]', organization_id: 'Optional[str]', account_root_user_id: 'Optional[str]')

Bases: object

account_root_user_id: Optional[str]
condition: str

Condition expression to evaluate.

id: str

Id of rule.

organization_id: Optional[str]
permission_set_names: Optional[List[str]]

Names of permission sets bound to the rule.

permission_sets_scope_type: PermissionSetScopeType

Permission_set_names have the same scope_type.

project_ids: Optional[List[str]]
class scaleway.iam.v1alpha1.RuleSpecs(condition: 'str', permission_set_names: 'Optional[List[str]]', project_ids: 'Optional[List[str]]', organization_id: 'Optional[str]')

Bases: object

condition: str

Condition expression to evaluate.

organization_id: Optional[str]
permission_set_names: Optional[List[str]]

Names of permission sets bound to the rule.

project_ids: Optional[List[str]]
class scaleway.iam.v1alpha1.SSHKey(id: 'str', name: 'str', public_key: 'str', fingerprint: 'str', organization_id: 'str', project_id: 'str', disabled: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of SSH key.

disabled: bool

SSH key status.

fingerprint: str

Fingerprint of the SSH key.

id: str

ID of SSH key.

name: str

Name of SSH key.

organization_id: str

ID of Organization linked to the SSH key.

project_id: str

ID of Project linked to the SSH key.

public_key: str

Public key of SSH key.

updated_at: Optional[datetime]

Last update date of SSH key.

class scaleway.iam.v1alpha1.SetGroupMembersRequest(group_id: 'str', user_ids: 'List[str]', application_ids: 'List[str]')

Bases: object

application_ids: List[str]
group_id: str
user_ids: List[str]
class scaleway.iam.v1alpha1.SetRulesRequest(policy_id: 'str', rules: 'List[RuleSpecs]')

Bases: object

policy_id: str

Id of policy to update.

rules: List[RuleSpecs]

Rules of the policy to set.

class scaleway.iam.v1alpha1.SetRulesResponse(rules: 'List[Rule]')

Bases: object

rules: List[Rule]

Rules of the policy.

class scaleway.iam.v1alpha1.UnlockUserRequest(user_id: 'str')

Bases: object

user_id: str

ID of the user to unlock.

class scaleway.iam.v1alpha1.UpdateAPIKeyRequest(access_key: 'str', default_project_id: 'Optional[str]', description: 'Optional[str]')

Bases: object

access_key: str

Access key to update.

default_project_id: Optional[str]

New default Project ID to set.

description: Optional[str]

New description to update.

class scaleway.iam.v1alpha1.UpdateApplicationRequest(application_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

application_id: str

ID of the application to update.

description: Optional[str]

New description for the application (max length is 200 chars).

name: Optional[str]

New name for the application (max length is 64 chars).

tags: Optional[List[str]]

New tags for the application (maximum of 10 tags).

class scaleway.iam.v1alpha1.UpdateGroupRequest(group_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

New description for the group (max length is 200 chars).

group_id: str

ID of the group to update.

name: Optional[str]

New name for the group (max length is 64 chars). MUST be unique inside an Organization.

tags: Optional[List[str]]

New tags for the group (maximum of 10 tags).

class scaleway.iam.v1alpha1.UpdateOrganizationSecuritySettingsRequest(organization_id: 'Optional[str]', enforce_password_renewal: 'Optional[bool]', grace_period_duration: 'Optional[str]', login_attempts_before_locked: 'Optional[int]')

Bases: object

enforce_password_renewal: Optional[bool]

Defines whether password renewal is enforced during first login.

grace_period_duration: Optional[str]

Duration of the grace period to renew password or enable MFA.

login_attempts_before_locked: Optional[int]

Number of login attempts before the account is locked.

organization_id: Optional[str]

ID of the Organization.

class scaleway.iam.v1alpha1.UpdatePolicyRequest(policy_id: 'str', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]', user_id: 'Optional[str]', group_id: 'Optional[str]', application_id: 'Optional[str]', no_principal: 'Optional[bool]')

Bases: object

application_id: Optional[str]
description: Optional[str]

New description of policy (max length is 200 characters).

group_id: Optional[str]
name: Optional[str]

New name for the policy (max length is 64 characters).

no_principal: Optional[bool]
policy_id: str

Id of policy to update.

tags: Optional[List[str]]

New tags for the policy (maximum of 10 tags).

user_id: Optional[str]
class scaleway.iam.v1alpha1.UpdateSSHKeyRequest(ssh_key_id: 'str', name: 'Optional[str]', disabled: 'Optional[bool]')

Bases: object

disabled: Optional[bool]

Enable or disable the SSH key.

name: Optional[str]

Name of the SSH key. Max length is 1000.

ssh_key_id: str
class scaleway.iam.v1alpha1.UpdateUserPasswordRequest(user_id: 'str', password: 'str')

Bases: object

password: str

The new password.

user_id: str

ID of the user to update.

class scaleway.iam.v1alpha1.UpdateUserRequest(user_id: 'str', tags: 'Optional[List[str]]', email: 'Optional[str]', first_name: 'Optional[str]', last_name: 'Optional[str]', phone_number: 'Optional[str]', locale: 'Optional[str]')

Bases: object

email: Optional[str]

IAM member email.

first_name: Optional[str]

IAM member first name.

last_name: Optional[str]

IAM member last name.

locale: Optional[str]

IAM member locale.

phone_number: Optional[str]

IAM member phone number.

tags: Optional[List[str]]

New tags for the user (maximum of 10 tags).

user_id: str

ID of the user to update.

class scaleway.iam.v1alpha1.UpdateUserUsernameRequest(user_id: 'str', username: 'str')

Bases: object

user_id: str

ID of the user to update.

username: str

The new username.

class scaleway.iam.v1alpha1.User(id: 'str', email: 'str', username: 'str', first_name: 'str', last_name: 'str', phone_number: 'str', locale: 'str', organization_id: 'str', deletable: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', last_login_at: 'Optional[datetime]', type_: 'UserType', status: 'UserStatus', mfa: 'bool', account_root_user_id: 'str', tags: 'List[str]', locked: 'bool', two_factor_enabled: 'Optional[bool]')

Bases: object

account_root_user_id: str

ID of the account root user associated with the user.

created_at: Optional[datetime]

Date user was created.

deletable: bool

Deletion status of user. Owners cannot be deleted.

email: str

Email of user.

first_name: str

First name of the user.

id: str

ID of user.

last_login_at: Optional[datetime]

Date of the last login.

last_name: str

Last name of the user.

locale: str

Locale of the user.

locked: bool

Defines whether the user is locked.

mfa: bool

Defines whether MFA is enabled.

organization_id: str

ID of the Organization.

phone_number: str

Phone number of the user.

status: UserStatus

Status of user invitation.

tags: List[str]

Tags associated with the user.

two_factor_enabled: Optional[bool]

Deprecated, use “mfa” instead.

type_: UserType

Type of user.

updated_at: Optional[datetime]

Date of last user update.

username: str

User identifier unique to the Organization.

class scaleway.iam.v1alpha1.UserStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ACTIVATED = 'activated'
INVITATION_PENDING = 'invitation_pending'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.iam.v1alpha1.UserType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

GUEST = 'guest'
MEMBER = 'member'
OWNER = 'owner'
UNKNOWN_TYPE = 'unknown_type'
class scaleway.iam.v1alpha1.ValidateUserMFAOTPRequest(user_id: 'str', one_time_password: 'str')

Bases: object

one_time_password: str

A password generated using the OTP.

user_id: str

User ID of the MFA OTP.

class scaleway.iam.v1alpha1.ValidateUserMFAOTPResponse(recovery_codes: 'List[str]')

Bases: object

recovery_codes: List[str]

List of recovery codes usable for this OTP method.