The name of the role. The name is neither unique nor a stable identifier of the role.
receives_permissions_from
[string]
The managed role from which this role automatically inherits new permissions.
Specify one of the following: "Datadog Admin Role", "Datadog Standard Role", or "Datadog Read Only Role".
If empty or not specified, the role does not automatically inherit permissions from any managed role.
user_count
int64
Number of users with that role.
id
string
The unique identifier of the role.
relationships
object
Relationships of the role object returned by the API.
# Path parameters exportauthn_mapping_id="CHANGE_ME" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
"""
Get an AuthN Mapping by UUID returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.authn_mappings_apiimportAuthNMappingsApi# there is a valid "authn_mapping" in the systemAUTHN_MAPPING_DATA_ID=environ["AUTHN_MAPPING_DATA_ID"]configuration=Configuration()configuration.access_token=environ["DD_BEARER_TOKEN"]withApiClient(configuration)asapi_client:api_instance=AuthNMappingsApi(api_client)response=api_instance.get_authn_mapping(authn_mapping_id=AUTHN_MAPPING_DATA_ID,)print(response)
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"
# Get an AuthN Mapping by UUID returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::AuthNMappingsAPI.new# there is a valid "authn_mapping" in the systemAUTHN_MAPPING_DATA_ID=ENV["AUTHN_MAPPING_DATA_ID"]papi_instance.get_authn_mapping(AUTHN_MAPPING_DATA_ID)
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"
// Get an AuthN Mapping by UUID 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")funcmain(){// there is a valid "authn_mapping" in the systemAuthnMappingDataID:=os.Getenv("AUTHN_MAPPING_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAuthNMappingsApi(apiClient)resp,r,err:=api.GetAuthNMapping(ctx,AuthnMappingDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AuthNMappingsApi.GetAuthNMapping`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AuthNMappingsApi.GetAuthNMapping`:\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"
// Get an AuthN Mapping by UUID returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AuthNMappingsApi;importcom.datadog.api.client.v2.model.AuthNMappingResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));AuthNMappingsApiapiInstance=newAuthNMappingsApi(defaultClient);// there is a valid "authn_mapping" in the systemStringAUTHN_MAPPING_DATA_ID=System.getenv("AUTHN_MAPPING_DATA_ID");try{AuthNMappingResponseresult=apiInstance.getAuthNMapping(AUTHN_MAPPING_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AuthNMappingsApi#getAuthNMapping");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"
// Get an AuthN Mapping by UUID returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_authn_mappings::AuthNMappingsAPI;#[tokio::main]asyncfnmain(){// there is a valid "authn_mapping" in the system
letauthn_mapping_data_id=std::env::var("AUTHN_MAPPING_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=AuthNMappingsAPI::with_config(configuration);letresp=api.get_authn_mapping(authn_mapping_data_id.clone()).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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get an AuthN Mapping by UUID returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.AuthNMappingsApi(configuration);// there is a valid "authn_mapping" in the system
constAUTHN_MAPPING_DATA_ID=process.env.AUTHN_MAPPING_DATA_IDasstring;constparams: v2.AuthNMappingsApiGetAuthNMappingRequest={authnMappingId: AUTHN_MAPPING_DATA_ID,};apiInstance.getAuthNMapping(params).then((data: v2.AuthNMappingResponse)=>{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"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.