1. Packages
  2. AWS
  3. API Docs
  4. batch
  5. getSchedulingPolicy
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.batch.getSchedulingPolicy

Explore with Pulumi AI

The Batch Scheduling Policy data source allows access to details of a specific Scheduling Policy within AWS Batch.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = aws.batch.getSchedulingPolicy({
    arn: "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.batch.get_scheduling_policy(arn="arn:aws:batch:us-east-1:012345678910:scheduling-policy/example")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := batch.LookupSchedulingPolicy(ctx, &batch.LookupSchedulingPolicyArgs{
			Arn: "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = Aws.Batch.GetSchedulingPolicy.Invoke(new()
    {
        Arn = "arn:aws:batch:us-east-1:012345678910:scheduling-policy/example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.batch.BatchFunctions;
import com.pulumi.aws.batch.inputs.GetSchedulingPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = BatchFunctions.getSchedulingPolicy(GetSchedulingPolicyArgs.builder()
            .arn("arn:aws:batch:us-east-1:012345678910:scheduling-policy/example")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: aws:batch:getSchedulingPolicy
      arguments:
        arn: arn:aws:batch:us-east-1:012345678910:scheduling-policy/example
Copy

Using getSchedulingPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSchedulingPolicy(args: GetSchedulingPolicyArgs, opts?: InvokeOptions): Promise<GetSchedulingPolicyResult>
function getSchedulingPolicyOutput(args: GetSchedulingPolicyOutputArgs, opts?: InvokeOptions): Output<GetSchedulingPolicyResult>
Copy
def get_scheduling_policy(arn: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSchedulingPolicyResult
def get_scheduling_policy_output(arn: Optional[pulumi.Input[str]] = None,
                          tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSchedulingPolicyResult]
Copy
func LookupSchedulingPolicy(ctx *Context, args *LookupSchedulingPolicyArgs, opts ...InvokeOption) (*LookupSchedulingPolicyResult, error)
func LookupSchedulingPolicyOutput(ctx *Context, args *LookupSchedulingPolicyOutputArgs, opts ...InvokeOption) LookupSchedulingPolicyResultOutput
Copy

> Note: This function is named LookupSchedulingPolicy in the Go SDK.

public static class GetSchedulingPolicy 
{
    public static Task<GetSchedulingPolicyResult> InvokeAsync(GetSchedulingPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetSchedulingPolicyResult> Invoke(GetSchedulingPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSchedulingPolicyResult> getSchedulingPolicy(GetSchedulingPolicyArgs args, InvokeOptions options)
public static Output<GetSchedulingPolicyResult> getSchedulingPolicy(GetSchedulingPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:batch/getSchedulingPolicy:getSchedulingPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Arn This property is required. string
ARN of the scheduling policy.
Tags Dictionary<string, string>
Key-value map of resource tags
Arn This property is required. string
ARN of the scheduling policy.
Tags map[string]string
Key-value map of resource tags
arn This property is required. String
ARN of the scheduling policy.
tags Map<String,String>
Key-value map of resource tags
arn This property is required. string
ARN of the scheduling policy.
tags {[key: string]: string}
Key-value map of resource tags
arn This property is required. str
ARN of the scheduling policy.
tags Mapping[str, str]
Key-value map of resource tags
arn This property is required. String
ARN of the scheduling policy.
tags Map<String>
Key-value map of resource tags

getSchedulingPolicy Result

The following output properties are available:

Arn string
FairSharePolicies List<GetSchedulingPolicyFairSharePolicy>
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the scheduling policy.
Tags Dictionary<string, string>
Key-value map of resource tags
Arn string
FairSharePolicies []GetSchedulingPolicyFairSharePolicy
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the scheduling policy.
Tags map[string]string
Key-value map of resource tags
arn String
fairSharePolicies List<GetSchedulingPolicyFairSharePolicy>
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the scheduling policy.
tags Map<String,String>
Key-value map of resource tags
arn string
fairSharePolicies GetSchedulingPolicyFairSharePolicy[]
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the scheduling policy.
tags {[key: string]: string}
Key-value map of resource tags
arn str
fair_share_policies Sequence[GetSchedulingPolicyFairSharePolicy]
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the scheduling policy.
tags Mapping[str, str]
Key-value map of resource tags
arn String
fairSharePolicies List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the scheduling policy.
tags Map<String>
Key-value map of resource tags

Supporting Types

GetSchedulingPolicyFairSharePolicy

ComputeReservation This property is required. int
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
ShareDecaySeconds This property is required. int
ShareDistributions This property is required. List<GetSchedulingPolicyFairSharePolicyShareDistribution>
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.
ComputeReservation This property is required. int
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
ShareDecaySeconds This property is required. int
ShareDistributions This property is required. []GetSchedulingPolicyFairSharePolicyShareDistribution
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.
computeReservation This property is required. Integer
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
shareDecaySeconds This property is required. Integer
shareDistributions This property is required. List<GetSchedulingPolicyFairSharePolicyShareDistribution>
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.
computeReservation This property is required. number
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
shareDecaySeconds This property is required. number
shareDistributions This property is required. GetSchedulingPolicyFairSharePolicyShareDistribution[]
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.
compute_reservation This property is required. int
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
share_decay_seconds This property is required. int
share_distributions This property is required. Sequence[GetSchedulingPolicyFairSharePolicyShareDistribution]
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.
computeReservation This property is required. Number
Value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see FairsharePolicy.
shareDecaySeconds This property is required. Number
shareDistributions This property is required. List<Property Map>
One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see FairsharePolicy. The share_distribution block is documented below.

GetSchedulingPolicyFairSharePolicyShareDistribution

ShareIdentifier This property is required. string
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
WeightFactor This property is required. double
Weight factor for the fair share identifier. For more information, see ShareAttributes.
ShareIdentifier This property is required. string
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
WeightFactor This property is required. float64
Weight factor for the fair share identifier. For more information, see ShareAttributes.
shareIdentifier This property is required. String
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
weightFactor This property is required. Double
Weight factor for the fair share identifier. For more information, see ShareAttributes.
shareIdentifier This property is required. string
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
weightFactor This property is required. number
Weight factor for the fair share identifier. For more information, see ShareAttributes.
share_identifier This property is required. str
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
weight_factor This property is required. float
Weight factor for the fair share identifier. For more information, see ShareAttributes.
shareIdentifier This property is required. String
Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
weightFactor This property is required. Number
Weight factor for the fair share identifier. For more information, see ShareAttributes.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.