Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a constraint.
A delegated admin is authorized to invoke this command.
Synopsis
- data CreateConstraint = CreateConstraint' {
- acceptLanguage :: Maybe Text
- description :: Maybe Text
- portfolioId :: Text
- productId :: Text
- parameters :: Text
- type' :: Text
- idempotencyToken :: Text
- newCreateConstraint :: Text -> Text -> Text -> Text -> Text -> CreateConstraint
- createConstraint_acceptLanguage :: Lens' CreateConstraint (Maybe Text)
- createConstraint_description :: Lens' CreateConstraint (Maybe Text)
- createConstraint_portfolioId :: Lens' CreateConstraint Text
- createConstraint_productId :: Lens' CreateConstraint Text
- createConstraint_parameters :: Lens' CreateConstraint Text
- createConstraint_type :: Lens' CreateConstraint Text
- createConstraint_idempotencyToken :: Lens' CreateConstraint Text
- data CreateConstraintResponse = CreateConstraintResponse' {}
- newCreateConstraintResponse :: Int -> CreateConstraintResponse
- createConstraintResponse_status :: Lens' CreateConstraintResponse (Maybe RequestStatus)
- createConstraintResponse_constraintDetail :: Lens' CreateConstraintResponse (Maybe ConstraintDetail)
- createConstraintResponse_constraintParameters :: Lens' CreateConstraintResponse (Maybe Text)
- createConstraintResponse_httpStatus :: Lens' CreateConstraintResponse Int
Creating a Request
data CreateConstraint Source #
See: newCreateConstraint
smart constructor.
CreateConstraint' | |
|
Instances
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
- Japanesezh
- 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 theLocalRoleName
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 aSTACKSET
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 ofALLOWED
orNOT_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 aSTACKSET
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
- Japanesezh
- Chinese
createConstraint_description :: Lens' CreateConstraint (Maybe Text) Source #
The description of the constraint.
createConstraint_portfolioId :: Lens' CreateConstraint Text Source #
The portfolio identifier.
createConstraint_productId :: Lens' CreateConstraint Text Source #
The product identifier.
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 theLocalRoleName
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 aSTACKSET
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 ofALLOWED
orNOT_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 aSTACKSET
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.
CreateConstraintResponse' | |
|
Instances
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
createConstraintResponse_status :: Lens' CreateConstraintResponse (Maybe RequestStatus) Source #
The status of the current request.
createConstraintResponse_constraintDetail :: Lens' CreateConstraintResponse (Maybe ConstraintDetail) Source #
Information about the constraint.
createConstraintResponse_constraintParameters :: Lens' CreateConstraintResponse (Maybe Text) Source #
The constraint parameters.
createConstraintResponse_httpStatus :: Lens' CreateConstraintResponse Int Source #
The response's http status code.