Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ServiceCatalog::Constraint

Última atualização: Jun 27, 2026

Cria uma restrição do Service Catalog para um produto em um portfólio.

Sintaxe

{
  "Type": "ALIYUN::ServiceCatalog::Constraint",
  "Properties": {
    "Config": Map,
    "ConstraintType": String,
    "PortfolioId": String,
    "ProductId": String,
    "Description": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualizável

Descrição

Restrições

Config

Map

Sim

Sim

Configuração da restrição.

Formato:

{ "LocalRoleName": "<role_name>" }

ConstraintType

String

Sim

Não

Tipo da restrição.

Valor válido: Launch (especifica uma restrição de lançamento).

PortfolioId

String

Sim

Não

ID do portfólio de produtos ao qual a restrição pertence.

Nenhuma

ProductId

String

Sim

Não

ID do produto ao qual a restrição se aplica.

Nenhuma

Description

String

Não

Sim

Descrição da restrição.

O valor deve ter de 1 a 128 caracteres.

Valores de retorno

Fn::GetAtt

ConstraintId: ID da restrição.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Config:
    Type: Json
    Description:
      en: The configuration of the constraint.
    Required: true
  PortfolioId:
    Type: String
    Description:
      en: The ID of the portfolio.
    Required: true
  ConstraintType:
    Type: String
    Description:
      en: The type of the constraint.
    Required: true
  ProductId:
    Type: String
    Description:
      en: The ID of the product.
    Required: true
Resources:
  Constraint:
    Type: ALIYUN::ServiceCatalog::Constraint
    Properties:
      Config:
        Ref: Config
      PortfolioId:
        Ref: PortfolioId
      ConstraintType:
        Ref: ConstraintType
      ProductId:
        Ref: ProductId
Outputs:
  ConstraintId:
    Description: The ID of the constraint.
    Value:
      Fn::GetAtt:
        - Constraint
        - ConstraintId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Config": {
      "Type": "Json",
      "Description": {
        "en": "The configuration of the constraint."
      },
      "Required": true
    },
    "PortfolioId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the portfolio."
      },
      "Required": true
    },
    "ConstraintType": {
      "Type": "String",
      "Description": {
        "en": "The type of the constraint."
      },
      "Required": true
    },
    "ProductId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the product."
      },
      "Required": true
    }
  },
  "Resources": {
    "Constraint": {
      "Type": "ALIYUN::ServiceCatalog::Constraint",
      "Properties": {
        "Config": {
          "Ref": "Config"
        },
        "PortfolioId": {
          "Ref": "PortfolioId"
        },
        "ConstraintType": {
          "Ref": "ConstraintType"
        },
        "ProductId": {
          "Ref": "ProductId"
        }
      }
    }
  },
  "Outputs": {
    "ConstraintId": {
      "Description": "The ID of the constraint.",
      "Value": {
        "Fn::GetAtt": [
          "Constraint",
          "ConstraintId"
        ]
      }
    }
  }
}