package awsecspatterns import ( "github.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling" "github.com/aws/aws-cdk-go/awscdk/v2/awsec2" "github.com/aws/aws-cdk-go/awscdk/v2/awsecs" "github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets" ) // The properties for the base ScheduledEc2Task or ScheduledFargateTask task. // // 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" // import "github.com/aws/aws-cdk-go/awscdk" // // var cluster cluster // var schedule schedule // var securityGroup securityGroup // var subnet subnet // var subnetFilter subnetFilter // var vpc vpc // // scheduledTaskBaseProps := &ScheduledTaskBaseProps{ // Schedule: schedule, // // // the properties below are optional // Cluster: cluster, // DesiredTaskCount: jsii.Number(123), // Enabled: jsii.Boolean(false), // PropagateTags: awscdk.Aws_ecs.PropagatedTagSource_SERVICE, // RuleName: jsii.String("ruleName"), // SecurityGroups: []iSecurityGroup{ // securityGroup, // }, // SubnetSelection: &SubnetSelection{ // AvailabilityZones: []*string{ // jsii.String("availabilityZones"), // }, // OnePerAz: jsii.Boolean(false), // SubnetFilters: []*subnetFilter{ // subnetFilter, // }, // SubnetGroupName: jsii.String("subnetGroupName"), // Subnets: []iSubnet{ // subnet, // }, // SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, // }, // Tags: []tag{ // &tag{ // Key: jsii.String("key"), // Value: jsii.String("value"), // }, // }, // Vpc: vpc, // } // type ScheduledTaskBaseProps struct { // The schedule or rate (frequency) that determines when CloudWatch Events runs the rule. // // For more information, see // [Schedule Expression Syntax for Rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html) // in the Amazon CloudWatch User Guide. Schedule awsapplicationautoscaling.Schedule `field:"required" json:"schedule" yaml:"schedule"` // The name of the cluster that hosts the service. // // If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc. Cluster awsecs.ICluster `field:"optional" json:"cluster" yaml:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. DesiredTaskCount *float64 `field:"optional" json:"desiredTaskCount" yaml:"desiredTaskCount"` // Indicates whether the rule is enabled. Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // Specifies whether to propagate the tags from the task definition to the task. // // If no value is specified, the tags are not propagated. PropagateTags awsecs.PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"` // A name for the rule. RuleName *string `field:"optional" json:"ruleName" yaml:"ruleName"` // Existing security groups to use for your service. SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // In what subnets to place the task's ENIs. // // (Only applicable in case the TaskDefinition is configured for AwsVpc networking). SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // The metadata that you apply to the task to help you categorize and organize them. // // Each tag consists of a key and an optional value, both of which you define. Tags *[]*awseventstargets.Tag `field:"optional" json:"tags" yaml:"tags"` // The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed. // // If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster. Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }