/* * 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 events-2015-10-07.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.CloudWatchEvents.Model { /// /// The custom parameters to be used when the target is an Amazon ECS task. /// 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. /// /// /// /// If a capacityProviderStrategy is specified, the launchType /// parameter must be omitted. If no capacityProviderStrategy or launchType /// is specified, the defaultCapacityProviderStrategy for the cluster is /// used. /// /// [AWSProperty(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 Elastic Container Service 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. /// /// 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 witt /// Amazon ECS is supported. For more information, see Fargate /// on Amazon ECS in the Amazon Elastic Container Service 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. /// /// Use this structure if the Amazon ECS task uses the awsvpc network mode. /// This structure specifies the VPC subnets and security groups associated with the task, /// and whether a public IP address is to be used. This structure is required if LaunchType /// is FARGATE because the awsvpc mode is required for Fargate /// tasks. /// /// /// /// If you specify NetworkConfiguration when the target ECS task does not /// use the awsvpc network mode, the task fails. /// /// 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(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 placement strategy objects to use for the task. You can specify a maximum of five /// strategy rules per task. /// /// [AWSProperty(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. /// /// /// /// This structure is used only if LaunchType is FARGATE. For /// more information about valid platform versions, see Fargate /// Platform Versions in the Amazon Elastic Container Service Developer Guide. /// /// 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 the 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(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. To learn /// more, see RunTask /// in the Amazon ECS API Reference. /// /// 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)] 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 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; } } }