{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"Error":{"properties":{"error":{"$ref":"#/definitions/ErrorDetail","description":"错误信息返回体。"}},"type":"object"},"ErrorDetail":{"properties":{"error_code":{"description":"错误请求返回的错误码","maxLength":36,"minLength":3,"type":"string"},"error_msg":{"description":"错误请求返回的错误信息","maxLength":1024,"minLength":0,"type":"string"}}},"Event":{"description":"事件通知对象。","properties":{"create_time":{"description":"事件通知创建时间,时间戳,即从1970年1月1日至该时间的总秒数。","example":1581507580000,"format":"int64","maximum":13,"minimum":0,"type":"integer"},"event_id":{"description":"事件通知的资源标识符。","example":"2d1152f2-290d-4756-a1d2-e12c14992416","pattern":"^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$","type":"string"},"event_types":{"description":"设置事件的基础事件类型列表,。\n\n约束:数组大小:最小1,最大12。","example":"eventDemo","items":{"description":"本次事件通知的基础事件列表,基础事件类型如下。\n\nSECRET_VERSION_CREATED:版本创建\nSECRET_VERSION_EXPIRED:版本过期\nSECRET_ROTATED:凭据轮转\nSECRET_DELETED:凭据删除\n\n列表包含的基础事件类型不能重复。","enum":["SECRET_VERSION_CREATED","SECRET_VERSION_EXPIRED","SECRET_ROTATED","SECRET_DELETED","SECRET_ROTATED_FAILED"],"type":"string"},"maxItems":12,"minItems":1,"type":"array"},"name":{"description":"事件通知名称。","example":"demo","pattern":"^[a-zA-Z0-9_-]{1,64}$","type":"string"},"notification":{"$ref":"#/definitions/Notification"},"state":{"description":"事件通知状态,取值如下。\n\nENABLED:表示启用状态\nDISABLED:表示禁用状态","enum":["ENABLED","DISABLED"],"example":"ENABLED","maxLength":1,"minLength":1,"type":"string"},"update_time":{"description":"事件通知上次更新时间,时间戳,即从1970年1月1日至该时间的总秒数。","example":1581507580000,"format":"int64","maximum":13,"minimum":0,"type":"integer"}},"type":"object"},"Notification":{"description":"通知主题对象。","properties":{"target_id":{"description":"事件通知的对象ID。","example":"urn:smn:cn-north-4:dc3b7c85759141accc0f2068:test-poc","pattern":"^[a-zA-Z0-9\\-._:]{1,256}$","type":"string"},"target_name":{"description":"事件通知的对象名称。","example":"test-poc","pattern":"^[a-zA-Z0-9_-]{1,64}$","type":"string"},"target_type":{"description":"事件通知的对象类型。","example":"SMN","pattern":"^SMN$","type":"string"}},"required":["target_type","target_id","target_name"],"type":"object"},"SecretEventResponseBody":{"properties":{"event":{"$ref":"#/definitions/Event"}}},"UpdateSecretEventRequestBody":{"description":"更新凭据事件通知请求体。","properties":{"event_types":{"description":"本次事件通知的基础事件列表,基础事件类型如下。\n\n- SECRET_VERSION_CREATED:版本创建\n- SECRET_VERSION_EXPIRED:版本过期\n- SECRET_ROTATED:凭据轮转成功\n- SECRET_DELETED:凭据删除\n- SECRET_ROTATED_FAILED:凭据轮转失败\n\n列表包含的基础事件类型不能重复。","example":"[\"SECRET_VERSION_CREATED\",\"SECRET_VERSION_EXPIRED\",\"SECRET_ROTATED\",\"SECRET_ROTATED_FAILED\"]","items":{"description":"基础事件类型。","enum":["SECRET_VERSION_CREATED","SECRET_VERSION_EXPIRED","SECRET_ROTATED","SECRET_DELETED","SECRET_ROTATED_FAILED"],"example":"SECRET_VERSION_CREATED","type":"string"},"maxItems":12,"minItems":0,"type":"array"},"notification":{"$ref":"#/definitions/Notification"},"state":{"description":"事件通知状态,取值如下。\n\nENABLED:表示启用状态\nDISABLED:表示禁用状态","enum":["ENABLED","DISABLED"],"maxLength":1,"minLength":1,"type":"string"}},"type":"object"}},"description":null,"group_id":"2696b19762094c0393f47c92da7528c5","host":"kms.cn-north-4.myhuaweicloud.com","id":"1f0d8f0be6134529ba4e0e1112d0a6a1","info_version":"v1","method":"put","name":"UpdateSecretEvent","parameters":{},"paths":{"/v1/{project_id}/csms/events/{event_name}":{"put":{"description":"更新指定事件的元数据信息。支持更新的元数据包含事件启用状态、基础类型列表、通知主题。","operationId":"UpdateSecretEvent","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":2097152,"minLength":32,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."},{"description":"项目ID。","in":"path","maxLength":64,"minLength":32,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"事件通知名称。","in":"path","name":"event_name","pattern":"^[a-zA-Z0-9_-]{1,64}$","required":true,"type":"string","x-example":"event-name-test"},{"description":"更新事件通知的请求消息体。","in":"body","name":"UpdateSecretEventRequestBody","required":true,"schema":{"$ref":"#/definitions/UpdateSecretEventRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"请求已成功","examples":{"application/json":{"event":{"create_time":1581507580000,"event_id":"bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e","event_types":["SECRET_VERSION_EXPIRED"],"name":"event-test","notification":{"target_id":"urn:smn:cn-north-4:SecertExpirationTest","target_name":"SecertExpirationNotificationTest","target_type":"SMN"},"state":"ENABLED","update_time":1581507580000}}},"schema":{"$ref":"#/definitions/SecretEventResponseBody"}},"400":{"description":"请求参数有误","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"被请求的页面需要用户名和密码","schema":{"$ref":"#/definitions/Error"}},"403":{"description":"认证失败","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"资源不存在,资源未找到","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"服务内部错误","schema":{"$ref":"#/definitions/Error"}},"502":{"description":"请求未完成。服务器从上游服务器收到一个无效的响应","schema":{"$ref":"#/definitions/Error"}},"504":{"description":"网关超时","schema":{"$ref":"#/definitions/Error"}}},"summary":"更新事件","tags":["事件管理"],"x-constraint":"此接口仅能修改凭据事件通知的元数据信息。","x-is-registered":"Y","x-request-examples-1":{"notification":{"target_id":"demo-smn-id","target_name":"demo-smn-name","target_type":"SMN"}},"x-request-examples-description-1":"更新指定事件。","x-request-examples-text-1":{"notification":{"target_id":"demo-smn-id","target_name":"demo-smn-name","target_type":"SMN"}},"x-support-sdk":"Y"}}},"product_short":"CSMS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"更新事件","tags":"事件管理","uri":null,"version":"2.0"}