# CfnSchedulingPolicyProps

Properties for defining a `CfnSchedulingPolicy`.

Used as props by: [CfnSchedulingPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.html)

- Source: Generated at build time
- Type last changed: v2.245.0 · 27 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const cfnSchedulingPolicyProps: batch.CfnSchedulingPolicyProps = {
  fairsharePolicy: {
    computeReservation: 123,
    shareDecaySeconds: 123,
    shareDistribution: [{
      shareIdentifier: 'shareIdentifier',
      weightFactor: 123,
    }],
  },
  name: 'name',
  quotaSharePolicy: {
    idleResourceAssignmentStrategy: 'idleResourceAssignmentStrategy',
  },
  tags: {
    tagsKey: 'tags',
  },
};
```

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_batch as batch

cfn_scheduling_policy_props = batch.CfnSchedulingPolicyProps(
    fairshare_policy=batch.CfnSchedulingPolicy.FairsharePolicyProperty(
        compute_reservation=123,
        share_decay_seconds=123,
        share_distribution=[batch.CfnSchedulingPolicy.ShareAttributesProperty(
            share_identifier="shareIdentifier",
            weight_factor=123
        )]
    ),
    name="name",
    quota_share_policy=batch.CfnSchedulingPolicy.QuotaSharePolicyProperty(
        idle_resource_assignment_strategy="idleResourceAssignmentStrategy"
    ),
    tags={
        "tags_key": "tags"
    }
)
```

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.batch.*;

CfnSchedulingPolicyProps cfnSchedulingPolicyProps = CfnSchedulingPolicyProps.builder()
        .fairsharePolicy(FairsharePolicyProperty.builder()
                .computeReservation(123)
                .shareDecaySeconds(123)
                .shareDistribution(List.of(ShareAttributesProperty.builder()
                        .shareIdentifier("shareIdentifier")
                        .weightFactor(123)
                        .build()))
                .build())
        .name("name")
        .quotaSharePolicy(QuotaSharePolicyProperty.builder()
                .idleResourceAssignmentStrategy("idleResourceAssignmentStrategy")
                .build())
        .tags(Map.of(
                "tagsKey", "tags"))
        .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.Batch;

var cfnSchedulingPolicyProps = new CfnSchedulingPolicyProps {
    FairsharePolicy = new FairsharePolicyProperty {
        ComputeReservation = 123,
        ShareDecaySeconds = 123,
        ShareDistribution = new [] { new ShareAttributesProperty {
            ShareIdentifier = "shareIdentifier",
            WeightFactor = 123
        } }
    },
    Name = "name",
    QuotaSharePolicy = new QuotaSharePolicyProperty {
        IdleResourceAssignmentStrategy = "idleResourceAssignmentStrategy"
    },
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
```

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"

cfnSchedulingPolicyProps := &CfnSchedulingPolicyProps{
	FairsharePolicy: &FairsharePolicyProperty{
		ComputeReservation: jsii.Number(123),
		ShareDecaySeconds: jsii.Number(123),
		ShareDistribution: []interface{}{
			&ShareAttributesProperty{
				ShareIdentifier: jsii.String("shareIdentifier"),
				WeightFactor: jsii.Number(123),
			},
		},
	},
	Name: jsii.String("name"),
	QuotaSharePolicy: &QuotaSharePolicyProperty{
		IdleResourceAssignmentStrategy: jsii.String("idleResourceAssignmentStrategy"),
	},
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}
```

## Properties

- `fairsharePolicy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSchedulingPolicy.FairsharePolicyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.FairsharePolicyProperty.html) — The fair-share scheduling policy details.

- `name`: string — The name of the fair-share scheduling policy.

  It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).

- `quotaSharePolicy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSchedulingPolicy.QuotaSharePolicyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.QuotaSharePolicyProperty.html) — Quota Share Policy for the Job Queue.

- `tags`: { [key: string]: string } — The tags that you apply to the scheduling policy to help you categorize and organize your resources.

  Each tag consists of a key and an optional value. For more information, see [Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in *AWS General Reference* .

  These tags can be updated or removed using the [TagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html) and [UntagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html) API operations.
