Skip to content

Create Rule

datazone_create_rule R Documentation

Creates a rule in Amazon DataZone

Description

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.

Usage

datazone_create_rule(action, clientToken, description, detail,
  domainIdentifier, name, scope, target)

Arguments

action

[required] The action of the rule.

clientToken

A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

description

The description of the rule.

detail

[required] The detail of the rule.

domainIdentifier

[required] The ID of the domain where the rule is created.

name

[required] The name of the rule.

scope

[required] The scope of the rule.

target

[required] The target of the rule.

Value

A list with the following syntax:

list(
  action = "CREATE_SUBSCRIPTION_REQUEST",
  createdAt = as.POSIXct(
    "2015-01-01"
  ),
  createdBy = "string",
  description = "string",
  detail = list(
    metadataFormEnforcementDetail = list(
      requiredMetadataForms = list(
        list(
          typeIdentifier = "string",
          typeRevision = "string"
        )
      )
    )
  ),
  identifier = "string",
  name = "string",
  ruleType = "METADATA_FORM_ENFORCEMENT",
  scope = list(
    assetType = list(
      selectionMode = "ALL"|"SPECIFIC",
      specificAssetTypes = list(
        "string"
      )
    ),
    dataProduct = TRUE|FALSE,
    project = list(
      selectionMode = "ALL"|"SPECIFIC",
      specificProjects = list(
        "string"
      )
    )
  ),
  target = list(
    domainUnitTarget = list(
      domainUnitId = "string",
      includeChildDomainUnits = TRUE|FALSE
    )
  ),
  targetType = "DOMAIN_UNIT"
)

Request syntax

svc$create_rule(
  action = "CREATE_SUBSCRIPTION_REQUEST",
  clientToken = "string",
  description = "string",
  detail = list(
    metadataFormEnforcementDetail = list(
      requiredMetadataForms = list(
        list(
          typeIdentifier = "string",
          typeRevision = "string"
        )
      )
    )
  ),
  domainIdentifier = "string",
  name = "string",
  scope = list(
    assetType = list(
      selectionMode = "ALL"|"SPECIFIC",
      specificAssetTypes = list(
        "string"
      )
    ),
    dataProduct = TRUE|FALSE,
    project = list(
      selectionMode = "ALL"|"SPECIFIC",
      specificProjects = list(
        "string"
      )
    )
  ),
  target = list(
    domainUnitTarget = list(
      domainUnitId = "string",
      includeChildDomainUnits = TRUE|FALSE
    )
  )
)