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

Microsoft.ContainerRegistry registries/credentialSets 2023-01-01-preview

Bicep 资源定义

可以使用目标操作部署 registries/credentialSets 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/credentialSets 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ContainerRegistry/registries/credentialSets@2023-01-01-preview' = {
  parent: resourceSymbolicName
  identity: {
    principalId: 'string'
    tenantId: 'string'
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {
        clientId: 'string'
        principalId: 'string'
      }
    }
  }
  name: 'string'
  properties: {
    authCredentials: [
      {
        name: 'string'
        passwordSecretIdentifier: 'string'
        usernameSecretIdentifier: 'string'
      }
    ]
    loginServer: 'string'
  }
}

属性值

AuthCredential

名字 描述 价值
名字 凭据的名称。 “Credential1”
passwordSecretIdentifier 用于访问密码的 KeyVault 机密 URI。 字符串
usernameSecretIdentifier 用于访问用户名的 KeyVault 机密 URI。 字符串

CredentialSetProperties

名字 描述 价值
authCredentials 为上游存储的身份验证凭据列表。
通常由主凭据和可选的辅助凭据组成。
AuthCredential[]
loginServer 凭据存储于此上游服务器或登录服务器。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/credentialSets

名字 描述 价值
身份 与资源关联的标识。 这用于访问 KeyVault 机密。 IdentityProperties
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
父母 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源
类型资源的符号名称:注册表
性能 凭据集的属性。 CredentialSetProperties

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串

ARM 模板资源定义

可以使用目标操作部署 registries/credentialSets 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/credentialSets 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ContainerRegistry/registries/credentialSets",
  "apiVersion": "2023-01-01-preview",
  "name": "string",
  "identity": {
    "principalId": "string",
    "tenantId": "string",
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
        "clientId": "string",
        "principalId": "string"
      }
    }
  },
  "properties": {
    "authCredentials": [
      {
        "name": "string",
        "passwordSecretIdentifier": "string",
        "usernameSecretIdentifier": "string"
      }
    ],
    "loginServer": "string"
  }
}

属性值

AuthCredential

名字 描述 价值
名字 凭据的名称。 “Credential1”
passwordSecretIdentifier 用于访问密码的 KeyVault 机密 URI。 字符串
usernameSecretIdentifier 用于访问用户名的 KeyVault 机密 URI。 字符串

CredentialSetProperties

名字 描述 价值
authCredentials 为上游存储的身份验证凭据列表。
通常由主凭据和可选的辅助凭据组成。
AuthCredential[]
loginServer 凭据存储于此上游服务器或登录服务器。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/credentialSets

名字 描述 价值
apiVersion API 版本 '2023-01-01-preview'
身份 与资源关联的标识。 这用于访问 KeyVault 机密。 IdentityProperties
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
性能 凭据集的属性。 CredentialSetProperties
类型 资源类型 “Microsoft.ContainerRegistry/registries/credentialSets”

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串

用法示例

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 registries/credentialSets 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ContainerRegistry/registries/credentialSets 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ContainerRegistry/registries/credentialSets@2023-01-01-preview"
  name = "string"
  identity = {
    principalId = "string"
    tenantId = "string"
    type = "string"
    userAssignedIdentities = {
      {customized property} = {
        clientId = "string"
        principalId = "string"
      }
    }
  }
  body = {
    properties = {
      authCredentials = [
        {
          name = "string"
          passwordSecretIdentifier = "string"
          usernameSecretIdentifier = "string"
        }
      ]
      loginServer = "string"
    }
  }
}

属性值

AuthCredential

名字 描述 价值
名字 凭据的名称。 “Credential1”
passwordSecretIdentifier 用于访问密码的 KeyVault 机密 URI。 字符串
usernameSecretIdentifier 用于访问用户名的 KeyVault 机密 URI。 字符串

CredentialSetProperties

名字 描述 价值
authCredentials 为上游存储的身份验证凭据列表。
通常由主凭据和可选的辅助凭据组成。
AuthCredential[]
loginServer 凭据存储于此上游服务器或登录服务器。 字符串

IdentityProperties

名字 描述 价值
principalId 资源标识的主体 ID。 字符串
tenantId 资源的租户 ID。 字符串
类型 标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识
字典键引用的格式为 ARM 资源 ID:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
IdentityPropertiesUserAssignedIdentities

IdentityPropertiesUserAssignedIdentities

名字 描述 价值

Microsoft.ContainerRegistry/registries/credentialSets

名字 描述 价值
身份 与资源关联的标识。 这用于访问 KeyVault 机密。 IdentityProperties
名字 资源名称 字符串

约束:
最小长度 = 5
最大长度 = 50
模式 = ^[a-zA-Z0-9-]*$ (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:注册表
性能 凭据集的属性。 CredentialSetProperties
类型 资源类型 “Microsoft.ContainerRegistry/registries/credentialSets@2023-01-01-preview”

UserIdentityProperties

名字 描述 价值
clientId 用户分配标识的客户端 ID。 字符串
principalId 用户分配标识的主体 ID。 字符串