Artifact Stores - Create Or Update
创建或更新项目存储。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/publishers/{publisherName}/artifactStores/{artifactStoreName}?api-version=2023-09-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
artifact
|
path | True |
string maxLength: 64pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$ |
项目存储的名称。 |
|
publisher
|
path | True |
string maxLength: 64pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$ |
发布者的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| location | True |
string |
资源所在的地理位置 |
| properties |
ArtifactStores 属性。 |
||
| tags |
object |
资源标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
创建或更新作已成功完成。 该作返回生成的 ArtifactStore 子资源。 |
|
| 201 Created |
创建或更新作已成功完成。 该作返回生成的 ArtifactStore 子资源。 |
|
| Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Create or update an artifact store of publisher resource
示例请求
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.HybridNetwork/publishers/TestPublisher/artifactStores/TestArtifactStore?api-version=2023-09-01
{
"location": "eastus",
"properties": {
"storeType": "AzureContainerRegistry",
"replicationStrategy": "SingleReplication",
"managedResourceGroupConfiguration": {
"name": "testRg",
"location": "eastus"
}
}
}
示例响应
{
"name": "TestArtifactStore",
"id": "/subscriptions/subid/providers/microsoft.hybridnetwork/publishers/TestPublisher/artifactStores/TestArtifactStore",
"type": "microsoft.hybridnetwork/publishers/artifactStores",
"location": "eastus",
"properties": {
"storeType": "AzureContainerRegistry",
"replicationStrategy": "SingleReplication",
"storageResourceId": "TestResourceId",
"managedResourceGroupConfiguration": {
"name": "testRg",
"location": "eastus"
}
}
}
{
"name": "TestArtifactStore",
"id": "/subscriptions/subid/providers/microsoft.hybridnetwork/publishers/TestPublisher/artifactStores/TestArtifactStore",
"type": "microsoft.hybridnetwork/publishers/artifactStores",
"location": "eastus",
"properties": {
"storeType": "AzureContainerRegistry",
"replicationStrategy": "SingleReplication",
"storageResourceId": "TestResourceId",
"managedResourceGroupConfiguration": {
"name": "testRg",
"location": "eastus"
}
}
}
定义
| 名称 | 说明 |
|---|---|
|
Artifact |
复制策略。 |
|
Artifact |
项目存储属性。 |
|
Artifact |
项目存储属性。 |
|
Artifact |
项目存储类型。 |
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Managed |
|
|
Provisioning |
当前预配状态。 |
|
system |
与创建和上次修改资源相关的元数据。 |
ArtifactReplicationStrategy
复制策略。
| 值 | 说明 |
|---|---|
| Unknown | |
| SingleReplication |
ArtifactStore
项目存储属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties |
ArtifactStores 属性。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ArtifactStorePropertiesFormat
项目存储属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| managedResourceGroupConfiguration | ||
| provisioningState |
应用程序组资源的预配状态。 |
|
| replicationStrategy |
复制策略。 |
|
| storageResourceId |
string |
创建的存储资源 ID |
| storeType |
项目存储类型。 |
ArtifactStoreType
项目存储类型。
| 值 | 说明 |
|---|---|
| Unknown | |
| AzureContainerRegistry | |
| AzureStorageAccount |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ManagedResourceGroupConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| location |
string |
托管资源组位置。 |
| name |
string |
托管资源组名称。 |
ProvisioningState
当前预配状态。
| 值 | 说明 |
|---|---|
| Unknown | |
| Succeeded | |
| Accepted | |
| Deleting | |
| Failed | |
| Canceled | |
| Deleted | |
| Converging |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |