Querying Events
Function
This API is used to query information about a specified event.
Constraints
The information returned by this API is the metadata information value of the secret event notification.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
csms::getEvent
Read
-
-
csms:event:get
-
URI
GET /v1/{project_id}/csms/events/{event_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range The value returned by the IAM API is used, which contains 32 characters. Default Value N/A |
| event_name | Yes | String | Definition Event notification name. Constraints N/A Range The value must meet the regular expression ^[a-zA-Z0-9_-]{1,64}$. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. This parameter is optional if AK/SK authentication is used. Constraints N/A Range Obtain the value by calling the IAM API for obtaining the user token. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| event | Event object | Definition Secret event notification information. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Event notification name Range N/A |
| event_id | String | Definition Resource ID of the event notification Range N/A |
| event_types | Array of strings | Definition Set the basic event type list. Range Array. The value ranges from 1 to 12. |
| state | String | Definition Event notification status Range |
| create_time | Long | Definition Timestamp when an event notification was created, that is, the total number of seconds since January 1, 1970. Range N/A |
| update_time | Long | Definition Timestamp when an event notification was last updated, that is, the total number of seconds since January 1, 1970. Range N/A |
| notification | Notification object | Definition Notification. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| target_type | String | Definition Type of the object to which the event notification is sent Constraints SMN and EG messages are supported. Range N/A Default Value N/A |
| target_id | String | Definition ID of the object to which the event notification is sent Constraints N/A Range N/A Default Value N/A |
| target_name | String | Definition Name of the object to which the event notification is sent Constraints N/A Range N/A Default Value N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"event" : {
"name" : "event-test",
"event_id" : "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
"state" : "ENABLED",
"event_types" : [ "SECRET_VERSION_EXPIRED" ],
"create_time" : 1581507580000,
"update_time" : 1581507580000,
"notification" : {
"target_type" : "SMN",
"target_id" : "urn:smn:cn-north-4:SecretExpirationTest",
"target_name" : "SecretExpirationNotificationTest"
}
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot