package awsecs import ( "github.com/aws/aws-cdk-go/awscdk/v2" ) // The properties for the base Ec2Service or FargateService service. // // Example: // // The code below shows an example of how to instantiate this type. // // The values are placeholders you should change. // import "github.com/aws/aws-cdk-go/awscdk" // import "github.com/aws/aws-cdk-go/awscdk" // import "github.com/aws/aws-cdk-go/awscdk" // // var cluster cluster // var containerDefinition containerDefinition // var logDriver logDriver // var namespace iNamespace // // baseServiceOptions := &BaseServiceOptions{ // Cluster: cluster, // // // the properties below are optional // CapacityProviderStrategies: []capacityProviderStrategy{ // &capacityProviderStrategy{ // CapacityProvider: jsii.String("capacityProvider"), // // // the properties below are optional // Base: jsii.Number(123), // Weight: jsii.Number(123), // }, // }, // CircuitBreaker: &DeploymentCircuitBreaker{ // Rollback: jsii.Boolean(false), // }, // CloudMapOptions: &CloudMapOptions{ // CloudMapNamespace: namespace, // Container: containerDefinition, // ContainerPort: jsii.Number(123), // DnsRecordType: awscdk.Aws_servicediscovery.DnsRecordType_A, // DnsTtl: cdk.Duration_Minutes(jsii.Number(30)), // FailureThreshold: jsii.Number(123), // Name: jsii.String("name"), // }, // DeploymentAlarms: &DeploymentAlarmConfig{ // AlarmNames: []*string{ // jsii.String("alarmNames"), // }, // // // the properties below are optional // Behavior: awscdk.Aws_ecs.AlarmBehavior_ROLLBACK_ON_ALARM, // }, // DeploymentController: &DeploymentController{ // Type: awscdk.*Aws_ecs.DeploymentControllerType_ECS, // }, // DesiredCount: jsii.Number(123), // EnableECSManagedTags: jsii.Boolean(false), // EnableExecuteCommand: jsii.Boolean(false), // HealthCheckGracePeriod: cdk.Duration_*Minutes(jsii.Number(30)), // MaxHealthyPercent: jsii.Number(123), // MinHealthyPercent: jsii.Number(123), // PropagateTags: awscdk.*Aws_ecs.PropagatedTagSource_SERVICE, // ServiceConnectConfiguration: &ServiceConnectProps{ // LogDriver: logDriver, // Namespace: jsii.String("namespace"), // Services: []serviceConnectService{ // &serviceConnectService{ // PortMappingName: jsii.String("portMappingName"), // // // the properties below are optional // DiscoveryName: jsii.String("discoveryName"), // DnsName: jsii.String("dnsName"), // IngressPortOverride: jsii.Number(123), // Port: jsii.Number(123), // }, // }, // }, // ServiceName: jsii.String("serviceName"), // } // type BaseServiceOptions struct { // The name of the cluster that hosts the service. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // A list of Capacity Provider strategies used to place a service. CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"` // The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. DeploymentAlarms *DeploymentAlarmConfig `field:"optional" json:"deploymentAlarms" yaml:"deploymentAlarms"` // Specifies which deployment controller to use for the service. // // For more information, see // [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"` // The desired number of instantiations of the task definition to keep running on the service. DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"` // Specifies whether to enable Amazon ECS managed tags for the tasks within the service. // // For more information, see // [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"` // Whether to enable the ability to execute into a container. EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"` // The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"` // The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"` // Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. // // Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"` // Configuration for Service Connect. ServiceConnectConfiguration *ServiceConnectProps `field:"optional" json:"serviceConnectConfiguration" yaml:"serviceConnectConfiguration"` // The name of the service. ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"` }