---
title: "POST /v2/domains/{domainIdentifier}/rules"
method: POST
path: "/v2/domains/{domainIdentifier}/rules"
---

# POST /v2/domains/{domainIdentifier}/rules

`POST /v2/domains/{domainIdentifier}/rules`

Creates a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.

## Path parameters

- `domainIdentifier` string, required

## Request body

- object
  - `name` string, password, required — The name of the rule.
  - `target` object, required — The target of the rule.
    - `domainUnitTarget` object — The ID of the domain unit.
      - `domainUnitId` string, required — The ID of the domain unit.
      - `includeChildDomainUnits` boolean — Specifies whether to apply a rule to the child domain units.
  - `action` 'CREATE_LISTING_CHANGE_SET' | 'CREATE_SUBSCRIPTION_REQUEST', required — The action of the rule.
  - `scope` object, required — The scope of a rule.
    - `assetType` object — The asset type included in the rule scope.
      - `selectionMode` 'ALL' | 'SPECIFIC', required — The selection mode for the rule.
      - `specificAssetTypes` AssetTypeIdentifier[] — The specific asset types that are included in the rule.
    - `dataProduct` boolean — The data product included in the rule scope.
    - `project` object — The project included in the rule scope.
      - `selectionMode` 'ALL' | 'SPECIFIC', required — The selection mode of the rule.
      - `specificProjects` ProjectId[] — The specific projects in which the rule is created.
  - `detail` object, required — The details of a rule.
    - `metadataFormEnforcementDetail` object — The enforcement detail of the metadata form.
      - `requiredMetadataForms` MetadataFormReference[] — The required metadata forms.
        - `typeIdentifier` string, required — The type ID of the metadata form reference.
        - `typeRevision` string, required — The type revision of the metadata form reference.
    - `glossaryTermEnforcementDetail` object — The enforcement details of a glossary term that's part of the metadata rule.
      - `requiredGlossaryTermIds` GlossaryTermId[] — The ID of the required glossary term.
  - `description` string, password — The description of the rule.
  - `clientToken` string — A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

## Response `201`

Success

- CreateRuleOutput
  - `identifier` string, required — The ID of the rule.
  - `name` string, password, required — The name of the rule.
  - `ruleType` 'METADATA_FORM_ENFORCEMENT' | 'GLOSSARY_TERM_ENFORCEMENT', required — The type of the rule.
  - `target` object, required — The target of the rule.
    - `domainUnitTarget` object — The ID of the domain unit.
      - `domainUnitId` string, required — The ID of the domain unit.
      - `includeChildDomainUnits` boolean — Specifies whether to apply a rule to the child domain units.
  - `action` 'CREATE_LISTING_CHANGE_SET' | 'CREATE_SUBSCRIPTION_REQUEST', required — The action of the rule.
  - `scope` object, required — The scope of the rule.
    - `assetType` object — The asset type included in the rule scope.
      - `selectionMode` 'ALL' | 'SPECIFIC', required — The selection mode for the rule.
      - `specificAssetTypes` AssetTypeIdentifier[] — The specific asset types that are included in the rule.
    - `dataProduct` boolean — The data product included in the rule scope.
    - `project` object — The project included in the rule scope.
      - `selectionMode` 'ALL' | 'SPECIFIC', required — The selection mode of the rule.
      - `specificProjects` ProjectId[] — The specific projects in which the rule is created.
  - `detail` object, required — The detail of the rule.
    - `metadataFormEnforcementDetail` object — The enforcement detail of the metadata form.
      - `requiredMetadataForms` MetadataFormReference[] — The required metadata forms.
        - `typeIdentifier` string, required — The type ID of the metadata form reference.
        - `typeRevision` string, required — The type revision of the metadata form reference.
    - `glossaryTermEnforcementDetail` object — The enforcement details of a glossary term that's part of the metadata rule.
      - `requiredGlossaryTermIds` GlossaryTermId[] — The ID of the required glossary term.
  - `targetType` 'DOMAIN_UNIT' — The target type of the rule.
  - `description` string, password — The description of the rule.
  - `createdAt` string, date-time, required — The timestamp at which the rule is created.
  - `createdBy` string, required — The user who creates the rule.

## Other responses

- `480` — InternalServerException
- `481` — ResourceNotFoundException
- `482` — AccessDeniedException
- `483` — ThrottlingException
- `484` — ServiceQuotaExceededException
- `485` — ConflictException
- `486` — ValidationException
- `487` — UnauthorizedException

---

[API](https://skmtc.net/aws/apis/datazone.md) · [All operations](https://skmtc.net/aws/apis/datazone/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/datazone/versions/055599054b53/schema)
