libZSservicesZSamazonka-servicecatalogZSamazonka-servicecatalog
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ServiceCatalog.CreateConstraint

Description

Creates a constraint.

A delegated admin is authorized to invoke this command.

Synopsis

Creating a Request

data CreateConstraint Source #

See: newCreateConstraint smart constructor.

Constructors

CreateConstraint' 

Fields

  • acceptLanguage :: Maybe Text

    The language code.

    • en - English (default)
    • jp - Japanese
    • zh - Chinese
  • description :: Maybe Text

    The description of the constraint.

  • portfolioId :: Text

    The portfolio identifier.

  • productId :: Text

    The product identifier.

  • parameters :: Text

    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 AWS CloudFormation stack set.

    TEMPLATE
    Specify the Rules property. For more information, see Template Constraint Rules.
  • type' :: Text

    The type of constraint.

    • LAUNCH
    • NOTIFICATION
    • RESOURCE_UPDATE
    • STACKSET
    • TEMPLATE
  • idempotencyToken :: Text

    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.

Instances

Instances details
Eq CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Read CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Show CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Generic CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Associated Types

type Rep CreateConstraint :: Type -> Type #

NFData CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Methods

rnf :: CreateConstraint -> () #

Hashable CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

ToJSON CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

AWSRequest CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Associated Types

type AWSResponse CreateConstraint #

ToHeaders CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

ToPath CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

ToQuery CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

type Rep CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

type Rep CreateConstraint = D1 ('MetaData "CreateConstraint" "Amazonka.ServiceCatalog.CreateConstraint" "libZSservicesZSamazonka-servicecatalogZSamazonka-servicecatalog" 'False) (C1 ('MetaCons "CreateConstraint'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "acceptLanguage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "portfolioId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "productId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "parameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "idempotencyToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateConstraint Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

newCreateConstraint Source #

Create a value of CreateConstraint with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:acceptLanguage:CreateConstraint', createConstraint_acceptLanguage - The language code.

  • en - English (default)
  • jp - Japanese
  • zh - Chinese

$sel:description:CreateConstraint', createConstraint_description - The description of the constraint.

$sel:portfolioId:CreateConstraint', createConstraint_portfolioId - The portfolio identifier.

$sel:productId:CreateConstraint', createConstraint_productId - The product identifier.

$sel:parameters:CreateConstraint', createConstraint_parameters - 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 AWS CloudFormation stack set.

TEMPLATE
Specify the Rules property. For more information, see Template Constraint Rules.

$sel:type':CreateConstraint', createConstraint_type - The type of constraint.

  • LAUNCH
  • NOTIFICATION
  • RESOURCE_UPDATE
  • STACKSET
  • TEMPLATE

$sel:idempotencyToken:CreateConstraint', createConstraint_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.

Request Lenses

createConstraint_acceptLanguage :: Lens' CreateConstraint (Maybe Text) Source #

The language code.

  • en - English (default)
  • jp - Japanese
  • zh - Chinese

createConstraint_description :: Lens' CreateConstraint (Maybe Text) Source #

The description of the constraint.

createConstraint_parameters :: Lens' CreateConstraint Text Source #

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 AWS CloudFormation stack set.

TEMPLATE
Specify the Rules property. For more information, see Template Constraint Rules.

createConstraint_type :: Lens' CreateConstraint Text Source #

The type of constraint.

  • LAUNCH
  • NOTIFICATION
  • RESOURCE_UPDATE
  • STACKSET
  • TEMPLATE

createConstraint_idempotencyToken :: Lens' CreateConstraint Text Source #

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.

Destructuring the Response

data CreateConstraintResponse Source #

See: newCreateConstraintResponse smart constructor.

Constructors

CreateConstraintResponse' 

Fields

Instances

Instances details
Eq CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Read CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Show CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Generic CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

Associated Types

type Rep CreateConstraintResponse :: Type -> Type #

NFData CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

type Rep CreateConstraintResponse Source # 
Instance details

Defined in Amazonka.ServiceCatalog.CreateConstraint

type Rep CreateConstraintResponse = D1 ('MetaData "CreateConstraintResponse" "Amazonka.ServiceCatalog.CreateConstraint" "libZSservicesZSamazonka-servicecatalogZSamazonka-servicecatalog" 'False) (C1 ('MetaCons "CreateConstraintResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestStatus)) :*: S1 ('MetaSel ('Just "constraintDetail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ConstraintDetail))) :*: (S1 ('MetaSel ('Just "constraintParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateConstraintResponse Source #

Create a value of CreateConstraintResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:status:CreateConstraintResponse', createConstraintResponse_status - The status of the current request.

$sel:constraintDetail:CreateConstraintResponse', createConstraintResponse_constraintDetail - Information about the constraint.

$sel:constraintParameters:CreateConstraintResponse', createConstraintResponse_constraintParameters - The constraint parameters.

$sel:httpStatus:CreateConstraintResponse', createConstraintResponse_httpStatus - The response's http status code.

Response Lenses