Obtenir des informations sur les entités liées à une politique gérée
Vous pouvez obtenir des informations sur les entités liées à une politique gérée, tel que leur nom, ID et OUTSCALE Resource Name (ORN). Les entités sont les éléments liés à une politique gérée comme un compte, des utilisateurs EIM, ou des groupes d’utilisateurs.
Obtenir des informations sur les entités liées à une politique gérée avec OSC CLI
À ce jour, cette section est disponible en anglais uniquement. |
The ReadEntitiesLinkedToPolicy command lists all entities (account, users, or user groups) linked to a specific managed policy.
$ osc-cli api ReadEntitiesLinkedToPolicy --profile "default" \
--PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
--ResultsPerPage 2
$ osc-cli api ReadEntitiesLinkedToPolicy --profile "default" \
--EntitiesType '["USER"]' \
--PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy"
This command contains the following attributes that you need to specify:
-
EntitiesType
: (optional) The type of entity linked to the policy (ACCOUNT
|USER
|GROUP
) you want to get information about. -
FirstItem
: (optional) The item starting the list of entities requested. -
PolicyOrn
: (optional) The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers. -
ResultsPerPage
: (optional) The maximum number of items that can be returned in a single response (by default, 100).
The ReadEntitiesLinkedToPolicy command returns the following elements:
-
PolicyEntities
: Information about the policy entities.-
Accounts
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
Groups
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
HasMoreItems
: If true, there are more items to return using theFirstItem
parameter in a new request. -
ItemsCount
: The number of entities the specified policy is linked to. -
MaxResultsLimit
: Indicates maximum results defined for the operation. -
MaxResultsTruncated
: If true, indicates whether requested page size is more than allowed. -
Users
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PolicyEntities": {
"Users": [
{
"Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
"Name": "example-user",
"Orn": "orn:ows:idauth::012345678910:user/example/user-example"
}
],
"Groups": [
{
"Id": "ug-12345678",
"Name": "example-usergroup",
"Orn": "orn:ows:idauth::012345678910:usergroup/example/usergroup-example"
}
],
"HasMoreItems": true,
"ItemsCount": 3,
"MaxResultsLimit": 100,
"MaxResultsTruncated": false
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PolicyEntities": {
"Users": [
{
"Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
"Name": "example-user",
"Orn": "orn:ows:idauth::012345678910:user/example/user-example"
}
]
}
}
Obtenir des informations sur les entités liées à une politique gérée avec oapi-cli
À ce jour, cette section est disponible en anglais uniquement. |
The ReadEntitiesLinkedToPolicy command lists all entities (account, users, or user groups) linked to a specific managed policy.
$ oapi-cli --profile "default" ReadEntitiesLinkedToPolicy \
--PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
--ResultsPerPage 2
$ oapi-cli --profile "default" ReadEntitiesLinkedToPolicy \
--EntitiesType '["USER"]' \
--PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy"
This command contains the following attributes that you need to specify:
-
EntitiesType
: (optional) The type of entity linked to the policy (ACCOUNT
|USER
|GROUP
) you want to get information about. -
FirstItem
: (optional) The item starting the list of entities requested. -
PolicyOrn
: (optional) The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers. -
ResultsPerPage
: (optional) The maximum number of items that can be returned in a single response (by default, 100).
The ReadEntitiesLinkedToPolicy command returns the following elements:
-
PolicyEntities
: Information about the policy entities.-
Accounts
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
Groups
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
HasMoreItems
: If true, there are more items to return using theFirstItem
parameter in a new request. -
ItemsCount
: The number of entities the specified policy is linked to. -
MaxResultsLimit
: Indicates maximum results defined for the operation. -
MaxResultsTruncated
: If true, indicates whether requested page size is more than allowed. -
Users
: undefined-
Id
: The ID of the entity. -
Name
: The name of the entity. -
Orn
: The OUTSCALE Resource Name (ORN) of the entity. For more information, see Resource Identifiers.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PolicyEntities": {
"Users": [
{
"Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
"Name": "example-user",
"Orn": "orn:ows:idauth::012345678910:user/example/user-example"
}
],
"Groups": [
{
"Id": "ug-12345678",
"Name": "example-usergroup",
"Orn": "orn:ows:idauth::012345678910:usergroup/example/usergroup-example"
}
],
"HasMoreItems": true,
"ItemsCount": 3,
"MaxResultsLimit": 100,
"MaxResultsTruncated": false
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PolicyEntities": {
"Users": [
{
"Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
"Name": "example-user",
"Orn": "orn:ows:idauth::012345678910:user/example/user-example"
}
]
}
}
Pages connexes
Méthode API correspondante