github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ecs/taskSet.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ecs
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an ECS task set - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).
    16  //
    17  // See [ECS Task Set section in AWS developer guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-external.html).
    18  //
    19  // ## Example Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := ecs.NewTaskSet(ctx, "example", &ecs.TaskSetArgs{
    35  //				Service:        pulumi.Any(exampleAwsEcsService.Id),
    36  //				Cluster:        pulumi.Any(exampleAwsEcsCluster.Id),
    37  //				TaskDefinition: pulumi.Any(exampleAwsEcsTaskDefinition.Arn),
    38  //				LoadBalancers: ecs.TaskSetLoadBalancerArray{
    39  //					&ecs.TaskSetLoadBalancerArgs{
    40  //						TargetGroupArn: pulumi.Any(exampleAwsLbTargetGroup.Arn),
    41  //						ContainerName:  pulumi.String("mongo"),
    42  //						ContainerPort:  pulumi.Int(8080),
    43  //					},
    44  //				},
    45  //			})
    46  //			if err != nil {
    47  //				return err
    48  //			}
    49  //			return nil
    50  //		})
    51  //	}
    52  //
    53  // ```
    54  // <!--End PulumiCodeChooser -->
    55  //
    56  // ### Ignoring Changes to Scale
    57  //
    58  // You can utilize the generic resource lifecycle configuration block with `ignoreChanges` to create an ECS service with an initial count of running instances, then ignore any changes to that count caused externally (e.g. Application Autoscaling).
    59  //
    60  // <!--Start PulumiCodeChooser -->
    61  // ```go
    62  // package main
    63  //
    64  // import (
    65  //
    66  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    67  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    68  //
    69  // )
    70  //
    71  //	func main() {
    72  //		pulumi.Run(func(ctx *pulumi.Context) error {
    73  //			_, err := ecs.NewTaskSet(ctx, "example", &ecs.TaskSetArgs{
    74  //				Scale: &ecs.TaskSetScaleArgs{
    75  //					Value: pulumi.Float64(50),
    76  //				},
    77  //			})
    78  //			if err != nil {
    79  //				return err
    80  //			}
    81  //			return nil
    82  //		})
    83  //	}
    84  //
    85  // ```
    86  // <!--End PulumiCodeChooser -->
    87  //
    88  // ## Import
    89  //
    90  // Using `pulumi import`, import ECS Task Sets using the `task_set_id`, `service`, and `cluster` separated by commas (`,`). For example:
    91  //
    92  // ```sh
    93  // $ pulumi import aws:ecs/taskSet:TaskSet example ecs-svc/7177320696926227436,arn:aws:ecs:us-west-2:123456789101:service/example/example-1234567890,arn:aws:ecs:us-west-2:123456789101:cluster/example
    94  // ```
    95  type TaskSet struct {
    96  	pulumi.CustomResourceState
    97  
    98  	// The Amazon Resource Name (ARN) that identifies the task set.
    99  	Arn pulumi.StringOutput `pulumi:"arn"`
   100  	// The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   101  	CapacityProviderStrategies TaskSetCapacityProviderStrategyArrayOutput `pulumi:"capacityProviderStrategies"`
   102  	// The short name or ARN of the cluster that hosts the service to create the task set in.
   103  	Cluster pulumi.StringOutput `pulumi:"cluster"`
   104  	// The external ID associated with the task set.
   105  	ExternalId pulumi.StringOutput `pulumi:"externalId"`
   106  	// Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   107  	ForceDelete pulumi.BoolPtrOutput `pulumi:"forceDelete"`
   108  	// The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   109  	LaunchType pulumi.StringOutput `pulumi:"launchType"`
   110  	// Details on load balancers that are used with a task set. Detailed below.
   111  	LoadBalancers TaskSetLoadBalancerArrayOutput `pulumi:"loadBalancers"`
   112  	// The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   113  	NetworkConfiguration TaskSetNetworkConfigurationPtrOutput `pulumi:"networkConfiguration"`
   114  	// The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   115  	PlatformVersion pulumi.StringOutput `pulumi:"platformVersion"`
   116  	// A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   117  	Scale TaskSetScaleOutput `pulumi:"scale"`
   118  	// The short name or ARN of the ECS service.
   119  	Service pulumi.StringOutput `pulumi:"service"`
   120  	// The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   121  	ServiceRegistries TaskSetServiceRegistriesPtrOutput `pulumi:"serviceRegistries"`
   122  	// The stability status. This indicates whether the task set has reached a steady state.
   123  	StabilityStatus pulumi.StringOutput `pulumi:"stabilityStatus"`
   124  	// The status of the task set.
   125  	Status pulumi.StringOutput `pulumi:"status"`
   126  	// A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   127  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   128  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   129  	//
   130  	// Deprecated: Please use `tags` instead.
   131  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   132  	// The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   133  	//
   134  	// The following arguments are optional:
   135  	TaskDefinition pulumi.StringOutput `pulumi:"taskDefinition"`
   136  	// The ID of the task set.
   137  	TaskSetId pulumi.StringOutput `pulumi:"taskSetId"`
   138  	// Whether the provider should wait until the task set has reached `STEADY_STATE`.
   139  	WaitUntilStable pulumi.BoolPtrOutput `pulumi:"waitUntilStable"`
   140  	// Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   141  	WaitUntilStableTimeout pulumi.StringPtrOutput `pulumi:"waitUntilStableTimeout"`
   142  }
   143  
   144  // NewTaskSet registers a new resource with the given unique name, arguments, and options.
   145  func NewTaskSet(ctx *pulumi.Context,
   146  	name string, args *TaskSetArgs, opts ...pulumi.ResourceOption) (*TaskSet, error) {
   147  	if args == nil {
   148  		return nil, errors.New("missing one or more required arguments")
   149  	}
   150  
   151  	if args.Cluster == nil {
   152  		return nil, errors.New("invalid value for required argument 'Cluster'")
   153  	}
   154  	if args.Service == nil {
   155  		return nil, errors.New("invalid value for required argument 'Service'")
   156  	}
   157  	if args.TaskDefinition == nil {
   158  		return nil, errors.New("invalid value for required argument 'TaskDefinition'")
   159  	}
   160  	opts = internal.PkgResourceDefaultOpts(opts)
   161  	var resource TaskSet
   162  	err := ctx.RegisterResource("aws:ecs/taskSet:TaskSet", name, args, &resource, opts...)
   163  	if err != nil {
   164  		return nil, err
   165  	}
   166  	return &resource, nil
   167  }
   168  
   169  // GetTaskSet gets an existing TaskSet resource's state with the given name, ID, and optional
   170  // state properties that are used to uniquely qualify the lookup (nil if not required).
   171  func GetTaskSet(ctx *pulumi.Context,
   172  	name string, id pulumi.IDInput, state *TaskSetState, opts ...pulumi.ResourceOption) (*TaskSet, error) {
   173  	var resource TaskSet
   174  	err := ctx.ReadResource("aws:ecs/taskSet:TaskSet", name, id, state, &resource, opts...)
   175  	if err != nil {
   176  		return nil, err
   177  	}
   178  	return &resource, nil
   179  }
   180  
   181  // Input properties used for looking up and filtering TaskSet resources.
   182  type taskSetState struct {
   183  	// The Amazon Resource Name (ARN) that identifies the task set.
   184  	Arn *string `pulumi:"arn"`
   185  	// The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   186  	CapacityProviderStrategies []TaskSetCapacityProviderStrategy `pulumi:"capacityProviderStrategies"`
   187  	// The short name or ARN of the cluster that hosts the service to create the task set in.
   188  	Cluster *string `pulumi:"cluster"`
   189  	// The external ID associated with the task set.
   190  	ExternalId *string `pulumi:"externalId"`
   191  	// Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   192  	ForceDelete *bool `pulumi:"forceDelete"`
   193  	// The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   194  	LaunchType *string `pulumi:"launchType"`
   195  	// Details on load balancers that are used with a task set. Detailed below.
   196  	LoadBalancers []TaskSetLoadBalancer `pulumi:"loadBalancers"`
   197  	// The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   198  	NetworkConfiguration *TaskSetNetworkConfiguration `pulumi:"networkConfiguration"`
   199  	// The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   200  	PlatformVersion *string `pulumi:"platformVersion"`
   201  	// A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   202  	Scale *TaskSetScale `pulumi:"scale"`
   203  	// The short name or ARN of the ECS service.
   204  	Service *string `pulumi:"service"`
   205  	// The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   206  	ServiceRegistries *TaskSetServiceRegistries `pulumi:"serviceRegistries"`
   207  	// The stability status. This indicates whether the task set has reached a steady state.
   208  	StabilityStatus *string `pulumi:"stabilityStatus"`
   209  	// The status of the task set.
   210  	Status *string `pulumi:"status"`
   211  	// A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   212  	Tags map[string]string `pulumi:"tags"`
   213  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   214  	//
   215  	// Deprecated: Please use `tags` instead.
   216  	TagsAll map[string]string `pulumi:"tagsAll"`
   217  	// The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   218  	//
   219  	// The following arguments are optional:
   220  	TaskDefinition *string `pulumi:"taskDefinition"`
   221  	// The ID of the task set.
   222  	TaskSetId *string `pulumi:"taskSetId"`
   223  	// Whether the provider should wait until the task set has reached `STEADY_STATE`.
   224  	WaitUntilStable *bool `pulumi:"waitUntilStable"`
   225  	// Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   226  	WaitUntilStableTimeout *string `pulumi:"waitUntilStableTimeout"`
   227  }
   228  
   229  type TaskSetState struct {
   230  	// The Amazon Resource Name (ARN) that identifies the task set.
   231  	Arn pulumi.StringPtrInput
   232  	// The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   233  	CapacityProviderStrategies TaskSetCapacityProviderStrategyArrayInput
   234  	// The short name or ARN of the cluster that hosts the service to create the task set in.
   235  	Cluster pulumi.StringPtrInput
   236  	// The external ID associated with the task set.
   237  	ExternalId pulumi.StringPtrInput
   238  	// Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   239  	ForceDelete pulumi.BoolPtrInput
   240  	// The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   241  	LaunchType pulumi.StringPtrInput
   242  	// Details on load balancers that are used with a task set. Detailed below.
   243  	LoadBalancers TaskSetLoadBalancerArrayInput
   244  	// The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   245  	NetworkConfiguration TaskSetNetworkConfigurationPtrInput
   246  	// The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   247  	PlatformVersion pulumi.StringPtrInput
   248  	// A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   249  	Scale TaskSetScalePtrInput
   250  	// The short name or ARN of the ECS service.
   251  	Service pulumi.StringPtrInput
   252  	// The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   253  	ServiceRegistries TaskSetServiceRegistriesPtrInput
   254  	// The stability status. This indicates whether the task set has reached a steady state.
   255  	StabilityStatus pulumi.StringPtrInput
   256  	// The status of the task set.
   257  	Status pulumi.StringPtrInput
   258  	// A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   259  	Tags pulumi.StringMapInput
   260  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   261  	//
   262  	// Deprecated: Please use `tags` instead.
   263  	TagsAll pulumi.StringMapInput
   264  	// The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   265  	//
   266  	// The following arguments are optional:
   267  	TaskDefinition pulumi.StringPtrInput
   268  	// The ID of the task set.
   269  	TaskSetId pulumi.StringPtrInput
   270  	// Whether the provider should wait until the task set has reached `STEADY_STATE`.
   271  	WaitUntilStable pulumi.BoolPtrInput
   272  	// Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   273  	WaitUntilStableTimeout pulumi.StringPtrInput
   274  }
   275  
   276  func (TaskSetState) ElementType() reflect.Type {
   277  	return reflect.TypeOf((*taskSetState)(nil)).Elem()
   278  }
   279  
   280  type taskSetArgs struct {
   281  	// The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   282  	CapacityProviderStrategies []TaskSetCapacityProviderStrategy `pulumi:"capacityProviderStrategies"`
   283  	// The short name or ARN of the cluster that hosts the service to create the task set in.
   284  	Cluster string `pulumi:"cluster"`
   285  	// The external ID associated with the task set.
   286  	ExternalId *string `pulumi:"externalId"`
   287  	// Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   288  	ForceDelete *bool `pulumi:"forceDelete"`
   289  	// The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   290  	LaunchType *string `pulumi:"launchType"`
   291  	// Details on load balancers that are used with a task set. Detailed below.
   292  	LoadBalancers []TaskSetLoadBalancer `pulumi:"loadBalancers"`
   293  	// The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   294  	NetworkConfiguration *TaskSetNetworkConfiguration `pulumi:"networkConfiguration"`
   295  	// The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   296  	PlatformVersion *string `pulumi:"platformVersion"`
   297  	// A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   298  	Scale *TaskSetScale `pulumi:"scale"`
   299  	// The short name or ARN of the ECS service.
   300  	Service string `pulumi:"service"`
   301  	// The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   302  	ServiceRegistries *TaskSetServiceRegistries `pulumi:"serviceRegistries"`
   303  	// A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   304  	Tags map[string]string `pulumi:"tags"`
   305  	// The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   306  	//
   307  	// The following arguments are optional:
   308  	TaskDefinition string `pulumi:"taskDefinition"`
   309  	// Whether the provider should wait until the task set has reached `STEADY_STATE`.
   310  	WaitUntilStable *bool `pulumi:"waitUntilStable"`
   311  	// Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   312  	WaitUntilStableTimeout *string `pulumi:"waitUntilStableTimeout"`
   313  }
   314  
   315  // The set of arguments for constructing a TaskSet resource.
   316  type TaskSetArgs struct {
   317  	// The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   318  	CapacityProviderStrategies TaskSetCapacityProviderStrategyArrayInput
   319  	// The short name or ARN of the cluster that hosts the service to create the task set in.
   320  	Cluster pulumi.StringInput
   321  	// The external ID associated with the task set.
   322  	ExternalId pulumi.StringPtrInput
   323  	// Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   324  	ForceDelete pulumi.BoolPtrInput
   325  	// The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   326  	LaunchType pulumi.StringPtrInput
   327  	// Details on load balancers that are used with a task set. Detailed below.
   328  	LoadBalancers TaskSetLoadBalancerArrayInput
   329  	// The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   330  	NetworkConfiguration TaskSetNetworkConfigurationPtrInput
   331  	// The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   332  	PlatformVersion pulumi.StringPtrInput
   333  	// A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   334  	Scale TaskSetScalePtrInput
   335  	// The short name or ARN of the ECS service.
   336  	Service pulumi.StringInput
   337  	// The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   338  	ServiceRegistries TaskSetServiceRegistriesPtrInput
   339  	// A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   340  	Tags pulumi.StringMapInput
   341  	// The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   342  	//
   343  	// The following arguments are optional:
   344  	TaskDefinition pulumi.StringInput
   345  	// Whether the provider should wait until the task set has reached `STEADY_STATE`.
   346  	WaitUntilStable pulumi.BoolPtrInput
   347  	// Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   348  	WaitUntilStableTimeout pulumi.StringPtrInput
   349  }
   350  
   351  func (TaskSetArgs) ElementType() reflect.Type {
   352  	return reflect.TypeOf((*taskSetArgs)(nil)).Elem()
   353  }
   354  
   355  type TaskSetInput interface {
   356  	pulumi.Input
   357  
   358  	ToTaskSetOutput() TaskSetOutput
   359  	ToTaskSetOutputWithContext(ctx context.Context) TaskSetOutput
   360  }
   361  
   362  func (*TaskSet) ElementType() reflect.Type {
   363  	return reflect.TypeOf((**TaskSet)(nil)).Elem()
   364  }
   365  
   366  func (i *TaskSet) ToTaskSetOutput() TaskSetOutput {
   367  	return i.ToTaskSetOutputWithContext(context.Background())
   368  }
   369  
   370  func (i *TaskSet) ToTaskSetOutputWithContext(ctx context.Context) TaskSetOutput {
   371  	return pulumi.ToOutputWithContext(ctx, i).(TaskSetOutput)
   372  }
   373  
   374  // TaskSetArrayInput is an input type that accepts TaskSetArray and TaskSetArrayOutput values.
   375  // You can construct a concrete instance of `TaskSetArrayInput` via:
   376  //
   377  //	TaskSetArray{ TaskSetArgs{...} }
   378  type TaskSetArrayInput interface {
   379  	pulumi.Input
   380  
   381  	ToTaskSetArrayOutput() TaskSetArrayOutput
   382  	ToTaskSetArrayOutputWithContext(context.Context) TaskSetArrayOutput
   383  }
   384  
   385  type TaskSetArray []TaskSetInput
   386  
   387  func (TaskSetArray) ElementType() reflect.Type {
   388  	return reflect.TypeOf((*[]*TaskSet)(nil)).Elem()
   389  }
   390  
   391  func (i TaskSetArray) ToTaskSetArrayOutput() TaskSetArrayOutput {
   392  	return i.ToTaskSetArrayOutputWithContext(context.Background())
   393  }
   394  
   395  func (i TaskSetArray) ToTaskSetArrayOutputWithContext(ctx context.Context) TaskSetArrayOutput {
   396  	return pulumi.ToOutputWithContext(ctx, i).(TaskSetArrayOutput)
   397  }
   398  
   399  // TaskSetMapInput is an input type that accepts TaskSetMap and TaskSetMapOutput values.
   400  // You can construct a concrete instance of `TaskSetMapInput` via:
   401  //
   402  //	TaskSetMap{ "key": TaskSetArgs{...} }
   403  type TaskSetMapInput interface {
   404  	pulumi.Input
   405  
   406  	ToTaskSetMapOutput() TaskSetMapOutput
   407  	ToTaskSetMapOutputWithContext(context.Context) TaskSetMapOutput
   408  }
   409  
   410  type TaskSetMap map[string]TaskSetInput
   411  
   412  func (TaskSetMap) ElementType() reflect.Type {
   413  	return reflect.TypeOf((*map[string]*TaskSet)(nil)).Elem()
   414  }
   415  
   416  func (i TaskSetMap) ToTaskSetMapOutput() TaskSetMapOutput {
   417  	return i.ToTaskSetMapOutputWithContext(context.Background())
   418  }
   419  
   420  func (i TaskSetMap) ToTaskSetMapOutputWithContext(ctx context.Context) TaskSetMapOutput {
   421  	return pulumi.ToOutputWithContext(ctx, i).(TaskSetMapOutput)
   422  }
   423  
   424  type TaskSetOutput struct{ *pulumi.OutputState }
   425  
   426  func (TaskSetOutput) ElementType() reflect.Type {
   427  	return reflect.TypeOf((**TaskSet)(nil)).Elem()
   428  }
   429  
   430  func (o TaskSetOutput) ToTaskSetOutput() TaskSetOutput {
   431  	return o
   432  }
   433  
   434  func (o TaskSetOutput) ToTaskSetOutputWithContext(ctx context.Context) TaskSetOutput {
   435  	return o
   436  }
   437  
   438  // The Amazon Resource Name (ARN) that identifies the task set.
   439  func (o TaskSetOutput) Arn() pulumi.StringOutput {
   440  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   441  }
   442  
   443  // The capacity provider strategy to use for the service. Can be one or more.  Defined below.
   444  func (o TaskSetOutput) CapacityProviderStrategies() TaskSetCapacityProviderStrategyArrayOutput {
   445  	return o.ApplyT(func(v *TaskSet) TaskSetCapacityProviderStrategyArrayOutput { return v.CapacityProviderStrategies }).(TaskSetCapacityProviderStrategyArrayOutput)
   446  }
   447  
   448  // The short name or ARN of the cluster that hosts the service to create the task set in.
   449  func (o TaskSetOutput) Cluster() pulumi.StringOutput {
   450  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.Cluster }).(pulumi.StringOutput)
   451  }
   452  
   453  // The external ID associated with the task set.
   454  func (o TaskSetOutput) ExternalId() pulumi.StringOutput {
   455  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.ExternalId }).(pulumi.StringOutput)
   456  }
   457  
   458  // Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
   459  func (o TaskSetOutput) ForceDelete() pulumi.BoolPtrOutput {
   460  	return o.ApplyT(func(v *TaskSet) pulumi.BoolPtrOutput { return v.ForceDelete }).(pulumi.BoolPtrOutput)
   461  }
   462  
   463  // The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
   464  func (o TaskSetOutput) LaunchType() pulumi.StringOutput {
   465  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.LaunchType }).(pulumi.StringOutput)
   466  }
   467  
   468  // Details on load balancers that are used with a task set. Detailed below.
   469  func (o TaskSetOutput) LoadBalancers() TaskSetLoadBalancerArrayOutput {
   470  	return o.ApplyT(func(v *TaskSet) TaskSetLoadBalancerArrayOutput { return v.LoadBalancers }).(TaskSetLoadBalancerArrayOutput)
   471  }
   472  
   473  // The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
   474  func (o TaskSetOutput) NetworkConfiguration() TaskSetNetworkConfigurationPtrOutput {
   475  	return o.ApplyT(func(v *TaskSet) TaskSetNetworkConfigurationPtrOutput { return v.NetworkConfiguration }).(TaskSetNetworkConfigurationPtrOutput)
   476  }
   477  
   478  // The platform version on which to run your service. Only applicable for `launchType` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
   479  func (o TaskSetOutput) PlatformVersion() pulumi.StringOutput {
   480  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.PlatformVersion }).(pulumi.StringOutput)
   481  }
   482  
   483  // A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
   484  func (o TaskSetOutput) Scale() TaskSetScaleOutput {
   485  	return o.ApplyT(func(v *TaskSet) TaskSetScaleOutput { return v.Scale }).(TaskSetScaleOutput)
   486  }
   487  
   488  // The short name or ARN of the ECS service.
   489  func (o TaskSetOutput) Service() pulumi.StringOutput {
   490  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.Service }).(pulumi.StringOutput)
   491  }
   492  
   493  // The service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. Detailed below.
   494  func (o TaskSetOutput) ServiceRegistries() TaskSetServiceRegistriesPtrOutput {
   495  	return o.ApplyT(func(v *TaskSet) TaskSetServiceRegistriesPtrOutput { return v.ServiceRegistries }).(TaskSetServiceRegistriesPtrOutput)
   496  }
   497  
   498  // The stability status. This indicates whether the task set has reached a steady state.
   499  func (o TaskSetOutput) StabilityStatus() pulumi.StringOutput {
   500  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.StabilityStatus }).(pulumi.StringOutput)
   501  }
   502  
   503  // The status of the task set.
   504  func (o TaskSetOutput) Status() pulumi.StringOutput {
   505  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   506  }
   507  
   508  // A map of tags to assign to the file system. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copyTagsToBackups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
   509  func (o TaskSetOutput) Tags() pulumi.StringMapOutput {
   510  	return o.ApplyT(func(v *TaskSet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   511  }
   512  
   513  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   514  //
   515  // Deprecated: Please use `tags` instead.
   516  func (o TaskSetOutput) TagsAll() pulumi.StringMapOutput {
   517  	return o.ApplyT(func(v *TaskSet) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   518  }
   519  
   520  // The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
   521  //
   522  // The following arguments are optional:
   523  func (o TaskSetOutput) TaskDefinition() pulumi.StringOutput {
   524  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.TaskDefinition }).(pulumi.StringOutput)
   525  }
   526  
   527  // The ID of the task set.
   528  func (o TaskSetOutput) TaskSetId() pulumi.StringOutput {
   529  	return o.ApplyT(func(v *TaskSet) pulumi.StringOutput { return v.TaskSetId }).(pulumi.StringOutput)
   530  }
   531  
   532  // Whether the provider should wait until the task set has reached `STEADY_STATE`.
   533  func (o TaskSetOutput) WaitUntilStable() pulumi.BoolPtrOutput {
   534  	return o.ApplyT(func(v *TaskSet) pulumi.BoolPtrOutput { return v.WaitUntilStable }).(pulumi.BoolPtrOutput)
   535  }
   536  
   537  // Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
   538  func (o TaskSetOutput) WaitUntilStableTimeout() pulumi.StringPtrOutput {
   539  	return o.ApplyT(func(v *TaskSet) pulumi.StringPtrOutput { return v.WaitUntilStableTimeout }).(pulumi.StringPtrOutput)
   540  }
   541  
   542  type TaskSetArrayOutput struct{ *pulumi.OutputState }
   543  
   544  func (TaskSetArrayOutput) ElementType() reflect.Type {
   545  	return reflect.TypeOf((*[]*TaskSet)(nil)).Elem()
   546  }
   547  
   548  func (o TaskSetArrayOutput) ToTaskSetArrayOutput() TaskSetArrayOutput {
   549  	return o
   550  }
   551  
   552  func (o TaskSetArrayOutput) ToTaskSetArrayOutputWithContext(ctx context.Context) TaskSetArrayOutput {
   553  	return o
   554  }
   555  
   556  func (o TaskSetArrayOutput) Index(i pulumi.IntInput) TaskSetOutput {
   557  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TaskSet {
   558  		return vs[0].([]*TaskSet)[vs[1].(int)]
   559  	}).(TaskSetOutput)
   560  }
   561  
   562  type TaskSetMapOutput struct{ *pulumi.OutputState }
   563  
   564  func (TaskSetMapOutput) ElementType() reflect.Type {
   565  	return reflect.TypeOf((*map[string]*TaskSet)(nil)).Elem()
   566  }
   567  
   568  func (o TaskSetMapOutput) ToTaskSetMapOutput() TaskSetMapOutput {
   569  	return o
   570  }
   571  
   572  func (o TaskSetMapOutput) ToTaskSetMapOutputWithContext(ctx context.Context) TaskSetMapOutput {
   573  	return o
   574  }
   575  
   576  func (o TaskSetMapOutput) MapIndex(k pulumi.StringInput) TaskSetOutput {
   577  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TaskSet {
   578  		return vs[0].(map[string]*TaskSet)[vs[1].(string)]
   579  	}).(TaskSetOutput)
   580  }
   581  
   582  func init() {
   583  	pulumi.RegisterInputType(reflect.TypeOf((*TaskSetInput)(nil)).Elem(), &TaskSet{})
   584  	pulumi.RegisterInputType(reflect.TypeOf((*TaskSetArrayInput)(nil)).Elem(), TaskSetArray{})
   585  	pulumi.RegisterInputType(reflect.TypeOf((*TaskSetMapInput)(nil)).Elem(), TaskSetMap{})
   586  	pulumi.RegisterOutputType(TaskSetOutput{})
   587  	pulumi.RegisterOutputType(TaskSetArrayOutput{})
   588  	pulumi.RegisterOutputType(TaskSetMapOutput{})
   589  }