---
title: "定義エイリアス"
slug: "definition-aliases"
abstract: "定義の別名とは、定義の文化に依存しない名称です。"
---
# 定義エイリアス

定義のエイリアスはSitecoreにおける **定義のアイテム名** で表され、定義の文化に依存しない名前です。以下の例では、目標のエイリアスは **「My goal name** 」、英語名は **「English goal name**」です。文化固有の名前は、アイテムの**Name**フィールドで表されます。

![Example definition alias and a culture-specific name](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/91/sitecore-experience-platform/images/aliases1.png)

定義を作成するたびに、別名と文化固有の名前を指定する必要があります。

Guid goalId = Guid.NewGuid(); // Goal ID
CultureInfo goalCulture = new CultureInfo("es"); // Goal culture
string goalName = "Newly created goal"; // Goal name
DateTime creationDate = DateTime.UtcNow; // Goal creation date
string createdBy = "sitecore\\admin"; // Goal creator
var goalAlias = "Newly created item name/alias"

Sitecore.Marketing.Definitions.Goals.GoalDefinition goal = new Sitecore.Marketing.Definitions.Goals.GoalDefinition(goalId, goalAlias, goalCulture, goalName, creationDate, createdBy);

## エイリアスの一意性と検証

エイリアスは定義タイプ内で一意でなければなりません。例えば、「Hello World」という目標と「Hello World」というキャンペーンを持つことはできますが、「Hello」という名前のキャンペーンを二つ持つことはできません。これは、キャンペーンがコンテンツツリーの異なる部分で作成されていても同じです。

エイリアスは以下の正規表現に対して検証されます: ^a-zA-Z0-9\_\\-\\x20\*$