Accounts - Create
在给定资源组中创建帐户
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}?api-version=2021-08-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
account
|
path | True |
string |
共享帐户的名称。 |
|
resource
|
path | True |
string |
资源组名称。 |
|
subscription
|
path | True |
string |
订阅标识符 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| identity | True |
帐户上的标识信息 |
|
| location |
string |
Azure 资源的位置。 |
|
| tags |
object |
Azure 资源上的标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功 |
|
| 201 Created |
成功 |
|
| Other Status Codes |
从 Microsoft.DataShare 资源提供程序收到的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Accounts_Create
示例请求
PUT https://management.azure.com/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.DataShare/accounts/Account1?api-version=2021-08-01
{
"location": "West US 2",
"tags": {
"tag1": "Red",
"tag2": "White"
},
"identity": {
"type": "SystemAssigned"
}
}
示例响应
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-tenant-reads: 14999
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
{
"properties": {
"userName": "John Smith",
"createdAt": "2018-11-14T04:47:52.9614956Z",
"userEmail": "johnsmith@microsoft.com"
},
"location": "West US 2",
"tags": {
"tag1": "Red",
"tag2": "White"
},
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
},
"identity": {
"type": "SystemAssigned"
},
"id": "/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.DataShare/accounts/Account1",
"name": "Account1",
"type": "Microsoft.DataShare/accounts"
}
Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-tenant-reads: 14999
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
{
"properties": {
"userName": "John Smith",
"createdAt": "2018-11-14T04:47:52.9614956Z",
"userEmail": "johnsmith@microsoft.com"
},
"location": "West US 2",
"tags": {
"tag1": "Red",
"tag2": "White"
},
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-01-01T17:18:19.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
},
"identity": {
"type": "SystemAssigned"
},
"id": "/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.DataShare/accounts/Account1",
"name": "Account1",
"type": "Microsoft.DataShare/accounts"
}
定义
| 名称 | 说明 |
|---|---|
| Account |
帐户数据传输对象。 |
|
created |
创建资源的标识的类型。 |
|
Data |
数据共享错误模型。 |
|
Data |
数据共享错误正文模型。 |
| Identity |
资源的标识 |
|
last |
上次修改资源的标识的类型。 |
|
provisioning |
帐户的预配状态 |
|
System |
与创建和上次修改资源相关的元数据。 |
| type |
标识类型 |
Account
帐户数据传输对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
Azure 资源的资源 ID |
| identity |
帐户上的标识信息 |
|
| location |
string |
Azure 资源的位置。 |
| name |
string |
Azure 资源的名称 |
| properties.createdAt |
string (date-time) |
创建帐户的时间。 |
| properties.provisioningState |
帐户的预配状态 |
|
| properties.userEmail |
string |
创建资源的用户的电子邮件 |
| properties.userName |
string |
创建资源的用户的名称 |
| systemData |
Azure 资源的系统数据。 |
|
| tags |
object |
Azure 资源上的标记。 |
| type |
string |
Azure 资源的类型 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DataShareError
数据共享错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
数据共享错误正文 |
DataShareErrorInfo
数据共享错误正文模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的代码 |
| details |
错误模型的嵌套详细信息 |
|
| message |
string |
错误的消息 |
| target |
string |
错误目标 |
Identity
资源的标识
| 名称 | 类型 | 说明 |
|---|---|---|
| principalId |
string |
服务主体 ID |
| tenantId |
string |
租户 ID |
| type |
标识类型 |
lastModifiedByType
上次修改资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
provisioningState
帐户的预配状态
| 值 | 说明 |
|---|---|
| Succeeded | |
| Creating | |
| Deleting | |
| Moving | |
| Failed |
SystemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改资源的标识的类型。 |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
type
标识类型
| 值 | 说明 |
|---|---|
| SystemAssigned |