github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ecs/service.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  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // > **Note:** To prevent a race condition during service deletion, make sure to set `dependsOn` to the related `iam.RolePolicy`; otherwise, the policy may be destroyed too soon and the ECS service will then get stuck in the `DRAINING` state.
    15  //
    16  // Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).
    17  //
    18  // See [ECS Services section in AWS developer guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).
    19  //
    20  // ## Example Usage
    21  //
    22  // <!--Start PulumiCodeChooser -->
    23  // ```go
    24  // package main
    25  //
    26  // import (
    27  //
    28  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    29  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    30  //
    31  // )
    32  //
    33  //	func main() {
    34  //		pulumi.Run(func(ctx *pulumi.Context) error {
    35  //			_, err := ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
    36  //				Name:           pulumi.String("mongodb"),
    37  //				Cluster:        pulumi.Any(fooAwsEcsCluster.Id),
    38  //				TaskDefinition: pulumi.Any(mongoAwsEcsTaskDefinition.Arn),
    39  //				DesiredCount:   pulumi.Int(3),
    40  //				IamRole:        pulumi.Any(fooAwsIamRole.Arn),
    41  //				OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
    42  //					&ecs.ServiceOrderedPlacementStrategyArgs{
    43  //						Type:  pulumi.String("binpack"),
    44  //						Field: pulumi.String("cpu"),
    45  //					},
    46  //				},
    47  //				LoadBalancers: ecs.ServiceLoadBalancerArray{
    48  //					&ecs.ServiceLoadBalancerArgs{
    49  //						TargetGroupArn: pulumi.Any(fooAwsLbTargetGroup.Arn),
    50  //						ContainerName:  pulumi.String("mongo"),
    51  //						ContainerPort:  pulumi.Int(8080),
    52  //					},
    53  //				},
    54  //				PlacementConstraints: ecs.ServicePlacementConstraintArray{
    55  //					&ecs.ServicePlacementConstraintArgs{
    56  //						Type:       pulumi.String("memberOf"),
    57  //						Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
    58  //					},
    59  //				},
    60  //			}, pulumi.DependsOn([]pulumi.Resource{
    61  //				foo,
    62  //			}))
    63  //			if err != nil {
    64  //				return err
    65  //			}
    66  //			return nil
    67  //		})
    68  //	}
    69  //
    70  // ```
    71  // <!--End PulumiCodeChooser -->
    72  //
    73  // ### Ignoring Changes to Desired Count
    74  //
    75  // You can use [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#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).
    76  //
    77  // <!--Start PulumiCodeChooser -->
    78  // ```go
    79  // package main
    80  //
    81  // import (
    82  //
    83  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    84  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    85  //
    86  // )
    87  //
    88  //	func main() {
    89  //		pulumi.Run(func(ctx *pulumi.Context) error {
    90  //			_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
    91  //				DesiredCount: pulumi.Int(2),
    92  //			})
    93  //			if err != nil {
    94  //				return err
    95  //			}
    96  //			return nil
    97  //		})
    98  //	}
    99  //
   100  // ```
   101  // <!--End PulumiCodeChooser -->
   102  //
   103  // ### Daemon Scheduling Strategy
   104  //
   105  // <!--Start PulumiCodeChooser -->
   106  // ```go
   107  // package main
   108  //
   109  // import (
   110  //
   111  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   112  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   113  //
   114  // )
   115  //
   116  //	func main() {
   117  //		pulumi.Run(func(ctx *pulumi.Context) error {
   118  //			_, err := ecs.NewService(ctx, "bar", &ecs.ServiceArgs{
   119  //				Name:               pulumi.String("bar"),
   120  //				Cluster:            pulumi.Any(foo.Id),
   121  //				TaskDefinition:     pulumi.Any(barAwsEcsTaskDefinition.Arn),
   122  //				SchedulingStrategy: pulumi.String("DAEMON"),
   123  //			})
   124  //			if err != nil {
   125  //				return err
   126  //			}
   127  //			return nil
   128  //		})
   129  //	}
   130  //
   131  // ```
   132  // <!--End PulumiCodeChooser -->
   133  //
   134  // ### CloudWatch Deployment Alarms
   135  //
   136  // <!--Start PulumiCodeChooser -->
   137  // ```go
   138  // package main
   139  //
   140  // import (
   141  //
   142  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   143  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   144  //
   145  // )
   146  //
   147  //	func main() {
   148  //		pulumi.Run(func(ctx *pulumi.Context) error {
   149  //			_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
   150  //				Name:    pulumi.String("example"),
   151  //				Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
   152  //				Alarms: &ecs.ServiceAlarmsArgs{
   153  //					Enable:   pulumi.Bool(true),
   154  //					Rollback: pulumi.Bool(true),
   155  //					AlarmNames: pulumi.StringArray{
   156  //						exampleAwsCloudwatchMetricAlarm.AlarmName,
   157  //					},
   158  //				},
   159  //			})
   160  //			if err != nil {
   161  //				return err
   162  //			}
   163  //			return nil
   164  //		})
   165  //	}
   166  //
   167  // ```
   168  // <!--End PulumiCodeChooser -->
   169  //
   170  // ### External Deployment Controller
   171  //
   172  // <!--Start PulumiCodeChooser -->
   173  // ```go
   174  // package main
   175  //
   176  // import (
   177  //
   178  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
   179  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   180  //
   181  // )
   182  //
   183  //	func main() {
   184  //		pulumi.Run(func(ctx *pulumi.Context) error {
   185  //			_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
   186  //				Name:    pulumi.String("example"),
   187  //				Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
   188  //				DeploymentController: &ecs.ServiceDeploymentControllerArgs{
   189  //					Type: pulumi.String("EXTERNAL"),
   190  //				},
   191  //			})
   192  //			if err != nil {
   193  //				return err
   194  //			}
   195  //			return nil
   196  //		})
   197  //	}
   198  //
   199  // ```
   200  // <!--End PulumiCodeChooser -->
   201  //
   202  // ## Import
   203  //
   204  // Using `pulumi import`, import ECS services using the `name` together with ecs cluster `name`. For example:
   205  //
   206  // ```sh
   207  // $ pulumi import aws:ecs/service:Service imported cluster-name/service-name
   208  // ```
   209  type Service struct {
   210  	pulumi.CustomResourceState
   211  
   212  	// Information about the CloudWatch alarms. See below.
   213  	Alarms ServiceAlarmsPtrOutput `pulumi:"alarms"`
   214  	// Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   215  	CapacityProviderStrategies ServiceCapacityProviderStrategyArrayOutput `pulumi:"capacityProviderStrategies"`
   216  	// ARN of an ECS cluster.
   217  	Cluster pulumi.StringOutput `pulumi:"cluster"`
   218  	// Configuration block for deployment circuit breaker. See below.
   219  	DeploymentCircuitBreaker ServiceDeploymentCircuitBreakerPtrOutput `pulumi:"deploymentCircuitBreaker"`
   220  	// Configuration block for deployment controller configuration. See below.
   221  	DeploymentController ServiceDeploymentControllerPtrOutput `pulumi:"deploymentController"`
   222  	// Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   223  	DeploymentMaximumPercent pulumi.IntPtrOutput `pulumi:"deploymentMaximumPercent"`
   224  	// Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   225  	DeploymentMinimumHealthyPercent pulumi.IntPtrOutput `pulumi:"deploymentMinimumHealthyPercent"`
   226  	// Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   227  	DesiredCount pulumi.IntPtrOutput `pulumi:"desiredCount"`
   228  	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   229  	EnableEcsManagedTags pulumi.BoolPtrOutput `pulumi:"enableEcsManagedTags"`
   230  	// Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   231  	EnableExecuteCommand pulumi.BoolPtrOutput `pulumi:"enableExecuteCommand"`
   232  	// Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   233  	ForceNewDeployment pulumi.BoolPtrOutput `pulumi:"forceNewDeployment"`
   234  	// Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   235  	HealthCheckGracePeriodSeconds pulumi.IntPtrOutput `pulumi:"healthCheckGracePeriodSeconds"`
   236  	// ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   237  	IamRole pulumi.StringOutput `pulumi:"iamRole"`
   238  	// Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   239  	LaunchType pulumi.StringOutput `pulumi:"launchType"`
   240  	// Configuration block for load balancers. See below.
   241  	LoadBalancers ServiceLoadBalancerArrayOutput `pulumi:"loadBalancers"`
   242  	// Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   243  	//
   244  	// The following arguments are optional:
   245  	Name pulumi.StringOutput `pulumi:"name"`
   246  	// 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. See below.
   247  	NetworkConfiguration ServiceNetworkConfigurationPtrOutput `pulumi:"networkConfiguration"`
   248  	// Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   249  	OrderedPlacementStrategies ServiceOrderedPlacementStrategyArrayOutput `pulumi:"orderedPlacementStrategies"`
   250  	// Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   251  	PlacementConstraints ServicePlacementConstraintArrayOutput `pulumi:"placementConstraints"`
   252  	// 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).
   253  	PlatformVersion pulumi.StringOutput `pulumi:"platformVersion"`
   254  	// Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   255  	PropagateTags pulumi.StringPtrOutput `pulumi:"propagateTags"`
   256  	// Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   257  	SchedulingStrategy pulumi.StringPtrOutput `pulumi:"schedulingStrategy"`
   258  	// The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   259  	ServiceConnectConfiguration ServiceServiceConnectConfigurationPtrOutput `pulumi:"serviceConnectConfiguration"`
   260  	// Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   261  	ServiceRegistries ServiceServiceRegistriesPtrOutput `pulumi:"serviceRegistries"`
   262  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   263  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   264  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   265  	//
   266  	// Deprecated: Please use `tags` instead.
   267  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   268  	// Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   269  	TaskDefinition pulumi.StringPtrOutput `pulumi:"taskDefinition"`
   270  	// Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   271  	Triggers pulumi.StringMapOutput `pulumi:"triggers"`
   272  	// If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   273  	WaitForSteadyState pulumi.BoolPtrOutput `pulumi:"waitForSteadyState"`
   274  }
   275  
   276  // NewService registers a new resource with the given unique name, arguments, and options.
   277  func NewService(ctx *pulumi.Context,
   278  	name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) {
   279  	if args == nil {
   280  		args = &ServiceArgs{}
   281  	}
   282  
   283  	opts = internal.PkgResourceDefaultOpts(opts)
   284  	var resource Service
   285  	err := ctx.RegisterResource("aws:ecs/service:Service", name, args, &resource, opts...)
   286  	if err != nil {
   287  		return nil, err
   288  	}
   289  	return &resource, nil
   290  }
   291  
   292  // GetService gets an existing Service resource's state with the given name, ID, and optional
   293  // state properties that are used to uniquely qualify the lookup (nil if not required).
   294  func GetService(ctx *pulumi.Context,
   295  	name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) {
   296  	var resource Service
   297  	err := ctx.ReadResource("aws:ecs/service:Service", name, id, state, &resource, opts...)
   298  	if err != nil {
   299  		return nil, err
   300  	}
   301  	return &resource, nil
   302  }
   303  
   304  // Input properties used for looking up and filtering Service resources.
   305  type serviceState struct {
   306  	// Information about the CloudWatch alarms. See below.
   307  	Alarms *ServiceAlarms `pulumi:"alarms"`
   308  	// Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   309  	CapacityProviderStrategies []ServiceCapacityProviderStrategy `pulumi:"capacityProviderStrategies"`
   310  	// ARN of an ECS cluster.
   311  	Cluster *string `pulumi:"cluster"`
   312  	// Configuration block for deployment circuit breaker. See below.
   313  	DeploymentCircuitBreaker *ServiceDeploymentCircuitBreaker `pulumi:"deploymentCircuitBreaker"`
   314  	// Configuration block for deployment controller configuration. See below.
   315  	DeploymentController *ServiceDeploymentController `pulumi:"deploymentController"`
   316  	// Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   317  	DeploymentMaximumPercent *int `pulumi:"deploymentMaximumPercent"`
   318  	// Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   319  	DeploymentMinimumHealthyPercent *int `pulumi:"deploymentMinimumHealthyPercent"`
   320  	// Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   321  	DesiredCount *int `pulumi:"desiredCount"`
   322  	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   323  	EnableEcsManagedTags *bool `pulumi:"enableEcsManagedTags"`
   324  	// Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   325  	EnableExecuteCommand *bool `pulumi:"enableExecuteCommand"`
   326  	// Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   327  	ForceNewDeployment *bool `pulumi:"forceNewDeployment"`
   328  	// Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   329  	HealthCheckGracePeriodSeconds *int `pulumi:"healthCheckGracePeriodSeconds"`
   330  	// ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   331  	IamRole *string `pulumi:"iamRole"`
   332  	// Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   333  	LaunchType *string `pulumi:"launchType"`
   334  	// Configuration block for load balancers. See below.
   335  	LoadBalancers []ServiceLoadBalancer `pulumi:"loadBalancers"`
   336  	// Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   337  	//
   338  	// The following arguments are optional:
   339  	Name *string `pulumi:"name"`
   340  	// 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. See below.
   341  	NetworkConfiguration *ServiceNetworkConfiguration `pulumi:"networkConfiguration"`
   342  	// Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   343  	OrderedPlacementStrategies []ServiceOrderedPlacementStrategy `pulumi:"orderedPlacementStrategies"`
   344  	// Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   345  	PlacementConstraints []ServicePlacementConstraint `pulumi:"placementConstraints"`
   346  	// 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).
   347  	PlatformVersion *string `pulumi:"platformVersion"`
   348  	// Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   349  	PropagateTags *string `pulumi:"propagateTags"`
   350  	// Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   351  	SchedulingStrategy *string `pulumi:"schedulingStrategy"`
   352  	// The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   353  	ServiceConnectConfiguration *ServiceServiceConnectConfiguration `pulumi:"serviceConnectConfiguration"`
   354  	// Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   355  	ServiceRegistries *ServiceServiceRegistries `pulumi:"serviceRegistries"`
   356  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   357  	Tags map[string]string `pulumi:"tags"`
   358  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   359  	//
   360  	// Deprecated: Please use `tags` instead.
   361  	TagsAll map[string]string `pulumi:"tagsAll"`
   362  	// Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   363  	TaskDefinition *string `pulumi:"taskDefinition"`
   364  	// Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   365  	Triggers map[string]string `pulumi:"triggers"`
   366  	// If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   367  	WaitForSteadyState *bool `pulumi:"waitForSteadyState"`
   368  }
   369  
   370  type ServiceState struct {
   371  	// Information about the CloudWatch alarms. See below.
   372  	Alarms ServiceAlarmsPtrInput
   373  	// Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   374  	CapacityProviderStrategies ServiceCapacityProviderStrategyArrayInput
   375  	// ARN of an ECS cluster.
   376  	Cluster pulumi.StringPtrInput
   377  	// Configuration block for deployment circuit breaker. See below.
   378  	DeploymentCircuitBreaker ServiceDeploymentCircuitBreakerPtrInput
   379  	// Configuration block for deployment controller configuration. See below.
   380  	DeploymentController ServiceDeploymentControllerPtrInput
   381  	// Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   382  	DeploymentMaximumPercent pulumi.IntPtrInput
   383  	// Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   384  	DeploymentMinimumHealthyPercent pulumi.IntPtrInput
   385  	// Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   386  	DesiredCount pulumi.IntPtrInput
   387  	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   388  	EnableEcsManagedTags pulumi.BoolPtrInput
   389  	// Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   390  	EnableExecuteCommand pulumi.BoolPtrInput
   391  	// Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   392  	ForceNewDeployment pulumi.BoolPtrInput
   393  	// Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   394  	HealthCheckGracePeriodSeconds pulumi.IntPtrInput
   395  	// ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   396  	IamRole pulumi.StringPtrInput
   397  	// Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   398  	LaunchType pulumi.StringPtrInput
   399  	// Configuration block for load balancers. See below.
   400  	LoadBalancers ServiceLoadBalancerArrayInput
   401  	// Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   402  	//
   403  	// The following arguments are optional:
   404  	Name pulumi.StringPtrInput
   405  	// 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. See below.
   406  	NetworkConfiguration ServiceNetworkConfigurationPtrInput
   407  	// Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   408  	OrderedPlacementStrategies ServiceOrderedPlacementStrategyArrayInput
   409  	// Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   410  	PlacementConstraints ServicePlacementConstraintArrayInput
   411  	// 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).
   412  	PlatformVersion pulumi.StringPtrInput
   413  	// Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   414  	PropagateTags pulumi.StringPtrInput
   415  	// Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   416  	SchedulingStrategy pulumi.StringPtrInput
   417  	// The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   418  	ServiceConnectConfiguration ServiceServiceConnectConfigurationPtrInput
   419  	// Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   420  	ServiceRegistries ServiceServiceRegistriesPtrInput
   421  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   422  	Tags pulumi.StringMapInput
   423  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   424  	//
   425  	// Deprecated: Please use `tags` instead.
   426  	TagsAll pulumi.StringMapInput
   427  	// Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   428  	TaskDefinition pulumi.StringPtrInput
   429  	// Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   430  	Triggers pulumi.StringMapInput
   431  	// If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   432  	WaitForSteadyState pulumi.BoolPtrInput
   433  }
   434  
   435  func (ServiceState) ElementType() reflect.Type {
   436  	return reflect.TypeOf((*serviceState)(nil)).Elem()
   437  }
   438  
   439  type serviceArgs struct {
   440  	// Information about the CloudWatch alarms. See below.
   441  	Alarms *ServiceAlarms `pulumi:"alarms"`
   442  	// Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   443  	CapacityProviderStrategies []ServiceCapacityProviderStrategy `pulumi:"capacityProviderStrategies"`
   444  	// ARN of an ECS cluster.
   445  	Cluster *string `pulumi:"cluster"`
   446  	// Configuration block for deployment circuit breaker. See below.
   447  	DeploymentCircuitBreaker *ServiceDeploymentCircuitBreaker `pulumi:"deploymentCircuitBreaker"`
   448  	// Configuration block for deployment controller configuration. See below.
   449  	DeploymentController *ServiceDeploymentController `pulumi:"deploymentController"`
   450  	// Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   451  	DeploymentMaximumPercent *int `pulumi:"deploymentMaximumPercent"`
   452  	// Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   453  	DeploymentMinimumHealthyPercent *int `pulumi:"deploymentMinimumHealthyPercent"`
   454  	// Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   455  	DesiredCount *int `pulumi:"desiredCount"`
   456  	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   457  	EnableEcsManagedTags *bool `pulumi:"enableEcsManagedTags"`
   458  	// Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   459  	EnableExecuteCommand *bool `pulumi:"enableExecuteCommand"`
   460  	// Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   461  	ForceNewDeployment *bool `pulumi:"forceNewDeployment"`
   462  	// Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   463  	HealthCheckGracePeriodSeconds *int `pulumi:"healthCheckGracePeriodSeconds"`
   464  	// ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   465  	IamRole *string `pulumi:"iamRole"`
   466  	// Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   467  	LaunchType *string `pulumi:"launchType"`
   468  	// Configuration block for load balancers. See below.
   469  	LoadBalancers []ServiceLoadBalancer `pulumi:"loadBalancers"`
   470  	// Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   471  	//
   472  	// The following arguments are optional:
   473  	Name *string `pulumi:"name"`
   474  	// 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. See below.
   475  	NetworkConfiguration *ServiceNetworkConfiguration `pulumi:"networkConfiguration"`
   476  	// Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   477  	OrderedPlacementStrategies []ServiceOrderedPlacementStrategy `pulumi:"orderedPlacementStrategies"`
   478  	// Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   479  	PlacementConstraints []ServicePlacementConstraint `pulumi:"placementConstraints"`
   480  	// 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).
   481  	PlatformVersion *string `pulumi:"platformVersion"`
   482  	// Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   483  	PropagateTags *string `pulumi:"propagateTags"`
   484  	// Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   485  	SchedulingStrategy *string `pulumi:"schedulingStrategy"`
   486  	// The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   487  	ServiceConnectConfiguration *ServiceServiceConnectConfiguration `pulumi:"serviceConnectConfiguration"`
   488  	// Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   489  	ServiceRegistries *ServiceServiceRegistries `pulumi:"serviceRegistries"`
   490  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   491  	Tags map[string]string `pulumi:"tags"`
   492  	// Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   493  	TaskDefinition *string `pulumi:"taskDefinition"`
   494  	// Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   495  	Triggers map[string]string `pulumi:"triggers"`
   496  	// If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   497  	WaitForSteadyState *bool `pulumi:"waitForSteadyState"`
   498  }
   499  
   500  // The set of arguments for constructing a Service resource.
   501  type ServiceArgs struct {
   502  	// Information about the CloudWatch alarms. See below.
   503  	Alarms ServiceAlarmsPtrInput
   504  	// Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   505  	CapacityProviderStrategies ServiceCapacityProviderStrategyArrayInput
   506  	// ARN of an ECS cluster.
   507  	Cluster pulumi.StringPtrInput
   508  	// Configuration block for deployment circuit breaker. See below.
   509  	DeploymentCircuitBreaker ServiceDeploymentCircuitBreakerPtrInput
   510  	// Configuration block for deployment controller configuration. See below.
   511  	DeploymentController ServiceDeploymentControllerPtrInput
   512  	// Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   513  	DeploymentMaximumPercent pulumi.IntPtrInput
   514  	// Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   515  	DeploymentMinimumHealthyPercent pulumi.IntPtrInput
   516  	// Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   517  	DesiredCount pulumi.IntPtrInput
   518  	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   519  	EnableEcsManagedTags pulumi.BoolPtrInput
   520  	// Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   521  	EnableExecuteCommand pulumi.BoolPtrInput
   522  	// Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   523  	ForceNewDeployment pulumi.BoolPtrInput
   524  	// Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   525  	HealthCheckGracePeriodSeconds pulumi.IntPtrInput
   526  	// ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   527  	IamRole pulumi.StringPtrInput
   528  	// Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   529  	LaunchType pulumi.StringPtrInput
   530  	// Configuration block for load balancers. See below.
   531  	LoadBalancers ServiceLoadBalancerArrayInput
   532  	// Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   533  	//
   534  	// The following arguments are optional:
   535  	Name pulumi.StringPtrInput
   536  	// 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. See below.
   537  	NetworkConfiguration ServiceNetworkConfigurationPtrInput
   538  	// Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   539  	OrderedPlacementStrategies ServiceOrderedPlacementStrategyArrayInput
   540  	// Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   541  	PlacementConstraints ServicePlacementConstraintArrayInput
   542  	// 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).
   543  	PlatformVersion pulumi.StringPtrInput
   544  	// Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   545  	PropagateTags pulumi.StringPtrInput
   546  	// Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   547  	SchedulingStrategy pulumi.StringPtrInput
   548  	// The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   549  	ServiceConnectConfiguration ServiceServiceConnectConfigurationPtrInput
   550  	// Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   551  	ServiceRegistries ServiceServiceRegistriesPtrInput
   552  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   553  	Tags pulumi.StringMapInput
   554  	// Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   555  	TaskDefinition pulumi.StringPtrInput
   556  	// Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   557  	Triggers pulumi.StringMapInput
   558  	// If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   559  	WaitForSteadyState pulumi.BoolPtrInput
   560  }
   561  
   562  func (ServiceArgs) ElementType() reflect.Type {
   563  	return reflect.TypeOf((*serviceArgs)(nil)).Elem()
   564  }
   565  
   566  type ServiceInput interface {
   567  	pulumi.Input
   568  
   569  	ToServiceOutput() ServiceOutput
   570  	ToServiceOutputWithContext(ctx context.Context) ServiceOutput
   571  }
   572  
   573  func (*Service) ElementType() reflect.Type {
   574  	return reflect.TypeOf((**Service)(nil)).Elem()
   575  }
   576  
   577  func (i *Service) ToServiceOutput() ServiceOutput {
   578  	return i.ToServiceOutputWithContext(context.Background())
   579  }
   580  
   581  func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
   582  	return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput)
   583  }
   584  
   585  // ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values.
   586  // You can construct a concrete instance of `ServiceArrayInput` via:
   587  //
   588  //	ServiceArray{ ServiceArgs{...} }
   589  type ServiceArrayInput interface {
   590  	pulumi.Input
   591  
   592  	ToServiceArrayOutput() ServiceArrayOutput
   593  	ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput
   594  }
   595  
   596  type ServiceArray []ServiceInput
   597  
   598  func (ServiceArray) ElementType() reflect.Type {
   599  	return reflect.TypeOf((*[]*Service)(nil)).Elem()
   600  }
   601  
   602  func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput {
   603  	return i.ToServiceArrayOutputWithContext(context.Background())
   604  }
   605  
   606  func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
   607  	return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput)
   608  }
   609  
   610  // ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values.
   611  // You can construct a concrete instance of `ServiceMapInput` via:
   612  //
   613  //	ServiceMap{ "key": ServiceArgs{...} }
   614  type ServiceMapInput interface {
   615  	pulumi.Input
   616  
   617  	ToServiceMapOutput() ServiceMapOutput
   618  	ToServiceMapOutputWithContext(context.Context) ServiceMapOutput
   619  }
   620  
   621  type ServiceMap map[string]ServiceInput
   622  
   623  func (ServiceMap) ElementType() reflect.Type {
   624  	return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
   625  }
   626  
   627  func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput {
   628  	return i.ToServiceMapOutputWithContext(context.Background())
   629  }
   630  
   631  func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
   632  	return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput)
   633  }
   634  
   635  type ServiceOutput struct{ *pulumi.OutputState }
   636  
   637  func (ServiceOutput) ElementType() reflect.Type {
   638  	return reflect.TypeOf((**Service)(nil)).Elem()
   639  }
   640  
   641  func (o ServiceOutput) ToServiceOutput() ServiceOutput {
   642  	return o
   643  }
   644  
   645  func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
   646  	return o
   647  }
   648  
   649  // Information about the CloudWatch alarms. See below.
   650  func (o ServiceOutput) Alarms() ServiceAlarmsPtrOutput {
   651  	return o.ApplyT(func(v *Service) ServiceAlarmsPtrOutput { return v.Alarms }).(ServiceAlarmsPtrOutput)
   652  }
   653  
   654  // Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `forceNewDeployment = true` and not changing from 0 `capacityProviderStrategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launchType`.
   655  func (o ServiceOutput) CapacityProviderStrategies() ServiceCapacityProviderStrategyArrayOutput {
   656  	return o.ApplyT(func(v *Service) ServiceCapacityProviderStrategyArrayOutput { return v.CapacityProviderStrategies }).(ServiceCapacityProviderStrategyArrayOutput)
   657  }
   658  
   659  // ARN of an ECS cluster.
   660  func (o ServiceOutput) Cluster() pulumi.StringOutput {
   661  	return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Cluster }).(pulumi.StringOutput)
   662  }
   663  
   664  // Configuration block for deployment circuit breaker. See below.
   665  func (o ServiceOutput) DeploymentCircuitBreaker() ServiceDeploymentCircuitBreakerPtrOutput {
   666  	return o.ApplyT(func(v *Service) ServiceDeploymentCircuitBreakerPtrOutput { return v.DeploymentCircuitBreaker }).(ServiceDeploymentCircuitBreakerPtrOutput)
   667  }
   668  
   669  // Configuration block for deployment controller configuration. See below.
   670  func (o ServiceOutput) DeploymentController() ServiceDeploymentControllerPtrOutput {
   671  	return o.ApplyT(func(v *Service) ServiceDeploymentControllerPtrOutput { return v.DeploymentController }).(ServiceDeploymentControllerPtrOutput)
   672  }
   673  
   674  // Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
   675  func (o ServiceOutput) DeploymentMaximumPercent() pulumi.IntPtrOutput {
   676  	return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.DeploymentMaximumPercent }).(pulumi.IntPtrOutput)
   677  }
   678  
   679  // Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
   680  func (o ServiceOutput) DeploymentMinimumHealthyPercent() pulumi.IntPtrOutput {
   681  	return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.DeploymentMinimumHealthyPercent }).(pulumi.IntPtrOutput)
   682  }
   683  
   684  // Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
   685  func (o ServiceOutput) DesiredCount() pulumi.IntPtrOutput {
   686  	return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.DesiredCount }).(pulumi.IntPtrOutput)
   687  }
   688  
   689  // Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
   690  func (o ServiceOutput) EnableEcsManagedTags() pulumi.BoolPtrOutput {
   691  	return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.EnableEcsManagedTags }).(pulumi.BoolPtrOutput)
   692  }
   693  
   694  // Specifies whether to enable Amazon ECS Exec for the tasks within the service.
   695  func (o ServiceOutput) EnableExecuteCommand() pulumi.BoolPtrOutput {
   696  	return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.EnableExecuteCommand }).(pulumi.BoolPtrOutput)
   697  }
   698  
   699  // Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy` and `placementConstraints` updates.
   700  func (o ServiceOutput) ForceNewDeployment() pulumi.BoolPtrOutput {
   701  	return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.ForceNewDeployment }).(pulumi.BoolPtrOutput)
   702  }
   703  
   704  // Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
   705  func (o ServiceOutput) HealthCheckGracePeriodSeconds() pulumi.IntPtrOutput {
   706  	return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.HealthCheckGracePeriodSeconds }).(pulumi.IntPtrOutput)
   707  }
   708  
   709  // ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
   710  func (o ServiceOutput) IamRole() pulumi.StringOutput {
   711  	return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.IamRole }).(pulumi.StringOutput)
   712  }
   713  
   714  // Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacityProviderStrategy`.
   715  func (o ServiceOutput) LaunchType() pulumi.StringOutput {
   716  	return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.LaunchType }).(pulumi.StringOutput)
   717  }
   718  
   719  // Configuration block for load balancers. See below.
   720  func (o ServiceOutput) LoadBalancers() ServiceLoadBalancerArrayOutput {
   721  	return o.ApplyT(func(v *Service) ServiceLoadBalancerArrayOutput { return v.LoadBalancers }).(ServiceLoadBalancerArrayOutput)
   722  }
   723  
   724  // Name of the service (up to 255 letters, numbers, hyphens, and underscores)
   725  //
   726  // The following arguments are optional:
   727  func (o ServiceOutput) Name() pulumi.StringOutput {
   728  	return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   729  }
   730  
   731  // 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. See below.
   732  func (o ServiceOutput) NetworkConfiguration() ServiceNetworkConfigurationPtrOutput {
   733  	return o.ApplyT(func(v *Service) ServiceNetworkConfigurationPtrOutput { return v.NetworkConfiguration }).(ServiceNetworkConfigurationPtrOutput)
   734  }
   735  
   736  // Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. The maximum number of `orderedPlacementStrategy` blocks is `5`. See below.
   737  func (o ServiceOutput) OrderedPlacementStrategies() ServiceOrderedPlacementStrategyArrayOutput {
   738  	return o.ApplyT(func(v *Service) ServiceOrderedPlacementStrategyArrayOutput { return v.OrderedPlacementStrategies }).(ServiceOrderedPlacementStrategyArrayOutput)
   739  }
   740  
   741  // Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `forceNewDeployment` is enabled. Maximum number of `placementConstraints` is `10`. See below.
   742  func (o ServiceOutput) PlacementConstraints() ServicePlacementConstraintArrayOutput {
   743  	return o.ApplyT(func(v *Service) ServicePlacementConstraintArrayOutput { return v.PlacementConstraints }).(ServicePlacementConstraintArrayOutput)
   744  }
   745  
   746  // 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).
   747  func (o ServiceOutput) PlatformVersion() pulumi.StringOutput {
   748  	return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PlatformVersion }).(pulumi.StringOutput)
   749  }
   750  
   751  // Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
   752  func (o ServiceOutput) PropagateTags() pulumi.StringPtrOutput {
   753  	return o.ApplyT(func(v *Service) pulumi.StringPtrOutput { return v.PropagateTags }).(pulumi.StringPtrOutput)
   754  }
   755  
   756  // Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
   757  func (o ServiceOutput) SchedulingStrategy() pulumi.StringPtrOutput {
   758  	return o.ApplyT(func(v *Service) pulumi.StringPtrOutput { return v.SchedulingStrategy }).(pulumi.StringPtrOutput)
   759  }
   760  
   761  // The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
   762  func (o ServiceOutput) ServiceConnectConfiguration() ServiceServiceConnectConfigurationPtrOutput {
   763  	return o.ApplyT(func(v *Service) ServiceServiceConnectConfigurationPtrOutput { return v.ServiceConnectConfiguration }).(ServiceServiceConnectConfigurationPtrOutput)
   764  }
   765  
   766  // Service discovery registries for the service. The maximum number of `serviceRegistries` blocks is `1`. See below.
   767  func (o ServiceOutput) ServiceRegistries() ServiceServiceRegistriesPtrOutput {
   768  	return o.ApplyT(func(v *Service) ServiceServiceRegistriesPtrOutput { return v.ServiceRegistries }).(ServiceServiceRegistriesPtrOutput)
   769  }
   770  
   771  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   772  func (o ServiceOutput) Tags() pulumi.StringMapOutput {
   773  	return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   774  }
   775  
   776  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   777  //
   778  // Deprecated: Please use `tags` instead.
   779  func (o ServiceOutput) TagsAll() pulumi.StringMapOutput {
   780  	return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   781  }
   782  
   783  // Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
   784  func (o ServiceOutput) TaskDefinition() pulumi.StringPtrOutput {
   785  	return o.ApplyT(func(v *Service) pulumi.StringPtrOutput { return v.TaskDefinition }).(pulumi.StringPtrOutput)
   786  }
   787  
   788  // Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
   789  func (o ServiceOutput) Triggers() pulumi.StringMapOutput {
   790  	return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Triggers }).(pulumi.StringMapOutput)
   791  }
   792  
   793  // If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
   794  func (o ServiceOutput) WaitForSteadyState() pulumi.BoolPtrOutput {
   795  	return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.WaitForSteadyState }).(pulumi.BoolPtrOutput)
   796  }
   797  
   798  type ServiceArrayOutput struct{ *pulumi.OutputState }
   799  
   800  func (ServiceArrayOutput) ElementType() reflect.Type {
   801  	return reflect.TypeOf((*[]*Service)(nil)).Elem()
   802  }
   803  
   804  func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput {
   805  	return o
   806  }
   807  
   808  func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
   809  	return o
   810  }
   811  
   812  func (o ServiceArrayOutput) Index(i pulumi.IntInput) ServiceOutput {
   813  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Service {
   814  		return vs[0].([]*Service)[vs[1].(int)]
   815  	}).(ServiceOutput)
   816  }
   817  
   818  type ServiceMapOutput struct{ *pulumi.OutputState }
   819  
   820  func (ServiceMapOutput) ElementType() reflect.Type {
   821  	return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
   822  }
   823  
   824  func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput {
   825  	return o
   826  }
   827  
   828  func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
   829  	return o
   830  }
   831  
   832  func (o ServiceMapOutput) MapIndex(k pulumi.StringInput) ServiceOutput {
   833  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Service {
   834  		return vs[0].(map[string]*Service)[vs[1].(string)]
   835  	}).(ServiceOutput)
   836  }
   837  
   838  func init() {
   839  	pulumi.RegisterInputType(reflect.TypeOf((*ServiceInput)(nil)).Elem(), &Service{})
   840  	pulumi.RegisterInputType(reflect.TypeOf((*ServiceArrayInput)(nil)).Elem(), ServiceArray{})
   841  	pulumi.RegisterInputType(reflect.TypeOf((*ServiceMapInput)(nil)).Elem(), ServiceMap{})
   842  	pulumi.RegisterOutputType(ServiceOutput{})
   843  	pulumi.RegisterOutputType(ServiceArrayOutput{})
   844  	pulumi.RegisterOutputType(ServiceMapOutput{})
   845  }