Obtenir des informations sur vos règles d’accès API
Vous pouvez obtenir des informations sur vos règles d’accès API, comme leur ID, leur plage d’IP, leur CA ainsi que leur description.
Obtenir des informations sur vos règles d’accès API avec Cockpit v2
-
Dans le coin supérieur droit, cliquez sur l’icône .
Un menu déroulant apparaît. -
Cliquez sur Règles d’accès API.
La liste de vos règles d’accès API apparaît.
Obtenir des informations sur vos règles d’accès API avec OSC CLI
À ce jour, cette section est disponible en anglais uniquement. |
The ReadApiAccessRules command lists one or more API access rules.
$ osc-cli api ReadApiAccessRules --profile "default" \
--Filters '{
"ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
}'
$ osc-cli api ReadApiAccessRules --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
--Filters '{
"ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
}'
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. -
Filters
: (optional) One or more filters.-
ApiAccessRuleIds
: (optional) One or more IDs of API access rules. -
CaIds
: (optional) One or more IDs of Client Certificate Authorities (CAs). -
Cns
: (optional) One or more Client Certificate Common Names (CNs). -
Descriptions
: (optional) One or more descriptions of API access rules. -
IpRanges
: (optional) One or more IPs or CIDR blocks (for example,192.0.2.0/16
).
-
The ReadApiAccessRules command returns the following elements:
-
ApiAccessRules
: A list of API access rules.-
ApiAccessRuleId
: The ID of the API access rule. -
CaIds
: One or more IDs of Client Certificate Authorities (CAs) used for the API access rule. -
Cns
: One or more Client Certificate Common Names (CNs). -
Description
: The description of the API access rule. -
IpRanges
: One or more IP ranges used for the API access rule, in CIDR notation (for example,192.0.2.0/16
).
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessRules": [
{
"IpRanges": [
"0.0.0.0/0"
],
"ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
"CaIds": [],
"Cns": [],
"Description": "Allows all IPv4 domain"
},
{
"IpRanges": [
"46.231.144.178/32"
],
"ApiAccessRuleId": "aar-abcdef1234567890abcdef1234567890",
"CaIds": [],
"Cns": [],
"Description": "Allows Outscale Cockpit of this region"
}
]
}
Obtenir des informations sur vos règles d’accès API avec oapi-cli
À ce jour, cette section est disponible en anglais uniquement. |
The ReadApiAccessRules command lists one or more API access rules.
$ oapi-cli --profile "default" ReadApiAccessRules \
--Filters '{
"ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
}'
$ oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" ReadApiAccessRules \
--Filters '{
"ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
}'
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. -
Filters
: (optional) One or more filters.-
ApiAccessRuleIds
: (optional) One or more IDs of API access rules. -
CaIds
: (optional) One or more IDs of Client Certificate Authorities (CAs). -
Cns
: (optional) One or more Client Certificate Common Names (CNs). -
Descriptions
: (optional) One or more descriptions of API access rules. -
IpRanges
: (optional) One or more IPs or CIDR blocks (for example,192.0.2.0/16
).
-
The ReadApiAccessRules command returns the following elements:
-
ApiAccessRules
: A list of API access rules.-
ApiAccessRuleId
: The ID of the API access rule. -
CaIds
: One or more IDs of Client Certificate Authorities (CAs) used for the API access rule. -
Cns
: One or more Client Certificate Common Names (CNs). -
Description
: The description of the API access rule. -
IpRanges
: One or more IP ranges used for the API access rule, in CIDR notation (for example,192.0.2.0/16
).
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessRules": [
{
"IpRanges": [
"0.0.0.0/0"
],
"ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
"CaIds": [],
"Cns": [],
"Description": "Allows all IPv4 domain"
},
{
"IpRanges": [
"46.231.144.178/32"
],
"ApiAccessRuleId": "aar-abcdef1234567890abcdef1234567890",
"CaIds": [],
"Cns": [],
"Description": "Allows Outscale Cockpit of this region"
}
]
}
Pages connexes
Méthode API correspondante