Skip to content
v2.278.0

CfnSchedulingPolicyProps Struct ​

Properties for defining a CfnSchedulingPolicy.

Example ​

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
# 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
// 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();
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" }
    }
};
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 ​

fairsharePolicyoptionalIResolvable | CfnSchedulingPolicy.FairsharePolicyPropertyfairshare_policyoptionaltyping.Union[IResolvable, FairsharePolicyProperty]fairsharePolicyoptionalIResolvableFairsharePolicyoptionalIResolvableFairsharePolicyoptionalinterface{} #
The fair-share scheduling policy details.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*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 (_).

quotaSharePolicyoptionalIResolvable | CfnSchedulingPolicy.QuotaSharePolicyPropertyquota_share_policyoptionaltyping.Union[IResolvable, QuotaSharePolicyProperty]quotaSharePolicyoptionalIResolvableQuotaSharePolicyoptionalIResolvableQuotaSharePolicyoptionalinterface{} #
Quota Share Policy for the Job Queue.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #
The tags that you apply to the scheduling policy to help you categorize and organize your resources.
notes

Each tag consists of a key and an optional value. For more information, see Tagging AWS Resources in AWS General Reference .

These tags can be updated or removed using the TagResource and UntagResource API operations.