Sha256: 2aeca23c78d39706a64ad17d2b8b6327e81445f2c744da9f6d8666c4b7792247

Contents?: true

Size: 996 Bytes

Versions: 15

Compression:

Stored size: 996 Bytes

Contents

# 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: "examplecreateanauthnmappingreturnsokresponse",
      attribute_value: "Example-Create_an_AuthN_Mapping_returns_OK_response",
    }),
    relationships: DatadogAPIClient::V2::AuthNMappingCreateRelationships.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)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.8.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.7.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.6.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.5.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.4.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.3.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.2.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.1.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.0.2 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.0.1 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-2.0.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-1.11.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-1.10.0 examples/v2/authn-mappings/CreateAuthNMapping.rb
datadog_api_client-1.9.0 examples/v2/authn-mappings/CreateAuthNMapping.rb