全部产品
Search
文档中心

资源编排:ALIYUN::DEVOPS::PipelineRelations

更新时间:Aug 12, 2024

ALIYUN::DEVOPS::PipelineRelations类型用于添加流水线关联。

语法

{
  "Type": "ALIYUN::DEVOPS::PipelineRelations",
  "Properties": {
    "RelObjectType": String,
    "RelObjectIds": List,
    "PipelineId": Number,
    "OrganizationId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

RelObjectType

String

关联的资源类型。

暂只支持VARIABLE_GROUP。

RelObjectIds

List

关联的资源ID。

暂只支持变量组ID。

PipelineId

Number

流水线ID。

可在流水线链接中获取。例如:https://flow.aliyun.com/pipelines/【PipelineId】/current

OrganizationId

String

企业标识,也称企业ID。

字符串形式,可在云效访问链接中获取。例如:https:// devops.aliyun.com/organization/【OrgId】

返回值

Fn::GetAtt

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      OrganizationId:
        Description:
          en: Corporate identity, also known as enterprise id, can obtain in cloud effect
            access links.
        Type: String
      PipelineId:
        Description:
          en: The pipeline ID, which can be obtained from the pipeline link.
        Type: Number
      RelObjectIds:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            Type: Number
        Description:
          en: Ids of the associated resource. For now, only variable group ids are supported.
        Type: Json
      RelObjectType:
        Description:
          en: 'Associated resource type. Valid values:
    
            - VARIABLE_GROUP
    
            - OOS_APP_ID
    
            For now, only VARIABLE GROUP is supported. '
        Type: String
    Resources:
      PipelineRelations:
        Properties:
          OrganizationId:
            Ref: OrganizationId
          PipelineId:
            Ref: PipelineId
          RelObjectIds:
            Ref: RelObjectIds
          RelObjectType:
            Ref: RelObjectType
        Type: ALIYUN::DEVOPS::PipelineRelations
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RelObjectType": {
          "Type": "String",
          "Description": {
            "en": "Associated resource type. Valid values:\n- VARIABLE_GROUP\n- OOS_APP_ID\nFor now, only VARIABLE GROUP is supported. "
          }
        },
        "RelObjectIds": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "Number"
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "Ids of the associated resource. For now, only variable group ids are supported."
          }
        },
        "PipelineId": {
          "Type": "Number",
          "Description": {
            "en": "The pipeline ID, which can be obtained from the pipeline link."
          }
        },
        "OrganizationId": {
          "Type": "String",
          "Description": {
            "en": "Corporate identity, also known as enterprise id, can obtain in cloud effect access links."
          }
        }
      },
      "Resources": {
        "PipelineRelations": {
          "Type": "ALIYUN::DEVOPS::PipelineRelations",
          "Properties": {
            "RelObjectType": {
              "Ref": "RelObjectType"
            },
            "RelObjectIds": {
              "Ref": "RelObjectIds"
            },
            "PipelineId": {
              "Ref": "PipelineId"
            },
            "OrganizationId": {
              "Ref": "OrganizationId"
            }
          }
        }
      }
    }