1. Packages
  2. AWS Classic
  3. API Docs
  4. batch
  5. getSchedulingPolicy

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.batch.getSchedulingPolicy

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    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",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.batch.get_scheduling_policy(arn="arn:aws:batch:us-east-1:012345678910:scheduling-policy/example")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:batch:getSchedulingPolicy
          Arguments:
            arn: arn:aws:batch:us-east-1:012345678910:scheduling-policy/example
    

    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>
    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]
    func LookupSchedulingPolicy(ctx *Context, args *LookupSchedulingPolicyArgs, opts ...InvokeOption) (*LookupSchedulingPolicyResult, error)
    func LookupSchedulingPolicyOutput(ctx *Context, args *LookupSchedulingPolicyOutputArgs, opts ...InvokeOption) LookupSchedulingPolicyResultOutput

    > 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)
    }
    public static CompletableFuture<GetSchedulingPolicyResult> getSchedulingPolicy(GetSchedulingPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:batch/getSchedulingPolicy:getSchedulingPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Arn string
    ARN of the scheduling policy.
    Tags Dictionary<string, string>
    Key-value map of resource tags
    Arn string
    ARN of the scheduling policy.
    Tags map[string]string
    Key-value map of resource tags
    arn String
    ARN of the scheduling policy.
    tags Map<String,String>
    Key-value map of resource tags
    arn string
    ARN of the scheduling policy.
    tags {[key: string]: string}
    Key-value map of resource tags
    arn str
    ARN of the scheduling policy.
    tags Mapping[str, str]
    Key-value map of resource tags
    arn 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 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 int
    ShareDistributions 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 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 int
    ShareDistributions []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 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 Integer
    shareDistributions 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 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 number
    shareDistributions 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 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 int
    share_distributions 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 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 Number
    shareDistributions 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 string
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    WeightFactor double
    Weight factor for the fair share identifier. For more information, see ShareAttributes.
    ShareIdentifier string
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    WeightFactor float64
    Weight factor for the fair share identifier. For more information, see ShareAttributes.
    shareIdentifier String
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    weightFactor Double
    Weight factor for the fair share identifier. For more information, see ShareAttributes.
    shareIdentifier string
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    weightFactor number
    Weight factor for the fair share identifier. For more information, see ShareAttributes.
    share_identifier str
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    weight_factor float
    Weight factor for the fair share identifier. For more information, see ShareAttributes.
    shareIdentifier String
    Fair share identifier or fair share identifier prefix. For more information, see ShareAttributes.
    weightFactor 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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi