# ScheduledFargateTaskDefinitionOptions

The properties for the ScheduledFargateTask using a task definition.

- Source: [`aws-ecs-patterns/lib/fargate/scheduled-fargate-task.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.ts#L41)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_ecs_patterns as ecs_patterns } from 'aws-cdk-lib';

declare const fargateTaskDefinition: ecs.FargateTaskDefinition;
const scheduledFargateTaskDefinitionOptions: ecs_patterns.ScheduledFargateTaskDefinitionOptions = {
  taskDefinition: fargateTaskDefinition,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
from aws_cdk import aws_ecs_patterns as ecs_patterns

# fargate_task_definition: ecs.FargateTaskDefinition

scheduled_fargate_task_definition_options = ecs_patterns.ScheduledFargateTaskDefinitionOptions(
    task_definition=fargate_task_definition
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.ecs.patterns.*;

FargateTaskDefinition fargateTaskDefinition;

ScheduledFargateTaskDefinitionOptions scheduledFargateTaskDefinitionOptions = ScheduledFargateTaskDefinitionOptions.builder()
        .taskDefinition(fargateTaskDefinition)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.ECS.Patterns;

FargateTaskDefinition fargateTaskDefinition;

var scheduledFargateTaskDefinitionOptions = new ScheduledFargateTaskDefinitionOptions {
    TaskDefinition = fargateTaskDefinition
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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"

var fargateTaskDefinition FargateTaskDefinition

scheduledFargateTaskDefinitionOptions := &ScheduledFargateTaskDefinitionOptions{
	TaskDefinition: fargateTaskDefinition,
}
```

## Properties

- `taskDefinition`: [FargateTaskDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.FargateTaskDefinition.html) (required) = none — The task definition to use for tasks in the service. Image or taskDefinition must be specified, but not both.

  [disable-awslint:ref-via-interface]
