java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.server.spring.GovernanceZonesResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-program/users/{userId}") public class GovernanceZonesResource extends Object
The GovernanceZonesResource provides a Spring based server-side REST API that supports the GovernanceZonesInterface. It delegates each request to the GovernanceZoneRESTServices.
  • Constructor Details

    • GovernanceZonesResource

      public GovernanceZonesResource()
      Default constructor
  • Method Details

    • createGovernanceZone

      @PostMapping(path="/governance-zones") public GUIDResponse createGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @RequestBody ReferenceableRequestBody requestBody)
      Create a definition of a governance zone. The qualified name of these governance zones can be added to the supportedZones and defaultZones properties of an OMAS to control which assets are processed and how they are set up. In addition, the qualified names of zones can be added to Asset definitions to indicate which zone(s) they belong to.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      requestBody - other properties for a governance zone
      Returns:
      unique identifier of the new zone or InvalidParameterException full path or userId is null or PropertyServerException problem accessing property server or UserNotAuthorizedException security access problem
    • updateGovernanceZone

      @PostMapping(path="/governance-zones/{zoneGUID}") public VoidResponse updateGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @RequestParam boolean isMergeUpdate, @RequestBody ReferenceableRequestBody requestBody)
      Update the definition of a zone.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier of zone
      isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
      requestBody - properties to change
      Returns:
      void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • deleteGovernanceZone

      @PostMapping(path="/governance-zones/{zoneGUID}/delete") public VoidResponse deleteGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @RequestBody(required=false) ExternalSourceRequestBody requestBody)
      Remove the definition of a zone.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier of zone
      requestBody - external source requestBody
      Returns:
      void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • linkZonesInHierarchy

      @PostMapping(path="/governance-zones/{parentZoneGUID}/nested-zone/{childZoneGUID}/link") public VoidResponse linkZonesInHierarchy(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentZoneGUID, @PathVariable String childZoneGUID, @RequestBody(required=false) RelationshipRequestBody requestBody)
      Link two related governance zones together as part of a hierarchy. A zone can only have one parent but many child zones.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      parentZoneGUID - unique identifier of the parent zone
      childZoneGUID - unique identifier of the child zone
      requestBody - relationship requestBody
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • unlinkZonesInHierarchy

      @PostMapping(path="/governance-zones/{parentZoneGUID}/nested-zone/{childZoneGUID}/unlink") public VoidResponse unlinkZonesInHierarchy(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentZoneGUID, @PathVariable String childZoneGUID, @RequestBody(required=false) RelationshipRequestBody requestBody)
      Remove the link between two zones in the zone hierarchy.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      parentZoneGUID - unique identifier of the parent zone
      childZoneGUID - unique identifier of the child zone
      requestBody - relationship requestBody
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • linkZoneToGovernanceDefinition

      @PostMapping(path="/governance-zones/{zoneGUID}/governed-by/{definitionGUID}/link") public VoidResponse linkZoneToGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @PathVariable String definitionGUID, @RequestBody(required=false) RelationshipRequestBody requestBody)
      Link a governance zone to a governance definition that controls how the assets in the zone should be governed.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier of the zone
      definitionGUID - unique identifier of the governance definition
      requestBody - relationship requestBody
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • unlinkZoneFromGovernanceDefinition

      @PostMapping(path="/governance-zones/{zoneGUID}/governed-by/{definitionGUID}/unlink") public VoidResponse unlinkZoneFromGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @PathVariable String definitionGUID, @RequestBody(required=false) RelationshipRequestBody requestBody)
      Remove the link between a zone and a governance definition.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier of the zone
      definitionGUID - unique identifier of the governance definition
      requestBody - relationship requestBody
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getGovernanceZoneByGUID

      @GetMapping(path="/governance-zones/{zoneGUID}") public GovernanceZoneResponse getGovernanceZoneByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID)
      Return information about a specific governance zone.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier for the zone
      Returns:
      properties of the governance zone or InvalidParameterException zoneGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getGovernanceZoneByName

      @GetMapping(path="/governance-zones/name/{qualifiedName}") public GovernanceZoneResponse getGovernanceZoneByName(@PathVariable String serverName, @PathVariable String userId, @PathVariable String qualifiedName)
      Return information about a specific governance zone.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      qualifiedName - unique name for the zone
      Returns:
      properties of the governance zone or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getGovernanceZonesForDomain

      @GetMapping(path="/governance-zones/for-domain") public GovernanceZonesResponse getGovernanceZonesForDomain(@PathVariable String serverName, @PathVariable String userId, @RequestParam int domainIdentifier, @RequestParam int startFrom, @RequestParam int pageSize)
      Return information about the defined governance zones.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      domainIdentifier - identifier for the desired governance domain
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      properties of the governance zone or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getGovernanceZoneDefinitionByGUID

      @GetMapping(path="/governance-zones/{zoneGUID}/with-definitions") public GovernanceZoneDefinitionResponse getGovernanceZoneDefinitionByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID)
      Return information about a specific governance zone and its linked governance definitions.
      Parameters:
      serverName - name of the server instance to connect to
      userId - calling user
      zoneGUID - unique identifier for the zone
      Returns:
      properties of the governance zone linked to the associated governance definitions or InvalidParameterException zoneGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem