constraints
Creates, updates, deletes, gets or lists a constraints resource.
Overview
| Name | constraints |
| Type | Resource |
| Id | aws.servicecatalog.constraints |
Fields
The following fields are returned by SELECT queries:
- describe_constraint
| Name | Datatype | Description |
|---|---|---|
constraint_detail | object | Information about the constraint. |
constraint_parameters | string | The constraint parameters. |
status | string | The status of the current request. (AVAILABLE, CREATING, FAILED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_constraint | select | region | Gets information about the specified constraint. | |
create_constraint | insert | region, PortfolioId, ProductId, Parameters, Type, IdempotencyToken | Creates a constraint. A delegated admin is authorized to invoke this command. | |
update_constraint | update | region, Id | Updates the specified constraint. | |
delete_constraint | delete | region | Deletes the specified constraint. A delegated admin is authorized to invoke this command. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_constraint
Gets information about the specified constraint.
SELECT
constraint_detail,
constraint_parameters,
status
FROM aws.servicecatalog.constraints
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_constraint
- Manifest
Creates a constraint. A delegated admin is authorized to invoke this command.
INSERT INTO aws.servicecatalog.constraints (
AcceptLanguage,
PortfolioId,
ProductId,
Parameters,
Type,
Description,
IdempotencyToken,
region
)
SELECT
'{{ AcceptLanguage }}',
'{{ PortfolioId }}' /* required */,
'{{ ProductId }}' /* required */,
'{{ Parameters }}' /* required */,
'{{ Type }}' /* required */,
'{{ Description }}',
'{{ IdempotencyToken }}' /* required */,
'{{ region }}'
RETURNING
constraint_detail,
constraint_parameters,
status
;
# Description fields are for documentation purposes
- name: constraints
props:
- name: region
value: "{{ region }}"
description: Required parameter for the constraints resource.
- name: AcceptLanguage
value: "{{ AcceptLanguage }}"
description: |
The language code. jp - Japanese zh - Chinese
- name: PortfolioId
value: "{{ PortfolioId }}"
description: |
The portfolio identifier.
- name: ProductId
value: "{{ ProductId }}"
description: |
The product identifier.
- name: Parameters
value: "{{ Parameters }}"
description: |
The constraint parameters, in JSON format. The syntax depends on the constraint type as follows: LAUNCH You are required to specify either the RoleArn or the LocalRoleName but can't use both. Specify the RoleArn property as follows: {"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"} Specify the LocalRoleName property as follows: {"LocalRoleName": "SCBasicLaunchRole"} If you specify the LocalRoleName property, when an account uses the launch constraint, the IAM role with that name in the account will be used. This allows launch-role constraints to be account-agnostic so the administrator can create fewer resources per shared account. The given role name must exist in the account used to create the launch constraint and the account of the user who launches a product with this launch constraint. You cannot have both a LAUNCH and a STACKSET constraint. You also cannot have more than one LAUNCH constraint on a product and portfolio. NOTIFICATION Specify the NotificationArns property as follows: {"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]} RESOURCE_UPDATE Specify the TagUpdatesOnProvisionedProduct property as follows: {"Version":"2.0","Properties":{"TagUpdateOnProvisionedProduct":"String"}} The TagUpdatesOnProvisionedProduct property accepts a string value of ALLOWED or NOT_ALLOWED. STACKSET Specify the Parameters property as follows: {"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}} You cannot have both a LAUNCH and a STACKSET constraint. You also cannot have more than one STACKSET constraint on a product and portfolio. Products with a STACKSET constraint will launch an CloudFormation stack set. TEMPLATE Specify the Rules property. For more information, see Template Constraint Rules.
- name: Type
value: "{{ Type }}"
description: |
The type of constraint. LAUNCH NOTIFICATION RESOURCE_UPDATE STACKSET TEMPLATE
- name: Description
value: "{{ Description }}"
description: |
The description of the constraint.
- name: IdempotencyToken
value: "{{ IdempotencyToken }}"
description: |
A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.
UPDATE examples
- update_constraint
Updates the specified constraint.
UPDATE aws.servicecatalog.constraints
SET
AcceptLanguage = '{{ AcceptLanguage }}',
Id = '{{ Id }}',
Description = '{{ Description }}',
Parameters = '{{ Parameters }}'
WHERE
region = '{{ region }}' --required
AND Id = '{{ Id }}' --required
RETURNING
constraint_detail,
constraint_parameters,
status;
DELETE examples
- delete_constraint
Deletes the specified constraint. A delegated admin is authorized to invoke this command.
DELETE FROM aws.servicecatalog.constraints
WHERE region = '{{ region }}' --required
;