AuthN Mappings

The AuthN Mappings API is used to automatically map groups of users to roles in Datadog using attributes sent from Identity Providers. Use these endpoints to manage your AuthN Mappings.

GET https://api.ap1.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.eu/api/v2/authn_mappings/{authn_mapping_id}https://api.ddog-gov.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us3.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us5.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}

개요

Get an AuthN Mapping specified by the AuthN Mapping UUID.

인수

경로 파라미터

이름

유형

설명

authn_mapping_id [required]

string

The UUID of the AuthN Mapping.

응답

OK

AuthN Mapping response from the API.

Expand All

항목

유형

설명

data

object

The AuthN Mapping object returned by API.

attributes

object

Attributes of AuthN Mapping.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

created_at

date-time

Creation time of the AuthN Mapping.

modified_at

date-time

Time of last AuthN Mapping modification.

saml_assertion_attribute_id

string

The ID of the SAML assertion attribute.

id [required]

string

ID of the AuthN Mapping.

relationships

object

All relationships associated with AuthN Mapping.

role

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

saml_assertion_attribute

object

AuthN Mapping relationship to SAML Assertion Attribute.

data [required]

object

Data of AuthN Mapping relationship to SAML Assertion Attribute.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

team

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

included

[ <oneOf>]

Included data in the AuthN Mapping response.

Option 1

object

SAML assertion attribute.

attributes

object

Key/Value pair of attributes used in SAML assertion attributes.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

Option 2

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the 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.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

Option 3

object

Team.

attributes

object

Team attributes.

avatar

string

Unicode representation of the avatar for the team, limited to a single grapheme

banner

int64

Banner selection for the team

handle

string

The team's identifier

link_count

int32

The number of links belonging to the team

name

string

The name of the team

summary

string

A brief summary of the team, derived from the description

user_count

int32

The number of users belonging to the team

id

string

The ID of the Team.

type

enum

Team type Allowed enum values: team

default: team

{
  "data": {
    "attributes": {
      "attribute_key": "member-of",
      "attribute_value": "Development",
      "created_at": "2019-09-19T10:00:00.000Z",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "saml_assertion_attribute_id": "0"
    },
    "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
    "relationships": {
      "role": {
        "data": {
          "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
          "type": "roles"
        }
      },
      "saml_assertion_attribute": {
        "data": {
          "id": "0",
          "type": "saml_assertion_attributes"
        }
      },
      "team": {
        "data": {
          "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
          "type": "team"
        }
      }
    },
    "type": "authn_mappings"
  },
  "included": [
    {
      "attributes": {
        "attribute_key": "member-of",
        "attribute_value": "Development"
      },
      "id": "0",
      "type": "saml_assertion_attributes"
    }
  ]
}

Authentication Error

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Get an AuthN Mapping by UUID returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AuthNMappingsAPI.new

# there is a valid "authn_mapping" in the system
AUTHN_MAPPING_DATA_ID = ENV["AUTHN_MAPPING_DATA_ID"]
p api_instance.get_authn_mapping(AUTHN_MAPPING_DATA_ID)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PATCH https://api.ap1.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.eu/api/v2/authn_mappings/{authn_mapping_id}https://api.ddog-gov.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us3.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us5.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}

개요

Edit an AuthN Mapping. This endpoint requires the user_access_manage permission.

인수

경로 파라미터

이름

유형

설명

authn_mapping_id [required]

string

The UUID of the AuthN Mapping.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

Data for updating an AuthN Mapping.

attributes

object

Key/Value pair of attributes used for update request.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

id [required]

string

ID of the AuthN Mapping.

relationships

 <oneOf>

Relationship of AuthN Mapping update object to a Role or Team.

Option 1

object

Relationship of AuthN Mapping to a Role.

role [required]

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

Option 2

object

Relationship of AuthN Mapping to a Team.

team [required]

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

{
  "data": {
    "attributes": {
      "attribute_key": "member-of",
      "attribute_value": "Development"
    },
    "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
    "relationships": {
      "role": {
        "data": {
          "id": "string",
          "type": "roles"
        }
      }
    },
    "type": "authn_mappings"
  }
}

응답

OK

AuthN Mapping response from the API.

Expand All

항목

유형

설명

data

object

The AuthN Mapping object returned by API.

attributes

object

Attributes of AuthN Mapping.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

created_at

date-time

Creation time of the AuthN Mapping.

modified_at

date-time

Time of last AuthN Mapping modification.

saml_assertion_attribute_id

string

The ID of the SAML assertion attribute.

id [required]

string

ID of the AuthN Mapping.

relationships

object

All relationships associated with AuthN Mapping.

role

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

saml_assertion_attribute

object

AuthN Mapping relationship to SAML Assertion Attribute.

data [required]

object

Data of AuthN Mapping relationship to SAML Assertion Attribute.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

team

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

included

[ <oneOf>]

Included data in the AuthN Mapping response.

Option 1

object

SAML assertion attribute.

attributes

object

Key/Value pair of attributes used in SAML assertion attributes.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

Option 2

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the 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.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

Option 3

object

Team.

attributes

object

Team attributes.

avatar

string

Unicode representation of the avatar for the team, limited to a single grapheme

banner

int64

Banner selection for the team

handle

string

The team's identifier

link_count

int32

The number of links belonging to the team

name

string

The name of the team

summary

string

A brief summary of the team, derived from the description

user_count

int32

The number of users belonging to the team

id

string

The ID of the Team.

type

enum

Team type Allowed enum values: team

default: team

{
  "data": {
    "attributes": {
      "attribute_key": "member-of",
      "attribute_value": "Development",
      "created_at": "2019-09-19T10:00:00.000Z",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "saml_assertion_attribute_id": "0"
    },
    "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
    "relationships": {
      "role": {
        "data": {
          "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
          "type": "roles"
        }
      },
      "saml_assertion_attribute": {
        "data": {
          "id": "0",
          "type": "saml_assertion_attributes"
        }
      },
      "team": {
        "data": {
          "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
          "type": "team"
        }
      }
    },
    "type": "authn_mappings"
  },
  "included": [
    {
      "attributes": {
        "attribute_key": "member-of",
        "attribute_value": "Development"
      },
      "id": "0",
      "type": "saml_assertion_attributes"
    }
  ]
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Unprocessable Entity

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Edit an AuthN Mapping returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AuthNMappingsAPI.new

# there is a valid "authn_mapping" in the system
AUTHN_MAPPING_DATA_ID = ENV["AUTHN_MAPPING_DATA_ID"]

# there is a valid "role" in the system
ROLE_DATA_ID = ENV["ROLE_DATA_ID"]

body = DatadogAPIClient::V2::AuthNMappingUpdateRequest.new({
  data: DatadogAPIClient::V2::AuthNMappingUpdateData.new({
    attributes: DatadogAPIClient::V2::AuthNMappingUpdateAttributes.new({
      attribute_key: "member-of",
      attribute_value: "Development",
    }),
    id: AUTHN_MAPPING_DATA_ID,
    relationships: DatadogAPIClient::V2::AuthNMappingRelationshipToRole.new({
      role: DatadogAPIClient::V2::RelationshipToRole.new({
        data: DatadogAPIClient::V2::RelationshipToRoleData.new({
          id: ROLE_DATA_ID,
          type: DatadogAPIClient::V2::RolesType::ROLES,
        }),
      }),
    }),
    type: DatadogAPIClient::V2::AuthNMappingsType::AUTHN_MAPPINGS,
  }),
})
p api_instance.update_authn_mapping(AUTHN_MAPPING_DATA_ID, body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

DELETE https://api.ap1.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.eu/api/v2/authn_mappings/{authn_mapping_id}https://api.ddog-gov.com/api/v2/authn_mappings/{authn_mapping_id}https://api.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us3.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}https://api.us5.datadoghq.com/api/v2/authn_mappings/{authn_mapping_id}

개요

Delete an AuthN Mapping specified by AuthN Mapping UUID. This endpoint requires the user_access_manage permission.

인수

경로 파라미터

이름

유형

설명

authn_mapping_id [required]

string

The UUID of the AuthN Mapping.

응답

OK

Authentication Error

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Delete an AuthN Mapping returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AuthNMappingsAPI.new

# there is a valid "authn_mapping" in the system
AUTHN_MAPPING_DATA_ID = ENV["AUTHN_MAPPING_DATA_ID"]
api_instance.delete_authn_mapping(AUTHN_MAPPING_DATA_ID)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

GET https://api.ap1.datadoghq.com/api/v2/authn_mappingshttps://api.datadoghq.eu/api/v2/authn_mappingshttps://api.ddog-gov.com/api/v2/authn_mappingshttps://api.datadoghq.com/api/v2/authn_mappingshttps://api.us3.datadoghq.com/api/v2/authn_mappingshttps://api.us5.datadoghq.com/api/v2/authn_mappings

개요

List all AuthN Mappings in the org.

인수

쿼리 문자열

이름

유형

설명

page[size]

integer

Size for a given page. The maximum allowed value is 100.

page[number]

integer

Specific page number to return.

sort

enum

Sort AuthN Mappings depending on the given field.
Allowed enum values: created_at, -created_at, role_id, -role_id, saml_assertion_attribute_id, -saml_assertion_attribute_id, role.name, -role.name, saml_assertion_attribute.attribute_key, -saml_assertion_attribute.attribute_key, saml_assertion_attribute.attribute_value, -saml_assertion_attribute.attribute_value

filter

string

Filter all mappings by the given string.

resource_type

enum

Filter by mapping resource type. Defaults to “role” if not specified.
Allowed enum values: role, team

응답

OK

Array of AuthN Mappings response.

Expand All

항목

유형

설명

data

[object]

Array of returned AuthN Mappings.

attributes

object

Attributes of AuthN Mapping.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

created_at

date-time

Creation time of the AuthN Mapping.

modified_at

date-time

Time of last AuthN Mapping modification.

saml_assertion_attribute_id

string

The ID of the SAML assertion attribute.

id [required]

string

ID of the AuthN Mapping.

relationships

object

All relationships associated with AuthN Mapping.

role

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

saml_assertion_attribute

object

AuthN Mapping relationship to SAML Assertion Attribute.

data [required]

object

Data of AuthN Mapping relationship to SAML Assertion Attribute.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

team

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

included

[ <oneOf>]

Included data in the AuthN Mapping response.

Option 1

object

SAML assertion attribute.

attributes

object

Key/Value pair of attributes used in SAML assertion attributes.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

Option 2

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the 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.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

Option 3

object

Team.

attributes

object

Team attributes.

avatar

string

Unicode representation of the avatar for the team, limited to a single grapheme

banner

int64

Banner selection for the team

handle

string

The team's identifier

link_count

int32

The number of links belonging to the team

name

string

The name of the team

summary

string

A brief summary of the team, derived from the description

user_count

int32

The number of users belonging to the team

id

string

The ID of the Team.

type

enum

Team type Allowed enum values: team

default: team

meta

object

Object describing meta attributes of response.

page

object

Pagination object.

total_count

int64

Total count.

total_filtered_count

int64

Total count of elements matched by the filter.

{
  "data": [
    {
      "attributes": {
        "attribute_key": "member-of",
        "attribute_value": "Development",
        "created_at": "2019-09-19T10:00:00.000Z",
        "modified_at": "2019-09-19T10:00:00.000Z",
        "saml_assertion_attribute_id": "0"
      },
      "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
      "relationships": {
        "role": {
          "data": {
            "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
            "type": "roles"
          }
        },
        "saml_assertion_attribute": {
          "data": {
            "id": "0",
            "type": "saml_assertion_attributes"
          }
        },
        "team": {
          "data": {
            "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        }
      },
      "type": "authn_mappings"
    }
  ],
  "included": [
    {
      "attributes": {
        "attribute_key": "member-of",
        "attribute_value": "Development"
      },
      "id": "0",
      "type": "saml_assertion_attributes"
    }
  ],
  "meta": {
    "page": {
      "total_count": "integer",
      "total_filtered_count": "integer"
    }
  }
}

Authentication Error

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# List all AuthN Mappings returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AuthNMappingsAPI.new
p api_instance.list_authn_mappings()

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.ap1.datadoghq.com/api/v2/authn_mappingshttps://api.datadoghq.eu/api/v2/authn_mappingshttps://api.ddog-gov.com/api/v2/authn_mappingshttps://api.datadoghq.com/api/v2/authn_mappingshttps://api.us3.datadoghq.com/api/v2/authn_mappingshttps://api.us5.datadoghq.com/api/v2/authn_mappings

개요

Create an AuthN Mapping. This endpoint requires the user_access_manage permission.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

Data for creating an AuthN Mapping.

attributes

object

Key/Value pair of attributes used for create request.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

relationships

 <oneOf>

Relationship of AuthN Mapping create object to a Role or Team.

Option 1

object

Relationship of AuthN Mapping to a Role.

role [required]

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

Option 2

object

Relationship of AuthN Mapping to a Team.

team [required]

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

{
  "data": {
    "attributes": {
      "attribute_key": "exampleauthnmapping",
      "attribute_value": "Example-AuthN-Mapping"
    },
    "relationships": {
      "role": {
        "data": {
          "id": "string",
          "type": "roles"
        }
      }
    },
    "type": "authn_mappings"
  }
}

응답

OK

AuthN Mapping response from the API.

Expand All

항목

유형

설명

data

object

The AuthN Mapping object returned by API.

attributes

object

Attributes of AuthN Mapping.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

created_at

date-time

Creation time of the AuthN Mapping.

modified_at

date-time

Time of last AuthN Mapping modification.

saml_assertion_attribute_id

string

The ID of the SAML assertion attribute.

id [required]

string

ID of the AuthN Mapping.

relationships

object

All relationships associated with AuthN Mapping.

role

object

Relationship to role.

data

object

Relationship to role object.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

saml_assertion_attribute

object

AuthN Mapping relationship to SAML Assertion Attribute.

data [required]

object

Data of AuthN Mapping relationship to SAML Assertion Attribute.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

team

object

Relationship to team.

data

object

Relationship to Team object.

id

string

The unique identifier of the team.

type

enum

Team type Allowed enum values: team

default: team

type [required]

enum

AuthN Mappings resource type. Allowed enum values: authn_mappings

default: authn_mappings

included

[ <oneOf>]

Included data in the AuthN Mapping response.

Option 1

object

SAML assertion attribute.

attributes

object

Key/Value pair of attributes used in SAML assertion attributes.

attribute_key

string

Key portion of a key/value pair of the attribute sent from the Identity Provider.

attribute_value

string

Value portion of a key/value pair of the attribute sent from the Identity Provider.

id [required]

string

The ID of the SAML assertion attribute.

type [required]

enum

SAML assertion attributes resource type. Allowed enum values: saml_assertion_attributes

default: saml_assertion_attributes

Option 2

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the 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.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

Option 3

object

Team.

attributes

object

Team attributes.

avatar

string

Unicode representation of the avatar for the team, limited to a single grapheme

banner

int64

Banner selection for the team

handle

string

The team's identifier

link_count

int32

The number of links belonging to the team

name

string

The name of the team

summary

string

A brief summary of the team, derived from the description

user_count

int32

The number of users belonging to the team

id

string

The ID of the Team.

type

enum

Team type Allowed enum values: team

default: team

{
  "data": {
    "attributes": {
      "attribute_key": "member-of",
      "attribute_value": "Development",
      "created_at": "2019-09-19T10:00:00.000Z",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "saml_assertion_attribute_id": "0"
    },
    "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
    "relationships": {
      "role": {
        "data": {
          "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
          "type": "roles"
        }
      },
      "saml_assertion_attribute": {
        "data": {
          "id": "0",
          "type": "saml_assertion_attributes"
        }
      },
      "team": {
        "data": {
          "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
          "type": "team"
        }
      }
    },
    "type": "authn_mappings"
  },
  "included": [
    {
      "attributes": {
        "attribute_key": "member-of",
        "attribute_value": "Development"
      },
      "id": "0",
      "type": "saml_assertion_attributes"
    }
  ]
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Create an AuthN Mapping returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AuthNMappingsAPI.new

# there is a valid "role" in the system
ROLE_DATA_ID = ENV["ROLE_DATA_ID"]

body = DatadogAPIClient::V2::AuthNMappingCreateRequest.new({
  data: DatadogAPIClient::V2::AuthNMappingCreateData.new({
    attributes: DatadogAPIClient::V2::AuthNMappingCreateAttributes.new({
      attribute_key: "exampleauthnmapping",
      attribute_value: "Example-AuthN-Mapping",
    }),
    relationships: DatadogAPIClient::V2::AuthNMappingRelationshipToRole.new({
      role: DatadogAPIClient::V2::RelationshipToRole.new({
        data: DatadogAPIClient::V2::RelationshipToRoleData.new({
          id: ROLE_DATA_ID,
          type: DatadogAPIClient::V2::RolesType::ROLES,
        }),
      }),
    }),
    type: DatadogAPIClient::V2::AuthNMappingsType::AUTHN_MAPPINGS,
  }),
})
p api_instance.create_authn_mapping(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PREVIEWING: aliciascott/DOCS-9725-Cloudcraft
Your Privacy Choices