All Products
Search
Document Center

Service Catalog:GetConstraint

Last Updated:Mar 03, 2024

Queries the information about 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
ConstraintIdstringYes

The ID of the constraint.

cons-bp1yx7x42v****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

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

The details of the constraint.

Configstring

The configuration of the constraint.

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

{ "LocalRoleName": "TestRole" }
Descriptionstring

The description of the constraint.

Launch as local role TestRole
CreateTimestring

The time when the constraint was created.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-04-12T06:11:26Z
ConstraintIdstring

The ID of the constraint.

cons-bp1yx7x42v****
PortfolioIdstring

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

port-bp1yt7582g****
ProductIdstring

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

prod-bp18r7q127****
ConstraintTypestring

The type of the constraint.

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

Launch
ProductNamestring

The name of the product.

DEMO-Create an ECS instance.

Examples

Sample success responses

JSONformat

{
  "RequestId": "0FEEF92D-4052-5202-87D0-3D8EC16F81BF",
  "ConstraintDetail": {
    "Config": "{ \"LocalRoleName\": \"TestRole\" }",
    "Description": "Launch as local role TestRole",
    "CreateTime": "2022-04-12T06:11:26Z",
    "ConstraintId": "cons-bp1yx7x42v****",
    "PortfolioId": "port-bp1yt7582g****",
    "ProductId": "prod-bp18r7q127****",
    "ConstraintType": "Launch",
    "ProductName": "DEMO-Create an ECS instance.\n"
  }
}

Error codes

HTTP status codeError codeError message
500InternalErrorA system error occurred.

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