All Products
Search
Document Center

Service Catalog:CreateConstraint

Last Updated:Mar 03, 2024

Creates a constraint.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ConstraintTypestringYes

The type of the constraint.

The value is fixed as Launch, which specifies the launch constraint.

Launch
ConfigstringYes

The configuration of the constraint.

Format: { "LocalRoleName": "<role_name>" }.

{ "LocalRoleName": "TestRole" }
DescriptionstringNo

The description of the constraint.

The value must be 1 to 128 characters in length.

Launch as local role TestRole
PortfolioIdstringYes

The ID of the product portfolio to which the constraint belongs.

port-bp1yt7582g****
ProductIdstringYes

The ID of the product for which the constraint is created.

prod-bp18r7q127****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

0FEEF92D-4052-5202-87D0-3D8EC16F81BF
ConstraintIdstring

The ID of the constraint.

cons-bp1yx7x42v****

Examples

Sample success responses

JSONformat

{
  "RequestId": "0FEEF92D-4052-5202-87D0-3D8EC16F81BF",
  "ConstraintId": "cons-bp1yx7x42v****"
}

Error codes

HTTP status codeError codeError message
500InternalErrorA system error occurred.

For a list of error codes, visit the Service error codes.