고유 식별자를 사용하여 거버넌스 탐지를 업데이트합니다. 요청에 포함된 속성만
수정되어, 탐지를 예외로 승인하거나, 다시 열거나, 재할당되거나, 완화를 위해
연기할 수 있습니다.
This endpoint requires the governance_console_read permission.
The data of a governance control detection update request.
attributes
object
The attributes of a governance control detection that can be updated. Only the attributes present in the request are modified.
assigned_team
string
The handle of the team the detection is assigned to. Set to an empty string to clear the assignment.
assigned_to
string
The UUID of the user the detection is assigned to. Set to an empty string to clear the assignment.
mitigate_after
date-time
The timestamp after which the detection becomes eligible for mitigation. Used to defer mitigation to a later time.
state
enum
The new state to set for the detection. Set to exception to acknowledge the detection and exclude it from active counts, or active to reopen it.
Allowed enum values: exception,active
type [required]
enum
Governance control detection resource type.
Allowed enum values: governance_control_detection
The identifier of the team the detection is assigned to, if any.
assigned_to
string
The identifier of the user the detection is assigned to, if any.
assignment_source [required]
enum
How the detection's current assignment was determined. Possible values are auto_resolved, manual, reassigned, and cleared.
Allowed enum values: auto_resolved,manual,reassigned,cleared
control_id [required]
string
DEPRECATED: DEPRECATED: mirrors detection_type for backward compatibility; use detection_type
instead.
created_at [required]
date-time
The date and time when the detection was created.
detection_type [required]
string
The type of detection, which determines what condition was detected.
display_name [required]
string
The human-readable name of the detected resource.
exception_at
date-time
The date and time when the detection was marked as an exception, if applicable.
exception_by
string
The identifier of the user who marked the detection as an exception, if applicable.
metadata
Free-form metadata associated with the detection.
mitigate_after
date-time
The date and time after which the detection is scheduled to be mitigated, if applicable.
mitigated_at
date-time
The date and time when the detection was mitigated, if applicable.
priority [required]
int64
The priority of the detection, if set.
resource_id [required]
string
The identifier of the resource the detection applies to.
resource_type [required]
string
The type of resource the detection applies to, for example api_key or dashboard.
state [required]
enum
The current state of the detection. Possible values are active, exception, mitigated, inactive, obsolete, resolved_externally, and mitigation_in_progress.
Allowed enum values: active,exception,mitigated,inactive,obsolete,resolved_externally,mitigation_in_progress
id [required]
string
The unique identifier of the detection.
type [required]
enum
Governance control detection resource type.
Allowed enum values: governance_control_detection
## default
#
# Path parameters exportdetection_id="3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Update a detection returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]config.unstable_operations["v2.update_governance_detection".to_sym]=trueendapi_instance=DatadogAPIClient::V2::GovernanceConsoleAPI.newbody=DatadogAPIClient::V2::GovernanceControlDetectionUpdateRequest.new({data:DatadogAPIClient::V2::GovernanceControlDetectionUpdateData.new({attributes:DatadogAPIClient::V2::GovernanceControlDetectionUpdateAttributes.new({assigned_team:"platform-security",assigned_to:"11111111-2222-3333-4444-555555555555",mitigate_after:"2024-03-15T00:00:00Z",state:DatadogAPIClient::V2::GovernanceControlDetectionUpdateState::EXCEPTION,}),type:DatadogAPIClient::V2::GovernanceControlDetectionResourceType::GOVERNANCE_CONTROL_DETECTION,}),})papi_instance.update_governance_detection("detection_id",body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Update a detection returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""time""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.GovernanceControlDetectionUpdateRequest{Data:datadogV2.GovernanceControlDetectionUpdateData{Attributes:&datadogV2.GovernanceControlDetectionUpdateAttributes{AssignedTeam:datadog.PtrString("platform-security"),AssignedTo:datadog.PtrString("11111111-2222-3333-4444-555555555555"),MitigateAfter:datadog.PtrTime(time.Date(2024,3,15,0,0,0,0,time.UTC)),State:datadogV2.GOVERNANCECONTROLDETECTIONUPDATESTATE_EXCEPTION.Ptr(),},Type:datadogV2.GOVERNANCECONTROLDETECTIONRESOURCETYPE_GOVERNANCE_CONTROL_DETECTION,},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.UpdateGovernanceDetection",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewGovernanceConsoleApi(apiClient)resp,r,err:=api.UpdateGovernanceDetection(ctx,"detection_id",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `GovernanceConsoleApi.UpdateGovernanceDetection`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `GovernanceConsoleApi.UpdateGovernanceDetection`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Update a detection returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.GovernanceConsoleApi;importcom.datadog.api.client.v2.model.GovernanceControlDetectionResourceType;importcom.datadog.api.client.v2.model.GovernanceControlDetectionResponse;importcom.datadog.api.client.v2.model.GovernanceControlDetectionUpdateAttributes;importcom.datadog.api.client.v2.model.GovernanceControlDetectionUpdateData;importcom.datadog.api.client.v2.model.GovernanceControlDetectionUpdateRequest;importcom.datadog.api.client.v2.model.GovernanceControlDetectionUpdateState;importjava.time.OffsetDateTime;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));defaultClient.setUnstableOperationEnabled("v2.updateGovernanceDetection",true);GovernanceConsoleApiapiInstance=newGovernanceConsoleApi(defaultClient);GovernanceControlDetectionUpdateRequestbody=newGovernanceControlDetectionUpdateRequest().data(newGovernanceControlDetectionUpdateData().attributes(newGovernanceControlDetectionUpdateAttributes().assignedTeam("platform-security").assignedTo("11111111-2222-3333-4444-555555555555").mitigateAfter(OffsetDateTime.parse("2024-03-15T00:00:00Z")).state(GovernanceControlDetectionUpdateState.EXCEPTION)).type(GovernanceControlDetectionResourceType.GOVERNANCE_CONTROL_DETECTION));try{GovernanceControlDetectionResponseresult=apiInstance.updateGovernanceDetection("3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d",body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling GovernanceConsoleApi#updateGovernanceDetection");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Update a detection returns "OK" response
usechrono::{DateTime,Utc};usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_governance_console::GovernanceConsoleAPI;usedatadog_api_client::datadogV2::model::GovernanceControlDetectionResourceType;usedatadog_api_client::datadogV2::model::GovernanceControlDetectionUpdateAttributes;usedatadog_api_client::datadogV2::model::GovernanceControlDetectionUpdateData;usedatadog_api_client::datadogV2::model::GovernanceControlDetectionUpdateRequest;usedatadog_api_client::datadogV2::model::GovernanceControlDetectionUpdateState;#[tokio::main]asyncfnmain(){letbody=GovernanceControlDetectionUpdateRequest::new(GovernanceControlDetectionUpdateData::new(GovernanceControlDetectionResourceType::GOVERNANCE_CONTROL_DETECTION,).attributes(GovernanceControlDetectionUpdateAttributes::new().assigned_team("platform-security".to_string()).assigned_to("11111111-2222-3333-4444-555555555555".to_string()).mitigate_after(DateTime::parse_from_rfc3339("2024-03-15T00:00:00+00:00").expect("Failed to parse datetime").with_timezone(&Utc),).state(GovernanceControlDetectionUpdateState::EXCEPTION),),);letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.update_governance_detection",true);letapi=GovernanceConsoleAPI::with_config(configuration);letresp=api.update_governance_detection("detection_id".to_string(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update a detection returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});configuration.unstableOperations["v2.updateGovernanceDetection"]=true;constapiInstance=newv2.GovernanceConsoleApi(configuration);constparams: v2.GovernanceConsoleApiUpdateGovernanceDetectionRequest={body:{data:{attributes:{assignedTeam:"platform-security",assignedTo:"11111111-2222-3333-4444-555555555555",mitigateAfter: newDate(2024,3,15,0,0,0,0),state:"exception",},type:"governance_control_detection",},},detectionId:"detection_id",};apiInstance.updateGovernanceDetection(params).then((data: v2.GovernanceControlDetectionResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.