@azbake/ingredient-property-service

中文文档
0.3.1发布于 2026/07/23MITTypeScriptCommonJS近 30 天下载 4969

管理精品服务所需的材料.

中文使用文档
文档目录13 节
  1. 物业服务配置
  2. 成份来源
  3. 参数
  4. 变量
  5. 财产业务
  6. 属性创建操作
  7. 属性更新操作
  8. 属性删除操作
  9. 秘密行动
  10. 秘密创建操作
  11. 秘密种子操作
  12. 秘密更新操作
  13. 秘密删除操作

更改日志

概览

Property Service的成分是用于烘焙的插件. 当包含在食谱中时,这个插件将允许管道管理物业处的财产和秘密. 您可以通过指定 name 财务报告和审定财务报表 selectors 每个财产或秘密.

目前不支持加密密钥和证书 .

使用量

物业服务配置

成份来源

成分的 source 字段指定 baseUrl 财务报告和审定财务报表 resourceUrl 字段。 需要这两个领域.

  • 这个 baseUrl 财产服务处完全合格.
  • 这个 resourceUrl 是 Azure 应用程序注册的完全合格的url .
name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        # URL to the property service.
        baseUrl: https://propertyservice.com
        # URL to the application registration for the property service.
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000

参数

该成分的参数字段允许您定义一组 properties 和数组 secrets在这些阵列中,您定义 create, (中文(简体) ), update, (中文(简体) ), delete 对财产处执行的业务.

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      # Define property and secret operations.
      parameters:
        # Property create, update, and delete operations.
        properties:
          create:
          update:
          delete:
        # Secret create, update, and delete operations.
        secrets:
          create:
          update:
          delete:

变量

配置值 create, (中文(简体) ), update,以及 delete 业务支持BakeVariables。 您可以在 variables 区域,并引用 create, (中文(简体) ), update,以及 delete 操作。 在行动执行之前,BakeVariables按照各自的价值解决.

定义 variables 是可选的。 如果您选择使用 variables他们必须有独特的钥匙。 您可以在BakeVariables值内 列出任何内容.

以下例子a create 操作与 name, (中文(简体) ), value, (中文(简体) ), selectors, (中文(简体) ), contentType,以及 expirationDate {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}被解决的烤肉 variables 定义。 这个 activeDate 不使用烘焙变量.

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
 # Define your variables to be used in your create, update, and delete operations below.
variables:
  property-name: property-name
  property-value: property-value
  property-selectors:
    key1: value1
    key2: value2
  property-contentType: text/plain
  property-expirationDate: 2020-12-20 11:00:00
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          create:
            # Access your variables by using the coreutils.variables function and specifying the variable name.
            - name: "[coreutils.variable('property-name')]"
              value: "[coreutils.variable('property-value')]"
              selectors: "[coreutils.variable('property-selectors')]"
              contentType: "[coreutils.variable('property-contentType')]"
              expirationDate: "[coreutils.variable('property-expirationDate')]"
              # You can use literal values and variables together.
              activeDate: 2020-06-20 11:00:00

以上情况 create 操作将解决 variables 改为:

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
 # Define your variables to be used in your create, update, and delete operations below.
variables:
  property-name: property-name
  property-value: property-value
  property-selectors:
    key1: value1
    key2: value2
  property-contentType: text/plain
  property-expirationDate: 2020-12-20 11:00:00
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          create:
             # The above create operation will resolve to the following values:
            - name: property-name
              value: property-value
              selectors:
                key1: value1
                key2: value2
              contentType: text/plain
              expirationDate: 2020-12-20 11:00:00
              activeDate: 2020-06-20 11:00:00

财产业务

属性包含非敏感值。 当定义财产时,必须给财产一个 name (单位:千美元) value。 。 。 .

虽然 selectors 是可选的,您可能想要为您的属性定义选择器,以便您可以轻松查询和管理它.

您不会定义 selectors 当您的值不因实体而变化时。 不定义的另一个使用大小写 selectors 以该属性作为默认属性,如果您创建了默认属性,如果一个实体需要推翻默认属性,您创建了该实体的特定属性.

内部 properties 您定义了要执行的操作。 这个 properties 参数支持执行 create, (中文(简体) ), update,或 delete 操作.

属性创建操作

这个 create 操作允许您创建属性。 如果财产已经存在, 将会更新 。 如果财产与财产管理处已经储存的财产相匹配,则操作将不会执行.

财产数据类型需求说明
name字符串页:1财产名.
value字符串页:1地产价值.
selectors字符串词典物业取取者.
contentType字符串属性值的内容类型.
expirationDate日期该财产在协调世界时的到期日.
activeDate日期该财产在协调世界时的活跃日期.

注: 这个 name 财务报告和审定财务报表 selectors 组合必须是独一无二的.

属性创建验证

这个 create 操作在执行前验证以下内容.

财产验证
name数值不是空的,也不是白空的.
value数值不是空的,也不是白空的.
expirationDate值不是过去的日期.
activeDate数值大于 expirationDate,如果定义了.

属性创建示例

以下例子a create 操作被定义.

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          create:
            # The name is required.
            - name: property-name
              # The value is required.
              value: property-value
              selectors:
                key1: value1
                key2: value2
              contentType: text/plain
              expirationDate: 2020-12-20 11:00:00
              activeDate: 2020-06-20 11:00:00

属性更新操作

这个 update 操作允许您更新已有属性。 如果财产与财产管理处已经储存的财产相匹配,则操作将不会执行. 如果服务器上不存在该属性, 则会提出例外 .

这个 target 对象允许您指定 name 财务报告和审定财务报表 selectors 用于更新属性.

财产数据类型需求说明
name字符串页:1名称 property。 。 。 .
selectors字符串词典选取者 property。 。 。 .

一旦你拥有你的 target ,需要指定要更新的一个或多个值.

财产数据类型需求说明
target目标对象页:1要更新的目标属性 .
name字符串财产名.
value字符串地产价值.
selectors字符串词典物业取取者.
contentType字符串属性值的内容类型.
expirationDate日期该财产在协调世界时的到期日.
activeDate日期该财产在协调世界时的活跃日期.

注: 您必须指定 target 和要更新的一个或多个属性.

属性更新验证

这个 update 操作在执行前验证以下内容.

财产验证
activeDate数值大于 expirationDate,如果定义了.
target目标 name 既不是空的,也不是白空的.
target已经定义了一个或多个属性值 .

属性更新示例

在以下例子中 update 操作被定义。 该系统将搜索与 name 联 合 国 属性名称 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2。 。 。 .

它将更新以下价值观:

  • value 改为 财产更新价值
  • selectors 改为 键 3: 值3 财务报告和审定财务报表 键 4: 值 4
  • contentType 改为 文本/简记
  • expirationDate 改为 2030-12-20 上午11:00
name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          update:
            - target:
                # The target name is required.
                name: property-name
                selectors:
                  key1: value1
                  key2: value2
              # You must define one or more of the property values to update.
              value: property-updated-value
              selectors:
                key3: value3
                key4: value4
              contentType: text/json
              expirationDate: 2030-12-20 11:00:00

在以下例子中 update 操作被定义。 该系统将搜索与 name 联 合 国 属性名称 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2。 。 。 .

它将更新以下价值观:

  • name 改为 属性更新名称
  • value 改为 财产更新价值
name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          update:
            - target:
                # The target name is required.
                name: property-name
                selectors:
                  key1: value1
                  key2: value2
              # You must define one or more of the property values to update.
              name: property-updated-name
              value: property-updated-value

属性删除操作

这个 delete 操作允许您删除属性。 如果服务器上不存在该属性, 则会提出例外 .

财产数据类型需求说明
name字符串页:1财产名.
operator搜索操作器页:1要执行的搜索类型 .
selectors字符串词典物业取取者.

这个 operator 可以是下列值之一:

  • None:只按名称搜索属性.
  • Equals: 查找与指定的选择器相等的属性.
  • Contains: 搜索包含指定选择器的属性.

注:如果 operator 实值 None 您无法定义任何 selectors 如果 operator 实值 Equals 或者说 Contains 您必须定义一个或多个选择者.

属性删除验证

这个 delete 操作在执行前验证以下内容.

财产验证
name数值不是空的,也不是白空的.
operator值为无、等值或包含值.
selectors如果 operator 实值 None。 。 。 .
selectors值包含一个或多个密钥值对,如果 operator 实值 Equals 或者说 Contains。 。 。 .

属性删除示例

以下例子a delete 操作被定义。 该系统将搜索与 name 联 合 国 属性名称 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2 删除 property。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          delete:
            # The name is required.
            - name: property-name
              # The operator is required.
              operator: Equals
              selectors:
                key1: value1
                key2: value2

以下例子a delete 操作被定义。 该系统将搜索与 name 联 合 国 属性名称 拥有 selectors 包含到 键 1 : 值 1 删除 properties。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          delete:
            # The name is required.
            - name: property-name
              # The operator is required.
              operator: Conatins
              selectors:
                key1: value1

以下例子a delete 操作被定义。 系统将搜索属性 name 联 合 国 属性名称 删除 properties。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        properties:
          delete:
            # The name is required.
            - name: property-name
              # The operator is required.
              operator: None

秘密行动

密钥包含密码或 api 密钥等敏感值 。 当你定义一个秘密, 你必须给一个秘密 name (单位:千美元) value。 。 。 .

虽然 selectors 选项,您可能想要为您的秘密定义选择器,这样您就可以轻松地查询和管理它.

您不会定义 selectors 当您的值不因实体而变化时。 不定义的另一个使用大小写 selectors 将这个秘密作为默认的秘密,如果你创建了一个默认的秘密,如果一个实体需要推翻默认,你就会为所述实体创建一个特定的秘密.

内部 secrets 您定义了要执行的操作。 这个 secrets 参数支持执行 seed, (中文(简体) ), create, (中文(简体) ), update,或 delete 操作.

秘密创建操作

这个 create 操作允许您创建一个秘密。 如果秘密已经存在, 将会更新 。 如果秘密与财产服务处已经保存的秘密相匹配,则操作将不会被执行.

财产数据类型需求说明
name字符串页:1取出秘密之名来.
value字符串页:1秘密的价值.
selectors字符串词典密所选取者.
contentType字符串秘密值的内容类型 .
expirationDate日期该秘密在协调世界时的终止日期.
activeDate日期该秘密在协调世界时的活跃日期.

注: 这个 name 财务报告和审定财务报表 selectors 组合必须是独一无二的.

注: 写入一个值 一次 没有在以后的部署中覆盖它 - 包括 种子存储/宇宙连接字符串 connectionStringFrom - 用那个 秘密种子操作 改为 create。 。 。 .

秘密创建验证

这个 create 操作在执行前验证以下内容.

财产验证
name数值不是空的,也不是白空的.
value数值不是空的,也不是白空的.
expirationDate值不是过去的日期.
activeDate数值大于 expirationDate,如果定义了.

秘密创建示例

以下例子a create 操作被定义.

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          create:
            # The name is required.
            - name: secret-name
              # The value is required.
              value: secret-value
              selectors:
                key1: value1
                key2: value2
              contentType: text/plain
              expirationDate: 2020-12-20 11:00:00
              activeDate: 2020-06-20 11:00:00

秘密种子操作

这个 seed 操作写入一个秘密 一次。一旦秘密存在,以后的部署就是 (单位:千美元) 无 -op - 值永远不会被覆盖。 用它来做任何 价值属于.. 第一次部署后带外写入器,例如旋转进程(例如CyberArk)或 直接 Conjur -> Property Service 同步 .

seed 接受与 create (单位:千美元)name, (中文(简体) ), value, (中文(简体) ), selectors, (中文(简体) ), contentType, (中文(简体) ), expirationDate, (中文(简体) ), activeDate),因此一个字值可以被以标准方式被种子. 还有 支持 connectionStringFrom 财务报告和审定财务报表 keyFrom (仅机密)用于提供储存或宇宙 连接字符串或主键。 两者仅在 seed没有 create,并且已经 单项都互相排斥.

种子存储或宇宙连接字符串

而不是文字 value页:1 seed 条目可以来自存储账户或 Cosmos 账户 将字符串连接到属性服务,而无需查找密钥或硬码 这个值。 供应a connectionStringFrom 资料来源:

财产数据类型需求说明
type字符串页:1storage 或者说 cosmos。 。 。 .
account字符串页:1账户资源名称(例如: storage.create_resource_name()) (中文(简体) ).
resourceGroup字符串账户的可选资源组覆盖 .

行为:

  • 秘诀 名称 来源于账户名称,并且是 环境独立 (单位:千美元) dev编号 :prd 前缀被剥去,所以每个消费者 同一个账户 - 和任何旋转 自动化 - 商定单一名称,例如 stexpl-connectionstring任意 区域代码 保留账户名称,因此每个区域账户(例如活动/活动或活动/被动)映射到 独立 保密(euscosmsexpl-connectionstring, (中文(简体) ), wuscosmsexpl-connectionstring更喜欢 而不是撞上一个。 您仍可提供明确 name 以覆盖衍生名称 - 例如,将全球分布的单一账户合并为一个区域独立名称.
  • 因为它是一个 seed一旦秘密存在 行动就是 无 -op - 关键是永远不要 重读和现有值( 例如, 由旋转过程管理的一个值) 永远不会 覆写. 最初部署的种子;后来部署的种子,包括其他部署的种子 共享账户的服务,什么都不做.
  • 连接字符串被拉动 懒散只有在秘密需要播种的时候 如果 尚未读取源账户( 例如, 在资源之前部署的消费者) 操作被跳过而不是失败部署.

下面的例子将种子与 condition: "[coreutils.current_region_primary()]",所以这个 一个账户从主要区域运行一次。 对于 活动/活动或活动/被动 具有每个区域单独账户的地形, 省略这个条件 所以种子在每一个中运行 区域 - 每一区域都根据自己的区域合格名称建立自己的账户,同时保留两个区域 可用的连接字符串 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-storage@~0"
  - "@azbake/ingredient-property-service@~0"
resourceGroup: true
parallelRegions: false
variables:
  storageAccountName: "[storage.create_resource_name()]"
recipe:
  expl-storage:
    properties:
      type: "@azbake/ingredient-storage"
      source: ""
      parameters:
        storageAccountName: "[coreutils.variable('storageAccountName')]"
  expl-seed-connstring:
    properties:
      type: "@azbake/ingredient-property-service"
      condition: "[coreutils.current_region_primary()]"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          seed:
            - connectionStringFrom:
                type: storage
                account: "[coreutils.variable('storageAccountName')]"
              # name auto-derives to stexpl-connectionstring
    dependsOn:
      - expl-storage

种子存储或宇宙主密钥

当消费者需要原始账户时 主密钥 而不是一个完整的连接字符串,使用 keyFrom 改为 connectionStringFrom。它的行为相同 - 名称是衍生的 值是懒惰地拉取的,一旦秘密存在,种子就是一种无声无息的无声-但 种子值是账户的主要密钥( y)storage.get_primary_key 编号 : cosmosdbutils.get_primary_key) (中文(简体) ).

财产数据类型需求说明
type字符串页:1storage 或者说 cosmos。 。 。 .
account字符串页:1账户资源名称(例如: storage.create_resource_name()) (中文(简体) ).
resourceGroup字符串账户的可选资源组覆盖 .

衍生的秘密 名称 是环境独立账户名称,带有 -key 后缀 (例如:. stexpl-key),遵循与下列规则相同的封存/区域保留规则: connectionStringFrom。 。 。 . connectionStringFrom 财务报告和审定财务报表 keyFrom 单人独占 seed 输入.

        secrets:
          seed:
            - keyFrom:
                type: storage
                account: "[coreutils.variable('storageAccountName')]"
              # name auto-derives to stexpl-key

正在寻找一个康茹尔支持的管道秘密

其价值来自管道(一个ADO秘密变量)的秘密可以同样的方式被播种. 使用 create 当管道是 独家 真相来源 - 它治愈物业局 回到每次部署的申报值.

如果同一秘密也写给财产局,例如直接 Conjur -> Property Service 同步,可以更新速度快于 Conjur -> ADO 变量同步 - 然后,上升的风险 覆盖较新鲜的价值 用滞后的管道价值。 把它放进去 seed 所以,烘焙写这个秘密一次 并留下持续更新的作者:

        secrets:
          seed:
            - name: my-conjur-secret
              value: "[coreutils.variable('MY_ADO_SECRET_VAR')]"

使用 create 只用于没有其他写入器的管道配置; 使用 seed 对于任何秘密 外部程序在财产处保持当前状态.

秘密更新操作

这个 update 操作允许您更新已有的秘密。 如果秘密与财产服务处已经保存的秘密相匹配,则操作将不会被执行. 如果服务器上不存在这个秘密, 将会提出一个例外 .

这个 target 对象允许您指定 name 财务报告和审定财务报表 selectors 您想要更新的秘密.

财产数据类型需求说明
name字符串页:1名称 secret。 。 。 .
selectors字符串词典选取者 secret。 。 。 .

一旦你拥有你的 target ,需要指定要更新的一个或多个值.

财产数据类型需求说明
target目标对象页:1要更新的目标秘密 .
name字符串取出秘密之名来.
value字符串秘密的价值.
selectors字符串词典密所选取者.
contentType字符串秘密值的内容类型 .
expirationDate日期该秘密在协调世界时的终止日期.
activeDate日期该秘密在协调世界时的活跃日期.

注: 您必须指定 target 以及需要更新的一个或多个秘密.

秘密更新验证

这个 update 操作在执行前验证以下内容.

财产验证
activeDate数值大于 expirationDate,如果定义了.
target目标 name 既不是空的,也不是白空的.
target已经定义了一个或多个秘密值 .

秘密更新示例

在以下例子中 update 操作被定义。 系统将寻找一个秘密 name 联 合 国 密码 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2。 。 。 .

它将更新以下价值观:

  • value 改为秘密更新值
  • selectors 改为 键 3: 值3 财务报告和审定财务报表 键 4: 值 4
  • contentType 改为 文本/简记
  • expirationDate 改为 2030-12-20 上午11:00
name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          update:
            - target:
                # The target name is required.
                name: secret-name
                selectors:
                  key1: value1
                  key2: value2
              # You must define one or more of the secrets values to update.
              value: secret-updated-value
              selectors:
                key3: value3
                key4: value4
              contentType: text/json
              expirationDate: 2030-12-20 11:00:00

在以下例子中 update 操作被定义。 系统将寻找一个秘密 name 联 合 国 密码 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2。 。 。 .

它将更新以下价值观:

  • name 改为 加密更新名称
  • value 改为 加密更新值
name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          update:
            - target:
                # The target name is required.
                name: secret-name
                selectors:
                  key1: value1
                  key2: value2
              # You must define one or more of the secrets values to update.
              name: secret-updated-name
              value: secret-updated-value

秘密删除操作

这个 delete 操作允许您删除机密。 如果服务器上不存在这个秘密, 将会提出一个例外 .

财产数据类型需求说明
name字符串页:1取出秘密之名来.
operator搜索操作器页:1要执行的搜索类型 .
selectors字符串词典密所选取者.
allVersions布尔true 删除全部版本 secret,否则只删除当前版本.

这个 operator 可以是下列值之一:

  • None:只用名字搜索秘密.
  • Equals: 搜索与指定的选择者相等的秘密.
  • Contains:搜索包含指定选择者的秘密.

注:如果 operator 实值 None 您无法定义任何 selectors 如果 operator 实值 Equals 或者说 Contains 您必须定义一个或多个选择者.

秘密删除验证

这个 delete 操作在执行前验证以下内容.

财产验证
name数值不是空的,也不是白空的.
operator值为无、等值或包含值.
selectors如果 operator 实值 None。 。 。 .
selectors值包含一个或多个密钥值对,如果 operator 实值 Equals 或者说 Contains。 。 。 .

秘密删除示例

以下例子a delete 操作被定义。 系统将寻找一个秘密 name 联 合 国 密码 拥有 selectors 等于 键 1 : 值 1 财务报告和审定财务报表 键 2 : 值 2 并删除全部版本 secret。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          delete:
            # The name is required.
            - name: secret-name
              # The operator is required.
              operator: Equals
              selectors:
                key1: value1
                key2: value2
              allVersions: true

以下例子a delete 操作被定义。 系统将寻找一个秘密 name 联 合 国 密码 拥有 selectors 包含到 键 1 : 值 1 并只删除最新版本 secret。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          delete:
            # The name is required.
            - name: secret-name
              # The operator is required.
              operator: Conatins
              selectors:
                key1: value1
              allVersions: false

以下例子a delete 操作被定义。 该系统将寻找一个秘密 name 联 合 国 密码 并删除全部版本 secret。 。 。 .

name: Package Example
shortName: expl
version: 1.0.0
ingredients:
  - "@azbake/ingredient-property-service@~0"
resourceGroup: false
parallelRegions: false
variables:
recipe:
  property-service:
    properties:
      type: "@azbake/ingredient-property-service"
      source:
        baseUrl: https://propertyservice.com
        resourceUrl: https://azure.onmicrosoft.com/00000000-0000-0000-0000-000000000000
      parameters:
        secrets:
          delete:
            # The name is required.
            - name: secret-name
              # The operator is required.
              operator: None
              allVersions: true

版本与发布记录

@azbake/ingredient-property-service 共发布 55 个版本,首次发布于 2020/05/13;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.3.1latest2026/07/233 个月前
0.3.02026/07/223 个月前
0.2.02026/07/213 个月前
0.1.542024/07/252 年前
0.1.532024/07/242 年前
0.1.502023/08/013 年前

关于 @azbake/ingredient-property-service 的常见问题

@azbake/ingredient-property-service 是什么?

管理精品服务所需的材料.

如何安装 @azbake/ingredient-property-service?

在项目目录运行 npm install @azbake/ingredient-property-service,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@azbake/core(*)、@azure/ms-rest-nodeauth(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@azbake/ingredient-property-service 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@azbake/ingredient-property-service 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@azbake/ingredient-property-service 可以商用吗?

@azbake/ingredient-property-service 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@azbake/ingredient-property-service 的下载量有多少?

根据 npm 官方下载统计,@azbake/ingredient-property-service 在 2026/10/08 – 2026/11/06 这 30 天内被下载 4,969 次,日均约 166 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@azbake/ingredient-property-service 还在维护吗?

最新版本 0.3.1 发布于 2026/07/23(3 个月前);至今共发布 55 个版本,其中过去 12 个月发布了 3 个;首次发布于 2020/05/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。