The included related resources of a component. Client must explicitly request these resources by name in the include query parameter.
Option 1
object
The included Datadog user resource.
attributes
object
Attributes of the Datadog user.
email
string
The email of the Datadog user.
handle
string
The handle of the Datadog user.
icon
string
The icon of the Datadog user.
name
string
The name of the Datadog user.
uuid
string
The UUID of the Datadog user.
id
uuid
The ID of the Datadog user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
Option 2
object
The included status page resource.
attributes
object
The attributes of a status page.
company_logo
string
The base64-encoded image data displayed in the company logo.
components
[object]
Components displayed on the status page.
components
[object]
If the component is of type group, the components within the group.
id
uuid
The ID of the grouped component.
name
string
The name of the grouped component.
position
int64
The zero-indexed position of the grouped component. Relative to the other components in the group.
status
enum
The status of the component.
Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance
type
enum
The type of the component.
Allowed enum values: component
id
uuid
The ID of the component.
name
string
The name of the component.
position
int64
The zero-indexed position of the component.
status
enum
The status of the component.
Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance
type
enum
The type of the component.
Allowed enum values: component,group
created_at
date-time
Timestamp of when the status page was created.
custom_domain
string
If configured, the url that the status page is accessible at.
custom_domain_enabled
boolean
Whether the custom domain is configured.
domain_prefix
string
The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.
email_header_image
string
Base64-encoded image data included in email notifications sent to status page subscribers.
enabled
boolean
Whether the status page is enabled.
favicon
string
Base64-encoded image data displayed in the browser tab.
modified_at
date-time
Timestamp of when the status page was last modified.
name
string
The name of the status page.
page_url
string
The url that the status page is accessible at.
slack_app_icon
string
The Slack app icon URL for the status page.
slack_subscriptions_enabled
boolean
Whether Slack subscriptions are enabled for the status page.
subscriptions_enabled
boolean
Whether users can subscribe to the status page.
type
enum
The type of the status page controlling how the status page is accessed.
Allowed enum values: public,internal
visualization_type
enum
The visualization type of the status page.
Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only
id
uuid
The ID of the status page.
relationships
object
The relationships of a status page.
created_by_user
object
The Datadog user who created the status page.
data [required]
object
The data object identifying the Datadog user who created the status page.
id [required]
string
The ID of the Datadog user who created the status page.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by_user
object
The Datadog user who last modified the status page.
data [required]
object
The data object identifying the Datadog user who last modified the status page.
id [required]
string
The ID of the Datadog user who last modified the status page.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type [required]
enum
Status pages resource type.
Allowed enum values: status_pages
default: status_pages
Option 3
object
The included component group resource.
attributes
object
The attributes of a component group.
components
[object]
If the component is of type group, the components within the group.
id
uuid
The ID of the grouped component.
name
string
The name of the grouped component.
position
int64
The zero-indexed position of the grouped component. Relative to the other components in the group.
status
enum
The status of the component.
Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance
type
enum
The type of the component.
Allowed enum values: component
created_at
date-time
Timestamp of when the component was created.
modified_at
date-time
Timestamp of when the component was last modified.
name
string
The name of the component.
position
int64
The zero-indexed position of the component.
status
enum
The status of the component.
Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance
type [required]
enum
The type of the component.
Allowed enum values: component,group
id
uuid
The ID of the component.
relationships
object
The relationships of a component group.
created_by_user
object
The Datadog user who created the component group.
data [required]
object
The data object identifying the Datadog user who created the component group.
id [required]
string
The ID of the Datadog user who created the component group.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
group
object
The group the component group belongs to.
data [required]
object
The data object identifying the parent group of a component group.
// Update component returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2""github.com/google/uuid")funcmain(){// there is a valid "status_page" in the systemStatusPageDataAttributesComponents0ID:=uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"))StatusPageDataID:=uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))body:=datadogV2.PatchComponentRequest{Data:&datadogV2.PatchComponentRequestData{Attributes:datadogV2.PatchComponentRequestDataAttributes{Name:datadog.PtrString("Logs Indexing"),},Id:StatusPageDataAttributesComponents0ID,Type:datadogV2.STATUSPAGESCOMPONENTGROUPTYPE_COMPONENTS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewStatusPagesApi(apiClient)resp,r,err:=api.UpdateComponent(ctx,StatusPageDataID,StatusPageDataAttributesComponents0ID,body,*datadogV2.NewUpdateComponentOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `StatusPagesApi.UpdateComponent`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `StatusPagesApi.UpdateComponent`:\n%s\n",responseContent)}
// Update component returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.StatusPagesApi;importcom.datadog.api.client.v2.model.PatchComponentRequest;importcom.datadog.api.client.v2.model.PatchComponentRequestData;importcom.datadog.api.client.v2.model.PatchComponentRequestDataAttributes;importcom.datadog.api.client.v2.model.StatusPagesComponent;importcom.datadog.api.client.v2.model.StatusPagesComponentGroupType;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();StatusPagesApiapiInstance=newStatusPagesApi(defaultClient);// there is a valid "status_page" in the systemUUIDSTATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID=null;try{STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID=UUID.fromString(System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}UUIDSTATUS_PAGE_DATA_ID=null;try{STATUS_PAGE_DATA_ID=UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}PatchComponentRequestbody=newPatchComponentRequest().data(newPatchComponentRequestData().attributes(newPatchComponentRequestDataAttributes().name("Logs Indexing")).id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID).type(StatusPagesComponentGroupType.COMPONENTS));try{StatusPagesComponentresult=apiInstance.updateComponent(STATUS_PAGE_DATA_ID,STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling StatusPagesApi#updateComponent");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update component returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.status_pages_apiimportStatusPagesApifromdatadog_api_client.v2.model.patch_component_requestimportPatchComponentRequestfromdatadog_api_client.v2.model.patch_component_request_dataimportPatchComponentRequestDatafromdatadog_api_client.v2.model.patch_component_request_data_attributesimportPatchComponentRequestDataAttributesfromdatadog_api_client.v2.model.status_pages_component_group_typeimportStatusPagesComponentGroupType# there is a valid "status_page" in the systemSTATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID=environ["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]STATUS_PAGE_DATA_ID=environ["STATUS_PAGE_DATA_ID"]body=PatchComponentRequest(data=PatchComponentRequestData(attributes=PatchComponentRequestDataAttributes(name="Logs Indexing",),id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,type=StatusPagesComponentGroupType.COMPONENTS,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=StatusPagesApi(api_client)response=api_instance.update_component(page_id=STATUS_PAGE_DATA_ID,component_id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,body=body)print(response)
# Update component returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::StatusPagesAPI.new# there is a valid "status_page" in the systemSTATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID=ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]STATUS_PAGE_DATA_ID=ENV["STATUS_PAGE_DATA_ID"]body=DatadogAPIClient::V2::PatchComponentRequest.new({data:DatadogAPIClient::V2::PatchComponentRequestData.new({attributes:DatadogAPIClient::V2::PatchComponentRequestDataAttributes.new({name:"Logs Indexing",}),id:STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,type:DatadogAPIClient::V2::StatusPagesComponentGroupType::COMPONENTS,}),})papi_instance.update_component(STATUS_PAGE_DATA_ID,STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,body)
// Update component returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;usedatadog_api_client::datadogV2::api_status_pages::UpdateComponentOptionalParams;usedatadog_api_client::datadogV2::model::PatchComponentRequest;usedatadog_api_client::datadogV2::model::PatchComponentRequestData;usedatadog_api_client::datadogV2::model::PatchComponentRequestDataAttributes;usedatadog_api_client::datadogV2::model::StatusPagesComponentGroupType;#[tokio::main]asyncfnmain(){// there is a valid "status_page" in the system
letstatus_page_data_attributes_components_0_id=uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID").unwrap(),).expect("Invalid UUID");letstatus_page_data_id=uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap()).expect("Invalid UUID");letbody=PatchComponentRequest::new().data(PatchComponentRequestData::new(PatchComponentRequestDataAttributes::new().name("Logs Indexing".to_string()),status_page_data_attributes_components_0_id.clone(),StatusPagesComponentGroupType::COMPONENTS,));letconfiguration=datadog::Configuration::new();letapi=StatusPagesAPI::with_config(configuration);letresp=api.update_component(status_page_data_id.clone(),status_page_data_attributes_components_0_id.clone(),body,UpdateComponentOptionalParams::default(),).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 component returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.StatusPagesApi(configuration);// there is a valid "status_page" in the system
constSTATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID=process.env.STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_IDasstring;constSTATUS_PAGE_DATA_ID=process.env.STATUS_PAGE_DATA_IDasstring;constparams: v2.StatusPagesApiUpdateComponentRequest={body:{data:{attributes:{name:"Logs Indexing",},id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,type:"components",},},pageId: STATUS_PAGE_DATA_ID,componentId: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,};apiInstance.updateComponent(params).then((data: v2.StatusPagesComponent)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));