Sha256: bd5fac470e2c63b8a46ebf8b88629cf200ac519f5a2acec9818a4a83a381a18a

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

# 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)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.28.1 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.27.1 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.26.1 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.26.0 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.25.0 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.24.0 examples/v2/authn-mappings/UpdateAuthNMapping.rb
datadog_api_client-2.22.0 examples/v2/authn-mappings/UpdateAuthNMapping.rb