Skip to content

CreateConstraintInput

Source code in docs_src/capo_service_catalog/types/create_constraint_input.py
class CreateConstraintInput(TypedDict, closed=True):
    accept_language: NotRequired[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ]
    """<p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>"""
    portfolio_id: "capo_service_catalog.types.id.Id"
    """<p>The portfolio identifier.</p>"""
    product_id: "capo_service_catalog.types.id.Id"
    """<p>The product identifier.</p>"""
    parameters: "capo_service_catalog.types.constraint_parameters.ConstraintParameters"
    """<p>The constraint parameters, in JSON format. The syntax depends on the constraint type as follows:</p> <dl> <dt>LAUNCH</dt> <dd> <p>You are required to specify either the <code>RoleArn</code> or the <code>LocalRoleName</code> but can't use both.</p> <p>Specify the <code>RoleArn</code> property as follows:</p> <p> <code>{"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"}</code> </p> <p>Specify the <code>LocalRoleName</code> property as follows:</p> <p> <code>{"LocalRoleName": "SCBasicLaunchRole"}</code> </p> <p>If you specify the <code>LocalRoleName</code> 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.</p> <note> <p>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.</p> </note> <p>You cannot have both a <code>LAUNCH</code> and a <code>STACKSET</code> constraint.</p> <p>You also cannot have more than one <code>LAUNCH</code> constraint on a product and portfolio.</p> </dd> <dt>NOTIFICATION</dt> <dd> <p>Specify the <code>NotificationArns</code> property as follows:</p> <p> <code>{"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]}</code> </p> </dd> <dt>RESOURCE_UPDATE</dt> <dd> <p>Specify the <code>TagUpdatesOnProvisionedProduct</code> property as follows:</p> <p> <code>{"Version":"2.0","Properties":{"TagUpdateOnProvisionedProduct":"String"}}</code> </p> <p>The <code>TagUpdatesOnProvisionedProduct</code> property accepts a string value of <code>ALLOWED</code> or <code>NOT_ALLOWED</code>.</p> </dd> <dt>STACKSET</dt> <dd> <p>Specify the <code>Parameters</code> property as follows:</p> <p> <code>{"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}}</code> </p> <p>You cannot have both a <code>LAUNCH</code> and a <code>STACKSET</code> constraint.</p> <p>You also cannot have more than one <code>STACKSET</code> constraint on a product and portfolio.</p> <p>Products with a <code>STACKSET</code> constraint will launch an CloudFormation stack set.</p> </dd> <dt>TEMPLATE</dt> <dd> <p>Specify the <code>Rules</code> property. For more information, see <a href="http://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html">Template Constraint Rules</a>.</p> </dd> </dl>"""
    type: "capo_service_catalog.types.constraint_type.ConstraintType"
    """<p>The type of constraint.</p> <ul> <li> <p> <code>LAUNCH</code> </p> </li> <li> <p> <code>NOTIFICATION</code> </p> </li> <li> <p> <code>RESOURCE_UPDATE</code> </p> </li> <li> <p> <code>STACKSET</code> </p> </li> <li> <p> <code>TEMPLATE</code> </p> </li> </ul>"""
    description: NotRequired[
        "capo_service_catalog.types.constraint_description.ConstraintDescription"
    ]
    """<p>The description of the constraint.</p>"""
    idempotency_token: "capo_service_catalog.types.idempotency_token.IdempotencyToken"
    """<p>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.</p>"""

accept_language instance-attribute

accept_language: NotRequired[AcceptLanguage]

The language code.

  • jp - Japanese

  • zh - Chinese

description instance-attribute

description: NotRequired[ConstraintDescription]

The description of the constraint.

idempotency_token instance-attribute

idempotency_token: IdempotencyToken

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.

parameters instance-attribute

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.

portfolio_id instance-attribute

portfolio_id: Id

The portfolio identifier.

product_id instance-attribute

product_id: Id

The product identifier.

type instance-attribute

The type of constraint.

  • LAUNCH

  • NOTIFICATION

  • RESOURCE_UPDATE

  • STACKSET

  • TEMPLATE