通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Sent Shares - Create Or Replace

创建或替换已发送的共享

PUT {endpoint}/sentShares/{sentShareId}?api-version=2023-02-15-preview

URI 参数

名称 必需 类型 说明
endpoint
path True

string

purview 帐户的共享终结点。 示例:https://{accountName}.purview.azure.com/share

sentShareId
path True

string

maxLength: 36
pattern: ^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$

已发送共享的 ID

api-version
query True

string

要使用的 API 版本

请求正文

InPlaceSentShare

InPlace 共享类型。

名称 必需 类型 说明
properties True

InPlaceSentShareProperties

InPlace 发送共享的属性。

shareKind True string:

InPlace

定义共享支持的类型。

响应

名称 类型 说明
200 OK SentShare:

InPlaceSentShare

成功

标头

Operation-Location: string

201 Created SentShare:

InPlaceSentShare

成功

标头

Operation-Location: string

Other Status Codes

PurviewShareError

默认错误响应。

标头

x-ms-error-code: string

安全性

azureAuth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
https://purview.azure.net/.default Purview 服务范围

示例

SentShares_CreateOrReplace
SentShares_CreateOrReplaceAdlsGen2Account
SentShares_CreateOrReplaceBlobAccount

SentShares_CreateOrReplace

示例请求

PUT accountName.purview.azure.com/share/sentShares/FF4A2AAE-8755-47BB-9C00-A774B5A7006E?api-version=2023-02-15-preview

{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "SharedFile.txt"
          }
        ]
      }
    },
    "displayName": "sentShare1",
    "description": "description"
  },
  "shareKind": "InPlace"
}

示例响应

Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}

SentShares_CreateOrReplaceAdlsGen2Account

示例请求

PUT accountName.purview.azure.com/share/sentShares/FF4A2AAE-8755-47BB-9C00-A774B5A7006E?api-version=2023-02-15-preview

{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "SharedFile.txt"
          }
        ]
      }
    },
    "displayName": "sentShare1",
    "description": "description"
  },
  "shareKind": "InPlace"
}

示例响应

Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "AdlsGen2Account",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}

SentShares_CreateOrReplaceBlobAccount

示例请求

PUT accountName.purview.azure.com/share/sentShares/FF4A2AAE-8755-47BB-9C00-A774B5A7006E?api-version=2023-02-15-preview

{
  "properties": {
    "artifact": {
      "storeKind": "BlobAccount",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "SharedFile.txt"
          }
        ]
      }
    },
    "displayName": "sentShare1",
    "description": "description"
  },
  "shareKind": "InPlace"
}

示例响应

Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "BlobAccount",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
x-ms-long-running-operation: True
Operation-Location: https://accountName.purview.azure.com/share/operationResults/dad6baec-3a39-41df-a469-843a9ee94213?api-version=2023-02-15-preview
Operation-Id: dad6baec-3a39-41df-a469-843a9ee94213
{
  "properties": {
    "artifact": {
      "storeKind": "BlobAccount",
      "storeReference": {
        "referenceName": "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
        "type": "ArmResourceReference"
      },
      "properties": {
        "paths": [
          {
            "containerName": "container1",
            "senderPath": "directory/file.txt",
            "receiverPath": "ShareFile.txt"
          }
        ]
      }
    },
    "createdAt": "2021-07-21T23:45:35.3708674Z",
    "displayName": "sentShare1",
    "description": "description",
    "dependsOn": [],
    "state": "Succeeded",
    "senderName": "John Smith",
    "senderEmail": "johnsmith@contoso.com",
    "senderTenantName": "Contoso"
  },
  "id": "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
  "type": "SentShare",
  "shareKind": "InPlace"
}

定义

名称 说明
AdlsGen2Artifact

Adls Gen2 存储帐户项目。

AdlsGen2ArtifactProperties

Adls Gen2 存储帐户的属性。

BlobStorageArtifact

Blob 存储帐户项目。

BlobStorageArtifactProperties

Blob 存储帐户的属性。

InPlaceSentShare

InPlace 共享类型。

InPlaceSentShareProperties

InPlace 发送共享的属性。

PurviewShareError

purview 共享错误模型。

PurviewShareErrorInfo

purview 共享错误正文模型。

ReferenceNameType

定义要共享的资源的类型

ShareKind

定义共享支持的类型。

State

资源的状态

StorageAccountPath

定义单个 StorageAccountPath 路径

StoreKind

资产的类型。

StoreReference

项目或接收器的存储引用。

AdlsGen2Artifact

Adls Gen2 存储帐户项目。

名称 类型 说明
properties

AdlsGen2ArtifactProperties

Adls Gen2 存储帐户的属性。

storeKind string:

AdlsGen2Account

资产的类型。

storeReference

StoreReference

项目或接收器的存储引用。

AdlsGen2ArtifactProperties

Adls Gen2 存储帐户的属性。

名称 类型 说明
location

string

存储帐户的位置。

paths

StorageAccountPath[]

Adls Gen2 存储帐户路径的列表。

BlobStorageArtifact

Blob 存储帐户项目。

名称 类型 说明
properties

BlobStorageArtifactProperties

Blob 存储帐户的属性。

storeKind string:

BlobAccount

资产的类型。

storeReference

StoreReference

项目或接收器的存储引用。

BlobStorageArtifactProperties

Blob 存储帐户的属性。

名称 类型 说明
location

string

存储帐户的位置。

paths

StorageAccountPath[]

Blob 存储帐户路径的列表。

InPlaceSentShare

InPlace 共享类型。

名称 类型 说明
id

string

资源的唯一 ID。

properties

InPlaceSentShareProperties

InPlace 发送共享的属性。

shareKind string:

InPlace

定义共享支持的类型。

type

string

资源的类型。

InPlaceSentShareProperties

InPlace 发送共享的属性。

名称 类型 说明
artifact Artifact:

已发送共享项目的类。

createdAt

string (date-time)

创建已发送共享的时间。 以 RFC 3339 定义的标准日期时间格式表示

dependsOn

string[] (uuid)

所发送共享所依赖的共享的列表。

description

string

已发送共享说明。

displayName

string

已发送共享的名称

senderEmail

string

创建已发送共享的发件人的电子邮件。

senderName

string

创建已发送共享的发件人的名称。

senderTenantName

string

创建已发送共享的发件人的租户名称。

state

State

资源的状态

PurviewShareError

purview 共享错误模型。

名称 类型 说明
error

PurviewShareErrorInfo

purview 共享错误正文模型。

PurviewShareErrorInfo

purview 共享错误正文模型。

名称 类型 说明
code

string

错误的代码

details

PurviewShareErrorInfo[]

错误模型的嵌套详细信息

message

string

错误的消息

target

string

错误目标

ReferenceNameType

定义要共享的资源的类型

说明
ArmResourceReference

引用的类型是 ARM 资源

ShareKind

定义共享支持的类型。

说明
InPlace

共享的类型是就地共享

State

资源的状态

说明
Unknown

资源的状态为“未知”

Succeeded

资源的状态为“Succeeded”

Creating

资源的状态为“正在创建”

Deleting

资源的状态为“正在删除”

Moving

资源的状态为“移动”

Failed

资源的状态为“Failed”

StorageAccountPath

定义单个 StorageAccountPath 路径

名称 类型 说明
containerName

string

获取或设置容器名称

receiverPath

string

获取或设置要映射项目的接收方端的路径

senderPath

string

获取或设置要共享的容器中的文件/文件夹的路径

StoreKind

资产的类型。

说明
AdlsGen2Account

存储类型是 Adls Gen 2 存储帐户

BlobAccount

存储类型是 Blob 存储帐户

StoreReference

项目或接收器的存储引用。

名称 类型 说明
referenceName

string

与接收器或项目关联的资源的引用名称。

type

ReferenceNameType

定义要共享的资源的类型