/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the servicecatalog-2015-12-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ServiceCatalog.Model
{
///
/// Container for the parameters to the CreateConstraint operation.
/// Creates a constraint.
///
///
///
/// A delegated admin is authorized to invoke this command.
///
///
public partial class CreateConstraintRequest : AmazonServiceCatalogRequest
{
private string _acceptLanguage;
private string _description;
private string _idempotencyToken;
private string _parameters;
private string _portfolioId;
private string _productId;
private string _type;
///
/// Gets and sets the property AcceptLanguage.
///
/// The language code.
///
/// -
///
///
jp
- Japanese
///
/// -
///
///
zh
- Chinese
///
///
///
[AWSProperty(Max=100)]
public string AcceptLanguage
{
get { return this._acceptLanguage; }
set { this._acceptLanguage = value; }
}
// Check to see if AcceptLanguage property is set
internal bool IsSetAcceptLanguage()
{
return this._acceptLanguage != null;
}
///
/// Gets and sets the property Description.
///
/// The description of the constraint.
///
///
[AWSProperty(Max=2000)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=128)]
public string IdempotencyToken
{
get { return this._idempotencyToken; }
set { this._idempotencyToken = value; }
}
// Check to see if IdempotencyToken property is set
internal bool IsSetIdempotencyToken()
{
return this._idempotencyToken != null;
}
///
/// Gets and sets the property 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 CloudFormation stack
/// set.
///
/// - TEMPLATE
-
///
/// Specify the
Rules
property. For more information, see Template
/// Constraint Rules.
///
///
///
[AWSProperty(Required=true)]
public string Parameters
{
get { return this._parameters; }
set { this._parameters = value; }
}
// Check to see if Parameters property is set
internal bool IsSetParameters()
{
return this._parameters != null;
}
///
/// Gets and sets the property PortfolioId.
///
/// The portfolio identifier.
///
///
[AWSProperty(Required=true, Min=1, Max=100)]
public string PortfolioId
{
get { return this._portfolioId; }
set { this._portfolioId = value; }
}
// Check to see if PortfolioId property is set
internal bool IsSetPortfolioId()
{
return this._portfolioId != null;
}
///
/// Gets and sets the property ProductId.
///
/// The product identifier.
///
///
[AWSProperty(Required=true, Min=1, Max=100)]
public string ProductId
{
get { return this._productId; }
set { this._productId = value; }
}
// Check to see if ProductId property is set
internal bool IsSetProductId()
{
return this._productId != null;
}
///
/// Gets and sets the property Type.
///
/// The type of constraint.
///
/// -
///
///
LAUNCH
///
/// -
///
///
NOTIFICATION
///
/// -
///
///
RESOURCE_UPDATE
///
/// -
///
///
STACKSET
///
/// -
///
///
TEMPLATE
///
///
///
[AWSProperty(Required=true, Min=1, Max=1024)]
public string Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
}
}