getRule method

Future<GetRuleOutput> getRule({
  1. required String domainIdentifier,
  2. required String identifier,
  3. String? revision,
})

Gets the details of 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.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The ID of the domain where the GetRule action is to be invoked.

Parameter identifier : The ID of the rule.

Parameter revision : The revision of the rule.

Implementation

Future<GetRuleOutput> getRule({
  required String domainIdentifier,
  required String identifier,
  String? revision,
}) async {
  final $query = <String, List<String>>{
    if (revision != null) 'revision': [revision],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/rules/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetRuleOutput.fromJson(response);
}