Supprimer une politique incluse
Vous pouvez supprimer une politique incluse intégrée dans un utilisateur ou un groupe à tout moment pour retirer les permissions que celle-ci attribue à cet utilisateur ou ce groupe.
Supprimer une politique incluse avec OSC CLI
Supprimer une politique incluse intégrée à un utilisateur
|
À ce jour, cette section est disponible en anglais uniquement. |
The DeleteUserPolicy command deletes a specified inline policy from a specific user.
|
A delay of up to 15 seconds can occur when creating or deleting an inline policy. |
$ osc-cli api DeleteUserPolicy --profile "default" \
--PolicyName "example-user-policy" \
--UserName "example-user"
This command contains the following attributes that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
PolicyName: The name of the policy document you want to delete (between 1 and 128 characters). -
UserName: The name of the user you want to delete the policy from.
The DeleteUserPolicy command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Supprimer une politique incluse intégrée à un groupe
|
À ce jour, cette section est disponible en anglais uniquement. |
The DeleteUserGroupPolicy command deletes a specified inline policy from a specific group.
|
A delay of up to 15 seconds can occur when creating or deleting an inline policy. |
$ osc-cli api DeleteUserGroupPolicy --profile "default" \
--PolicyName "example-usergroup-policy" \
--UserGroupName "example-usergroup" \
--UserGroupPath "/example/"
This command contains the following attributes that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
PolicyName: The name of the policy document you want to delete. -
UserGroupName: The name of the group. -
UserGroupPath: (optional) The path to the group. If not specified, it is set to a slash (/).
The DeleteUserGroupPolicy command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Supprimer une politique incluse avec oapi-cli
Supprimer une politique incluse intégrée à un utilisateur
|
À ce jour, cette section est disponible en anglais uniquement. |
The DeleteUserPolicy command deletes a specified inline policy from a specific user.
|
A delay of up to 15 seconds can occur when creating or deleting an inline policy. |
$ oapi-cli --profile "default" DeleteUserPolicy \
--PolicyName "example-user-policy" \
--UserName "example-user"
This command contains the following attributes that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
PolicyName: The name of the policy document you want to delete (between 1 and 128 characters). -
UserName: The name of the user you want to delete the policy from.
The DeleteUserPolicy command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Supprimer une politique incluse intégrée à un groupe
|
À ce jour, cette section est disponible en anglais uniquement. |
The DeleteUserGroupPolicy command deletes a specified inline policy from a specific group.
|
A delay of up to 15 seconds can occur when creating or deleting an inline policy. |
$ oapi-cli --profile "default" DeleteUserGroupPolicy \
--PolicyName "example-usergroup-policy" \
--UserGroupName "example-usergroup" \
--UserGroupPath "/example/"
This command contains the following attributes that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
PolicyName: The name of the policy document you want to delete. -
UserGroupName: The name of the group. -
UserGroupPath: (optional) The path to the group. If not specified, it is set to a slash (/).
The DeleteUserGroupPolicy command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Supprimer une politique incluse avec AWS CLI
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Supprimer une politique incluse intégrée à un utilisateur
Pour supprimer une politique incluse intégrée à un utilisateur, utilisez la commande delete-user-policy en suivant cette syntaxe :
$ aws iam delete-user-policy \
--profile YOUR_PROFILE \
--user-name Jane \
--policy-name DevAccess \
--endpoint https://eim.eu-west-2.outscale.com
Cette commande contient les options suivantes que vous devez spécifier :
-
(optionnel)
profile: Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. -
user-name: Le nom de l’utilisateur. -
policy-name: Le nom de la politique. -
endpoint: Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.
La politique incluse spécifiée est supprimée et les autorisations correspondantes ne sont plus attribuées à l’utilisateur.
|
Un délai pouvant aller jusqu’à 15 secondes peut se produire lors de la création ou de la suppression d’une politique incluse. |
Supprimer une politique incluse intégrée à un groupe
Pour supprimer une politique incluse intégrée à un groupe, utilisez la commande delete-group-policy en suivant cette syntaxe :
$ aws iam delete-group-policy \
--profile YOUR_PROFILE \
--group-name Dev \
--policy-name DevAccess \
--endpoint https://eim.eu-west-2.outscale.com
Cette commande contient les options suivantes que vous devez spécifier :
-
(optionnel)
profile: Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. -
group-name: Le nom du groupe. -
policy-name: Le nom de la politique. -
endpoint: Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.
La politique incluse spécifiée est supprimée et les autorisations correspondantes ne sont plus attribuées aux utilisateurs appartenant à ce groupe.
|
Un délai pouvant aller jusqu’à 15 secondes peut se produire lors de la création ou de la suppression d’une politique incluse. |
Pages connexes
Méthodes API correspondantes
AWS™ et Amazon Web Services™ sont des marques de commerce d'Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.