IAM API.
- API keys management commands
- Applications management commands
- Groups management commands
- JWTs management commands
- Permission sets management commands
- Policies management commands
- Rules management commands
- SSH keys management commands
- Users management commands
API keys management commands.
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 he secret key is only showed once. Make sure that you copy and store both keys somewhere safe.
Usage:
scw iam api-key create [arg=value ...]
Args:
Name | Description | |
---|---|---|
application-id | ID of the application | |
user-id | ID of the user | |
expires-at | Expiration date of the API key | |
default-project-id | The default Project ID to use with Object Storage | |
description | The description of the API key (max length is 200 characters) |
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.
Usage:
scw iam api-key delete <access-key ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
access-key | Required | Access key to delete |
Examples:
Delete a given API key
scw iam api-key delete SCW00000000000
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.
Usage:
scw iam api-key get <access-key ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
access-key | Required | Access key to search for |
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
.
Usage:
scw iam api-key list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc , expires_at_asc , expires_at_desc , access_key_asc , access_key_desc |
Criteria for sorting results |
Deprecated | ID of application that bears the API key | |
Deprecated | ID of user that bears the API key | |
editable | Whether to filter out editable API keys or not | |
expired | Whether to filter out expired API keys or not | |
access-key | Filter by access key | |
description | Filter by description | |
bearer-id | Filter by bearer ID | |
bearer-type | One of: unknown_bearer_type , user , application |
Filter by type of bearer |
organization-id | Required Default: <retrieved from config> |
ID of Organization |
Update the parameters of an API key, including default_project_id
and description
.
Usage:
scw iam api-key update <access-key ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
access-key | Required | Access key to update |
default-project-id | The new default Project ID to set | |
description | The new description to update |
Applications management commands.
Create a new application. You must define the name
parameter in the request.
Usage:
scw iam application create [arg=value ...]
Args:
Name | Description | |
---|---|---|
name | Required Default: <generated> |
Name of the application to create (max length is 64 characters) |
description | Description of the application (max length is 200 characters) | |
organization-id | Organization ID to use. If none is passed the default organization ID will be used |
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.
Usage:
scw iam application delete <application-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
application-id | Required | ID of the application to delete |
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.
Usage:
scw iam application get <application-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
application-id | Required | ID of the application to find |
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
.
Usage:
scw iam application list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc , name_asc , name_desc |
Criteria for sorting results |
name | Name of the application to filter | |
editable | Whether to filter out editable applications or not | |
application-ids.{index} | Filter by list of IDs | |
organization-id | Required Default: <retrieved from config> |
ID of the Organization to filter |
Update the parameters of an application, including name
and description
.
Usage:
scw iam application update <application-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
application-id | Required | ID of the application to update |
name | New name for the application (max length is 64 chars) | |
description | New description for the application (max length is 200 chars) |
Groups management commands.
Add a user or an application to a group. You can specify a user_id
and and application_id
in the body of your request. Note that you can only add one of each per request.
Usage:
scw iam group add-member <group-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
group-id | Required | ID of the group |
user-id | ID of the user to add | |
application-id | ID of the application to add |
Create a new group. You must define the name
and organization_id
parameters in the request.
Usage:
scw iam group create [arg=value ...]
Args:
Name | Description | |
---|---|---|
name | Required Default: <generated> |
Name of the group to create (max length is 64 chars). MUST be unique inside an Organization |
description | Description of the group to create (max length is 200 chars) | |
organization-id | Organization ID to use. If none is passed the default organization ID will be used |
Examples:
Create a group
scw iam group create name=foobar
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.
Usage:
scw iam group delete <group-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
group-id | Required | ID of the group to delete |
Examples:
Delete a given group
scw iam group delete 11111111-1111-1111-1111-111111111111
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.
Usage:
scw iam group get <group-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
group-id | Required | ID of the group |
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.
Usage:
scw iam group list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc , name_asc , name_desc |
Sort order of groups |
name | Name of group to find | |
application-ids.{index} | Filter by a list of application IDs | |
user-ids.{index} | Filter by a list of user IDs | |
group-ids.{index} | Filter by a list of group IDs | |
organization-id | Default: <retrieved from config> |
Filter by Organization ID |
Remove a user or an application from a group. You can specify a user_id
and 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.
Usage:
scw iam group remove-member <group-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
group-id | Required | ID of the group |
user-id | ID of the user to remove | |
application-id | ID of the application to remove |
Update the parameters of group, including name
and description
.
Usage:
scw iam group update <group-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
group-id | Required | ID of the group to update |
name | New name for the group (max length is 64 chars). MUST be unique inside an Organization | |
description | New description for the group (max length is 200 chars) |
JWTs management commands.
Delete a JWT.
Usage:
scw iam jwt delete <jti ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
jti | Required | JWT ID of the JWT to delete |
Get a JWT.
Usage:
scw iam jwt get <jti ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
jti | Required | JWT ID of the JWT to get |
List JWTs.
Usage:
scw iam jwt list <audience-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc |
Criteria for sorting results |
audience-id | Required | ID of the user to search |
expired | Filter out expired JWTs or not |
Permission sets management commands.
List permission sets available for given Organization. You must define the organization_id
in the query path of your request.
Usage:
scw iam permission-set list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: name_asc , name_desc , created_at_asc , created_at_desc |
Criteria for sorting results |
organization-id | Organization ID to use. If none is passed the default organization ID will be used |
Policies management commands.
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.
Usage:
scw iam policy create [arg=value ...]
Args:
Name | Description | |
---|---|---|
name | Required Default: <generated> |
Name of the policy to create (max length is 64 characters) |
description | Description of the policy to create (max length is 200 characters) | |
rules.{index}.permission-set-names.{index} | Names of permission sets bound to the rule | |
rules.{index}.project-ids.{index} | List of Project IDs the rule is scoped to | |
rules.{index}.organization-id | ID of Organization the rule is scoped to | |
user-id | ID of user attributed to the policy | |
group-id | ID of group attributed to the policy | |
application-id | ID of application attributed to the policy | |
no-principal | Whether or not a policy is attributed to a principal | |
organization-id | Organization ID to use. If none is passed the default organization ID will be used |
Examples:
Add a policy for a group that gives InstanceFullAccess on all projects
scw iam policy create group-id=11111111-1111-1111-1111-111111111111 rules.0.organization-id=11111111-1111-1111-1111-111111111111 rules.0.permission-set-names.0=InstanceFullAccess
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.
Usage:
scw iam policy delete <policy-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
policy-id | Required | Id of policy to delete |
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.
Usage:
scw iam policy get <policy-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
policy-id | Required | Id of policy to search |
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
.
Usage:
scw iam policy list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: policy_name_asc , policy_name_desc , created_at_asc , created_at_desc |
Criteria for sorting results |
editable | Whether or not filter out editable policies | |
user-ids.{index} | Whether or not to filter by list of user IDs | |
group-ids.{index} | Whether or not to filter by list of group IDs | |
application-ids.{index} | Filter by a list of application IDs | |
no-principal | Whether or not the policy is attributed to a principal | |
policy-name | Name of the policy to fetch | |
organization-id | Required Default: <retrieved from config> |
ID of the Organization to filter |
Update the parameters of a policy, including name
, description
, user_id
, group_id
, application_id
and no_principal
.
Usage:
scw iam policy update <policy-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
policy-id | Required | Id of policy to update |
name | New name for the policy (max length is 64 characters) | |
description | New description of policy (max length is 200 characters) | |
user-id | New ID of user attributed to the policy | |
group-id | New ID of group attributed to the policy | |
application-id | New ID of application attributed to the policy | |
no-principal | Whether or not the policy is attributed to a principal |
Rules management commands.
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.
Usage:
scw iam rule list <policy-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
policy-id | Required | Id of policy to search |
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.
Usage:
scw iam rule update <policy-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
policy-id | Required | Id of policy to update |
rules.{index}.permission-set-names.{index} | Names of permission sets bound to the rule | |
rules.{index}.project-ids.{index} | List of Project IDs the rule is scoped to | |
rules.{index}.organization-id | ID of Organization the rule is scoped to |
SSH keys management commands.
Add a new SSH key to a Scaleway Project. You must specify the name
, public_key
and project_id
.
Usage:
scw iam ssh-key create [arg=value ...]
Args:
Name | Description | |
---|---|---|
name | Required Default: <generated> |
The name of the SSH key. Max length is 1000 |
public-key | Required | 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 |
project-id | Project ID to use. If none is passed the default project ID will be used |
Examples:
Add a given ssh key
scw iam ssh-key create name=foobar public-key="$(cat <path/to/your/public/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.
Usage:
scw iam ssh-key delete <ssh-key-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
ssh-key-id | Required |
Examples:
Delete a given SSH key
scw iam ssh-key delete 11111111-1111-1111-1111-111111111111
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.
Usage:
scw iam ssh-key get <ssh-key-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
ssh-key-id | Required | The ID of the SSH key |
Initialize SSH key.
Usage:
scw iam ssh-key init
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
.
Usage:
scw iam ssh-key list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc , name_asc , name_desc |
Sort order of the SSH keys |
name | Name of group to find | |
project-id | Filter by Project ID | |
disabled | Whether to include disabled SSH keys or not | |
organization-id | Default: <retrieved from config> |
Filter by Organization ID |
Update the parameters of an SSH key, including name
and disable
.
Usage:
scw iam ssh-key update <ssh-key-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
ssh-key-id | Required | |
name | Name of the SSH key. Max length is 1000 | |
disabled | Enable or disable the SSH key |
Users management commands.
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.
Usage:
scw iam user delete <user-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
user-id | Required | ID of the user to delete |
Retrieve information about a user, specified by the user_id
parameter. The user's full details, including id
, email
, organization_id
, status
and two_factor_enabled
are returned in the response.
Usage:
scw iam user get <user-id ...> [arg=value ...]
Args:
Name | Description | |
---|---|---|
user-id | Required | ID of the user to find |
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
.
Usage:
scw iam user list [arg=value ...]
Args:
Name | Description | |
---|---|---|
order-by | Default: created_at_asc One of: created_at_asc , created_at_desc , updated_at_asc , updated_at_desc , email_asc , email_desc , last_login_asc , last_login_desc |
Criteria for sorting results |
user-ids.{index} | Filter by list of IDs | |
organization-id | Required Default: <retrieved from config> |
ID of the Organization to filter |