如何管理法律標籤

在本文中,您將了解什麼是合法的標籤,以及如何在適用於能源的 Azure 數據管理員實例中管理它們。

法律標籤是代表數據擷取和權利服務合法狀態的實體,可定義使用者對數據的存取權。 使用者可能有權使用權利來管理數據,但需要使用法律標籤滿足特定法律需求。 法律標籤是必要屬性的集合,可控管如何將數據 內嵌 至適用於能源的 Azure 數據管理員實例。

Azure Data Manager for Energy 實例只 countryOfOrigin 允許根據數據分割層級的組態檔 DefaultCountryCodes.json ,建立合法捲標。 OSDU 已定義此檔案,您無法編輯它。

在 Azure Cloud Bash 中執行 curl 命令,為 Azure Data Manager for Energy 實例的指定數據分割建立法律卷標。

    curl --location --request POST 'https://<URI>/api/legal/v1/legaltags' \
    --header 'data-partition-id: <data-partition-id>' \
    --header 'Authorization: Bearer <access_token>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "<legal-tag-name>",
        "description": "<legal-tag-description>",
        "properties": {
            "contractId": "<contract-id>",
            "countryOfOrigin": ["<country-of-origin>"],
            "dataType": "<data-type>",
            "expirationDate": "<expiration-ID>",
            "exportClassification": "<export-classification>",
            "originator": "<originator>",
            "personalData": "<personal-data>",
            "securityClassification": "Public"
        }
    }'

範例要求

請考慮名為 medstest 的 Azure Data Manager for Energy 實例,其數據分割名為 「dp1」:

    curl --location --request POST 'https://medstest.energy.azure.com/api/legal/v1/legaltags' \
    --header 'data-partition-id: medstest-dp1' \
    --header 'Authorization: Bearer  eyxxxxxxx.........................' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "medstest-dp1-legal-tag",
        "description": "Azure Data Manager for Energy Legal Tag",
        "properties": {
            "contractId": "A1234",
            "countryOfOrigin": ["US"],
            "dataType": "Public Domain Data",
            "expirationDate": "2099-01-25",
            "exportClassification": "EAR99",
            "originator": "MyCompany",
            "personalData": "No Personal Data",
            "securityClassification": "Public"
        }
    }'

範例回覆

    {
        "name": "medsStest-dp1-legal-tag",
        "description": "Azure Data Manager for Energy Legal Tag",
        "properties": {
        "countryOfOrigin": [
            "US"
        ],
        "contractId": "A1234",
        "expirationDate": "2099-01-25",
        "originator": "MyCompany",
        "dataType": "Public Domain Data",
        "securityClassification": "Public",
        "personalData": "No Personal Data",
        "exportClassification": "EAR99"
    }
}

來源國應遵循 ISO Alpha2 格式

如果尚未存在,此 API 會在內部附加 data-partition-id 至合法標籤名稱。 例如,如果要求的名稱為: legal-tag,則建立合法標記名稱會是 <instancename>-<data-partition-id>-legal-tag

    curl --location --request POST 'https://medstest.energy.azure.com/api/legal/v1/legaltags' \
    --header 'data-partition-id: medstest-dp1' \
    --header 'Authorization: Bearer  eyxxxxxxx.........................' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "legal-tag",
        "description": "Azure Data Manager for Energy Legal Tag",
        "properties": {
            "contractId": "A1234",
            "countryOfOrigin": ["US"],
            "dataType": "Public Domain Data",
            "expirationDate": "2099-01-25",
            "exportClassification": "EAR99",
            "originator": "MyCompany",
            "personalData": "No Personal Data",
            "securityClassification": "Public"
        }
    }'

範例回應已 data-partition-id 附加至合法標籤名稱。

    {
        "name": "medstest-dp1-legal-tag",
        "description": "Azure Data Manager for Energy Legal Tag",
        "properties": {
        "countryOfOrigin": [
            "US"
        ],
        "contractId": "A1234",
        "expirationDate": "2099-01-25",
        "originator": "MyCompany",
        "dataType": "Public Domain Data",
        "securityClassification": "Public",
        "personalData": "No Personal Data",
        "exportClassification": "EAR99"
    }
}

在 Azure Cloud Bash 中執行 curl 命令,以取得與 Azure Data Manager for Energy 實例的數據分割相關聯的合法卷標。

    curl --location --request GET 'https://<URI>/api/legal/v1/legaltags/<legal-tag-name>' \
    --header 'data-partition-id: <data-partition-id>' \
    --header 'Authorization: Bearer <access_token>'

範例要求

請考慮名為 medstest 的 Azure Data Manager for Energy 實例,其數據分割名為 「dp1」:

    curl --location --request GET 'https://medstest.energy.azure.com/api/legal/v1/legaltags/medstest-dp1-legal-tag' \
    --header 'data-partition-id: medstest-dp1' \
    --header 'Authorization: Bearer eyxxxxxxx.........................'

範例回應

    {
    "name": "medstest-dp1-legal-tag",
    "description": "Azure Data Manager for Energy Legal Tag",
    "properties": {
        "countryOfOrigin": [
        "US"
        ],
        "contractId": "A1234",
        "expirationDate": "2099-01-25",
        "originator": "MyCompany",
        "dataType": "Public Domain Data",
        "securityClassification": "Public",
        "personalData": "No Personal Data",
        "exportClassification": "EAR99"
    }
    }

下一步