/*
* 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 scheduler-2021-06-30.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.Scheduler.Model
{
///
/// The templated target type for the Amazon ECS
/// RunTask
API operation.
///
public partial class EcsParameters
{
private List _capacityProviderStrategy = new List();
private bool? _enableECSManagedTags;
private bool? _enableExecuteCommand;
private string _group;
private LaunchType _launchType;
private NetworkConfiguration _networkConfiguration;
private List _placementConstraints = new List();
private List _placementStrategy = new List();
private string _platformVersion;
private PropagateTags _propagateTags;
private string _referenceId;
private List> _tags = new List>();
private int? _taskCount;
private string _taskDefinitionArn;
///
/// Gets and sets the property CapacityProviderStrategy.
///
/// The capacity provider strategy to use for the task.
///
///
[AWSProperty(Min=0, Max=6)]
public List CapacityProviderStrategy
{
get { return this._capacityProviderStrategy; }
set { this._capacityProviderStrategy = value; }
}
// Check to see if CapacityProviderStrategy property is set
internal bool IsSetCapacityProviderStrategy()
{
return this._capacityProviderStrategy != null && this._capacityProviderStrategy.Count > 0;
}
///
/// Gets and sets the property EnableECSManagedTags.
///
/// Specifies whether to enable Amazon ECS managed tags for the task. For more information,
/// see Tagging
/// Your Amazon ECS Resources in the Amazon ECS Developer Guide.
///
///
public bool EnableECSManagedTags
{
get { return this._enableECSManagedTags.GetValueOrDefault(); }
set { this._enableECSManagedTags = value; }
}
// Check to see if EnableECSManagedTags property is set
internal bool IsSetEnableECSManagedTags()
{
return this._enableECSManagedTags.HasValue;
}
///
/// Gets and sets the property EnableExecuteCommand.
///
/// Whether or not to enable the execute command functionality for the containers in this
/// task. If true, this enables execute command functionality on all containers in the
/// task.
///
///
public bool EnableExecuteCommand
{
get { return this._enableExecuteCommand.GetValueOrDefault(); }
set { this._enableExecuteCommand = value; }
}
// Check to see if EnableExecuteCommand property is set
internal bool IsSetEnableExecuteCommand()
{
return this._enableExecuteCommand.HasValue;
}
///
/// Gets and sets the property Group.
///
/// Specifies an ECS task group for the task. The maximum length is 255 characters.
///
///
[AWSProperty(Min=1, Max=255)]
public string Group
{
get { return this._group; }
set { this._group = value; }
}
// Check to see if Group property is set
internal bool IsSetGroup()
{
return this._group != null;
}
///
/// Gets and sets the property LaunchType.
///
/// Specifies the launch type on which your task is running. The launch type that you
/// specify here must match one of the launch type (compatibilities) of the target task.
/// The FARGATE
value is supported only in the Regions where Fargate with
/// Amazon ECS is supported. For more information, see AWS
/// Fargate on Amazon ECS in the Amazon ECS Developer Guide.
///
///
public LaunchType LaunchType
{
get { return this._launchType; }
set { this._launchType = value; }
}
// Check to see if LaunchType property is set
internal bool IsSetLaunchType()
{
return this._launchType != null;
}
///
/// Gets and sets the property NetworkConfiguration.
///
/// This structure specifies the network configuration for an ECS task.
///
///
public NetworkConfiguration NetworkConfiguration
{
get { return this._networkConfiguration; }
set { this._networkConfiguration = value; }
}
// Check to see if NetworkConfiguration property is set
internal bool IsSetNetworkConfiguration()
{
return this._networkConfiguration != null;
}
///
/// Gets and sets the property PlacementConstraints.
///
/// An array of placement constraint objects to use for the task. You can specify up to
/// 10 constraints per task (including constraints in the task definition and those specified
/// at runtime).
///
///
[AWSProperty(Min=0, Max=10)]
public List PlacementConstraints
{
get { return this._placementConstraints; }
set { this._placementConstraints = value; }
}
// Check to see if PlacementConstraints property is set
internal bool IsSetPlacementConstraints()
{
return this._placementConstraints != null && this._placementConstraints.Count > 0;
}
///
/// Gets and sets the property PlacementStrategy.
///
/// The task placement strategy for a task or service.
///
///
[AWSProperty(Min=0, Max=5)]
public List PlacementStrategy
{
get { return this._placementStrategy; }
set { this._placementStrategy = value; }
}
// Check to see if PlacementStrategy property is set
internal bool IsSetPlacementStrategy()
{
return this._placementStrategy != null && this._placementStrategy.Count > 0;
}
///
/// Gets and sets the property PlatformVersion.
///
/// Specifies the platform version for the task. Specify only the numeric portion of the
/// platform version, such as 1.1.0
.
///
///
[AWSProperty(Min=1, Max=64)]
public string PlatformVersion
{
get { return this._platformVersion; }
set { this._platformVersion = value; }
}
// Check to see if PlatformVersion property is set
internal bool IsSetPlatformVersion()
{
return this._platformVersion != null;
}
///
/// Gets and sets the property PropagateTags.
///
/// Specifies whether to propagate the tags from the task definition to the task. If no
/// value is specified, the tags are not propagated. Tags can only be propagated to the
/// task during task creation. To add tags to a task after task creation, use Amazon ECS's
///
/// TagResource
API action.
///
///
public PropagateTags PropagateTags
{
get { return this._propagateTags; }
set { this._propagateTags = value; }
}
// Check to see if PropagateTags property is set
internal bool IsSetPropagateTags()
{
return this._propagateTags != null;
}
///
/// Gets and sets the property ReferenceId.
///
/// The reference ID to use for the task.
///
///
[AWSProperty(Min=0, Max=1024)]
public string ReferenceId
{
get { return this._referenceId; }
set { this._referenceId = value; }
}
// Check to see if ReferenceId property is set
internal bool IsSetReferenceId()
{
return this._referenceId != null;
}
///
/// Gets and sets the property Tags.
///
/// The metadata that you apply to the task to help you categorize and organize them.
/// Each tag consists of a key and an optional value, both of which you define. For more
/// information, see
/// RunTask
in the Amazon ECS API Reference.
///
///
[AWSProperty(Min=0, Max=50)]
public List> Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property TaskCount.
///
/// The number of tasks to create based on TaskDefinition
. The default is
/// 1
.
///
///
[AWSProperty(Min=1, Max=10)]
public int TaskCount
{
get { return this._taskCount.GetValueOrDefault(); }
set { this._taskCount = value; }
}
// Check to see if TaskCount property is set
internal bool IsSetTaskCount()
{
return this._taskCount.HasValue;
}
///
/// Gets and sets the property TaskDefinitionArn.
///
/// The Amazon Resource Name (ARN) of the task definition to use if the event target is
/// an Amazon ECS task.
///
///
[AWSProperty(Required=true, Min=1, Max=1600)]
public string TaskDefinitionArn
{
get { return this._taskDefinitionArn; }
set { this._taskDefinitionArn = value; }
}
// Check to see if TaskDefinitionArn property is set
internal bool IsSetTaskDefinitionArn()
{
return this._taskDefinitionArn != null;
}
}
}