1. Packages
  2. AWS
  3. API Docs
  4. codebuild
  5. getFleet
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.codebuild.getFleet

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Retrieve information about an CodeBuild Fleet.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const testFleet = new aws.codebuild.Fleet("test", {
        baseCapacity: 2,
        computeType: "BUILD_GENERAL1_SMALL",
        environmentType: "LINUX_CONTAINER",
        name: "full-example-codebuild-fleet",
        overflowBehavior: "QUEUE",
        scalingConfiguration: {
            maxCapacity: 5,
            scalingType: "TARGET_TRACKING_SCALING",
            targetTrackingScalingConfigs: [{
                metricType: "FLEET_UTILIZATION_RATE",
                targetValue: 97.5,
            }],
        },
    });
    const test = aws.codebuild.getFleetOutput({
        name: testFleet.name,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test_fleet = aws.codebuild.Fleet("test",
        base_capacity=2,
        compute_type="BUILD_GENERAL1_SMALL",
        environment_type="LINUX_CONTAINER",
        name="full-example-codebuild-fleet",
        overflow_behavior="QUEUE",
        scaling_configuration={
            "max_capacity": 5,
            "scaling_type": "TARGET_TRACKING_SCALING",
            "target_tracking_scaling_configs": [{
                "metric_type": "FLEET_UTILIZATION_RATE",
                "target_value": 97.5,
            }],
        })
    test = aws.codebuild.get_fleet_output(name=test_fleet.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testFleet, err := codebuild.NewFleet(ctx, "test", &codebuild.FleetArgs{
    			BaseCapacity:     pulumi.Int(2),
    			ComputeType:      pulumi.String("BUILD_GENERAL1_SMALL"),
    			EnvironmentType:  pulumi.String("LINUX_CONTAINER"),
    			Name:             pulumi.String("full-example-codebuild-fleet"),
    			OverflowBehavior: pulumi.String("QUEUE"),
    			ScalingConfiguration: &codebuild.FleetScalingConfigurationArgs{
    				MaxCapacity: pulumi.Int(5),
    				ScalingType: pulumi.String("TARGET_TRACKING_SCALING"),
    				TargetTrackingScalingConfigs: codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArray{
    					&codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArgs{
    						MetricType:  pulumi.String("FLEET_UTILIZATION_RATE"),
    						TargetValue: pulumi.Float64(97.5),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = codebuild.LookupFleetOutput(ctx, codebuild.GetFleetOutputArgs{
    			Name: testFleet.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var testFleet = new Aws.CodeBuild.Fleet("test", new()
        {
            BaseCapacity = 2,
            ComputeType = "BUILD_GENERAL1_SMALL",
            EnvironmentType = "LINUX_CONTAINER",
            Name = "full-example-codebuild-fleet",
            OverflowBehavior = "QUEUE",
            ScalingConfiguration = new Aws.CodeBuild.Inputs.FleetScalingConfigurationArgs
            {
                MaxCapacity = 5,
                ScalingType = "TARGET_TRACKING_SCALING",
                TargetTrackingScalingConfigs = new[]
                {
                    new Aws.CodeBuild.Inputs.FleetScalingConfigurationTargetTrackingScalingConfigArgs
                    {
                        MetricType = "FLEET_UTILIZATION_RATE",
                        TargetValue = 97.5,
                    },
                },
            },
        });
    
        var test = Aws.CodeBuild.GetFleet.Invoke(new()
        {
            Name = testFleet.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codebuild.Fleet;
    import com.pulumi.aws.codebuild.FleetArgs;
    import com.pulumi.aws.codebuild.inputs.FleetScalingConfigurationArgs;
    import com.pulumi.aws.codebuild.CodebuildFunctions;
    import com.pulumi.aws.codebuild.inputs.GetFleetArgs;
    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) {
            var testFleet = new Fleet("testFleet", FleetArgs.builder()
                .baseCapacity(2)
                .computeType("BUILD_GENERAL1_SMALL")
                .environmentType("LINUX_CONTAINER")
                .name("full-example-codebuild-fleet")
                .overflowBehavior("QUEUE")
                .scalingConfiguration(FleetScalingConfigurationArgs.builder()
                    .maxCapacity(5)
                    .scalingType("TARGET_TRACKING_SCALING")
                    .targetTrackingScalingConfigs(FleetScalingConfigurationTargetTrackingScalingConfigArgs.builder()
                        .metricType("FLEET_UTILIZATION_RATE")
                        .targetValue(97.5)
                        .build())
                    .build())
                .build());
    
            final var test = CodebuildFunctions.getFleet(GetFleetArgs.builder()
                .name(testFleet.name())
                .build());
    
        }
    }
    
    resources:
      testFleet:
        type: aws:codebuild:Fleet
        name: test
        properties:
          baseCapacity: 2
          computeType: BUILD_GENERAL1_SMALL
          environmentType: LINUX_CONTAINER
          name: full-example-codebuild-fleet
          overflowBehavior: QUEUE
          scalingConfiguration:
            maxCapacity: 5
            scalingType: TARGET_TRACKING_SCALING
            targetTrackingScalingConfigs:
              - metricType: FLEET_UTILIZATION_RATE
                targetValue: 97.5
    variables:
      test:
        fn::invoke:
          Function: aws:codebuild:getFleet
          Arguments:
            name: ${testFleet.name}
    

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.codebuild.getFleet({
        name: "my-codebuild-fleet-name",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.codebuild.get_fleet(name="my-codebuild-fleet-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codebuild.LookupFleet(ctx, &codebuild.LookupFleetArgs{
    			Name: "my-codebuild-fleet-name",
    		}, 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 example = Aws.CodeBuild.GetFleet.Invoke(new()
        {
            Name = "my-codebuild-fleet-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codebuild.CodebuildFunctions;
    import com.pulumi.aws.codebuild.inputs.GetFleetArgs;
    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 example = CodebuildFunctions.getFleet(GetFleetArgs.builder()
                .name("my-codebuild-fleet-name")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:codebuild:getFleet
          Arguments:
            name: my-codebuild-fleet-name
    

    Using getFleet

    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 getFleet(args: GetFleetArgs, opts?: InvokeOptions): Promise<GetFleetResult>
    function getFleetOutput(args: GetFleetOutputArgs, opts?: InvokeOptions): Output<GetFleetResult>
    def get_fleet(name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetFleetResult
    def get_fleet_output(name: Optional[pulumi.Input[str]] = None,
                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetFleetResult]
    func LookupFleet(ctx *Context, args *LookupFleetArgs, opts ...InvokeOption) (*LookupFleetResult, error)
    func LookupFleetOutput(ctx *Context, args *LookupFleetOutputArgs, opts ...InvokeOption) LookupFleetResultOutput

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

    public static class GetFleet 
    {
        public static Task<GetFleetResult> InvokeAsync(GetFleetArgs args, InvokeOptions? opts = null)
        public static Output<GetFleetResult> Invoke(GetFleetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFleetResult> getFleet(GetFleetArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:codebuild/getFleet:getFleet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Fleet name.
    Tags Dictionary<string, string>
    Mapping of Key-Value tags for the resource.
    Name string
    Fleet name.
    Tags map[string]string
    Mapping of Key-Value tags for the resource.
    name String
    Fleet name.
    tags Map<String,String>
    Mapping of Key-Value tags for the resource.
    name string
    Fleet name.
    tags {[key: string]: string}
    Mapping of Key-Value tags for the resource.
    name str
    Fleet name.
    tags Mapping[str, str]
    Mapping of Key-Value tags for the resource.
    name String
    Fleet name.
    tags Map<String>
    Mapping of Key-Value tags for the resource.

    getFleet Result

    The following output properties are available:

    Arn string
    ARN of the Fleet.
    BaseCapacity int
    Number of machines allocated to the fleet.
    ComputeType string
    Compute resources the compute fleet uses.
    Created string
    Creation time of the fleet.
    EnvironmentType string
    Environment type of the compute fleet.
    FleetServiceRole string
    The service role associated with the compute fleet.
    Id string
    ARN of the Fleet.
    ImageId string
    The Amazon Machine Image (AMI) of the compute fleet.
    LastModified string
    Last modification time of the fleet.
    Name string
    OverflowBehavior string
    Overflow behavior for compute fleet.
    ScalingConfigurations List<GetFleetScalingConfiguration>
    Nested attribute containing information about the scaling configuration.
    Statuses List<GetFleetStatus>
    Nested attribute containing information about the current status of the fleet.
    Tags Dictionary<string, string>
    Mapping of Key-Value tags for the resource.
    VpcConfigs List<GetFleetVpcConfig>
    Nested attribute containing information about the VPC configuration.
    Arn string
    ARN of the Fleet.
    BaseCapacity int
    Number of machines allocated to the fleet.
    ComputeType string
    Compute resources the compute fleet uses.
    Created string
    Creation time of the fleet.
    EnvironmentType string
    Environment type of the compute fleet.
    FleetServiceRole string
    The service role associated with the compute fleet.
    Id string
    ARN of the Fleet.
    ImageId string
    The Amazon Machine Image (AMI) of the compute fleet.
    LastModified string
    Last modification time of the fleet.
    Name string
    OverflowBehavior string
    Overflow behavior for compute fleet.
    ScalingConfigurations []GetFleetScalingConfiguration
    Nested attribute containing information about the scaling configuration.
    Statuses []GetFleetStatus
    Nested attribute containing information about the current status of the fleet.
    Tags map[string]string
    Mapping of Key-Value tags for the resource.
    VpcConfigs []GetFleetVpcConfig
    Nested attribute containing information about the VPC configuration.
    arn String
    ARN of the Fleet.
    baseCapacity Integer
    Number of machines allocated to the fleet.
    computeType String
    Compute resources the compute fleet uses.
    created String
    Creation time of the fleet.
    environmentType String
    Environment type of the compute fleet.
    fleetServiceRole String
    The service role associated with the compute fleet.
    id String
    ARN of the Fleet.
    imageId String
    The Amazon Machine Image (AMI) of the compute fleet.
    lastModified String
    Last modification time of the fleet.
    name String
    overflowBehavior String
    Overflow behavior for compute fleet.
    scalingConfigurations List<GetFleetScalingConfiguration>
    Nested attribute containing information about the scaling configuration.
    statuses List<GetFleetStatus>
    Nested attribute containing information about the current status of the fleet.
    tags Map<String,String>
    Mapping of Key-Value tags for the resource.
    vpcConfigs List<GetFleetVpcConfig>
    Nested attribute containing information about the VPC configuration.
    arn string
    ARN of the Fleet.
    baseCapacity number
    Number of machines allocated to the fleet.
    computeType string
    Compute resources the compute fleet uses.
    created string
    Creation time of the fleet.
    environmentType string
    Environment type of the compute fleet.
    fleetServiceRole string
    The service role associated with the compute fleet.
    id string
    ARN of the Fleet.
    imageId string
    The Amazon Machine Image (AMI) of the compute fleet.
    lastModified string
    Last modification time of the fleet.
    name string
    overflowBehavior string
    Overflow behavior for compute fleet.
    scalingConfigurations GetFleetScalingConfiguration[]
    Nested attribute containing information about the scaling configuration.
    statuses GetFleetStatus[]
    Nested attribute containing information about the current status of the fleet.
    tags {[key: string]: string}
    Mapping of Key-Value tags for the resource.
    vpcConfigs GetFleetVpcConfig[]
    Nested attribute containing information about the VPC configuration.
    arn str
    ARN of the Fleet.
    base_capacity int
    Number of machines allocated to the fleet.
    compute_type str
    Compute resources the compute fleet uses.
    created str
    Creation time of the fleet.
    environment_type str
    Environment type of the compute fleet.
    fleet_service_role str
    The service role associated with the compute fleet.
    id str
    ARN of the Fleet.
    image_id str
    The Amazon Machine Image (AMI) of the compute fleet.
    last_modified str
    Last modification time of the fleet.
    name str
    overflow_behavior str
    Overflow behavior for compute fleet.
    scaling_configurations Sequence[GetFleetScalingConfiguration]
    Nested attribute containing information about the scaling configuration.
    statuses Sequence[GetFleetStatus]
    Nested attribute containing information about the current status of the fleet.
    tags Mapping[str, str]
    Mapping of Key-Value tags for the resource.
    vpc_configs Sequence[GetFleetVpcConfig]
    Nested attribute containing information about the VPC configuration.
    arn String
    ARN of the Fleet.
    baseCapacity Number
    Number of machines allocated to the fleet.
    computeType String
    Compute resources the compute fleet uses.
    created String
    Creation time of the fleet.
    environmentType String
    Environment type of the compute fleet.
    fleetServiceRole String
    The service role associated with the compute fleet.
    id String
    ARN of the Fleet.
    imageId String
    The Amazon Machine Image (AMI) of the compute fleet.
    lastModified String
    Last modification time of the fleet.
    name String
    overflowBehavior String
    Overflow behavior for compute fleet.
    scalingConfigurations List<Property Map>
    Nested attribute containing information about the scaling configuration.
    statuses List<Property Map>
    Nested attribute containing information about the current status of the fleet.
    tags Map<String>
    Mapping of Key-Value tags for the resource.
    vpcConfigs List<Property Map>
    Nested attribute containing information about the VPC configuration.

    Supporting Types

    GetFleetScalingConfiguration

    DesiredCapacity int
    The desired number of instances in the fleet when auto-scaling.
    MaxCapacity int
    The maximum number of instances in the fleet when auto-scaling.
    ScalingType string
    The scaling type for a compute fleet.
    TargetTrackingScalingConfigs List<GetFleetScalingConfigurationTargetTrackingScalingConfig>
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.
    DesiredCapacity int
    The desired number of instances in the fleet when auto-scaling.
    MaxCapacity int
    The maximum number of instances in the fleet when auto-scaling.
    ScalingType string
    The scaling type for a compute fleet.
    TargetTrackingScalingConfigs []GetFleetScalingConfigurationTargetTrackingScalingConfig
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.
    desiredCapacity Integer
    The desired number of instances in the fleet when auto-scaling.
    maxCapacity Integer
    The maximum number of instances in the fleet when auto-scaling.
    scalingType String
    The scaling type for a compute fleet.
    targetTrackingScalingConfigs List<GetFleetScalingConfigurationTargetTrackingScalingConfig>
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.
    desiredCapacity number
    The desired number of instances in the fleet when auto-scaling.
    maxCapacity number
    The maximum number of instances in the fleet when auto-scaling.
    scalingType string
    The scaling type for a compute fleet.
    targetTrackingScalingConfigs GetFleetScalingConfigurationTargetTrackingScalingConfig[]
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.
    desired_capacity int
    The desired number of instances in the fleet when auto-scaling.
    max_capacity int
    The maximum number of instances in the fleet when auto-scaling.
    scaling_type str
    The scaling type for a compute fleet.
    target_tracking_scaling_configs Sequence[GetFleetScalingConfigurationTargetTrackingScalingConfig]
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.
    desiredCapacity Number
    The desired number of instances in the fleet when auto-scaling.
    maxCapacity Number
    The maximum number of instances in the fleet when auto-scaling.
    scalingType String
    The scaling type for a compute fleet.
    targetTrackingScalingConfigs List<Property Map>
    Nested attribute containing information about thresholds when new instance is auto-scaled into the compute fleet.

    GetFleetScalingConfigurationTargetTrackingScalingConfig

    MetricType string
    The metric type to determine auto-scaling.
    TargetValue double
    The value of metric_type when to start scaling.
    MetricType string
    The metric type to determine auto-scaling.
    TargetValue float64
    The value of metric_type when to start scaling.
    metricType String
    The metric type to determine auto-scaling.
    targetValue Double
    The value of metric_type when to start scaling.
    metricType string
    The metric type to determine auto-scaling.
    targetValue number
    The value of metric_type when to start scaling.
    metric_type str
    The metric type to determine auto-scaling.
    target_value float
    The value of metric_type when to start scaling.
    metricType String
    The metric type to determine auto-scaling.
    targetValue Number
    The value of metric_type when to start scaling.

    GetFleetStatus

    Context string
    Additional information about a compute fleet.
    Message string
    Message associated with the status of a compute fleet.
    StatusCode string
    Status code of the compute fleet.
    Context string
    Additional information about a compute fleet.
    Message string
    Message associated with the status of a compute fleet.
    StatusCode string
    Status code of the compute fleet.
    context String
    Additional information about a compute fleet.
    message String
    Message associated with the status of a compute fleet.
    statusCode String
    Status code of the compute fleet.
    context string
    Additional information about a compute fleet.
    message string
    Message associated with the status of a compute fleet.
    statusCode string
    Status code of the compute fleet.
    context str
    Additional information about a compute fleet.
    message str
    Message associated with the status of a compute fleet.
    status_code str
    Status code of the compute fleet.
    context String
    Additional information about a compute fleet.
    message String
    Message associated with the status of a compute fleet.
    statusCode String
    Status code of the compute fleet.

    GetFleetVpcConfig

    SecurityGroupIds List<string>
    A list of one or more security groups IDs in your Amazon VPC.
    Subnets List<string>
    A list of one or more subnet IDs in your Amazon VPC.
    VpcId string
    The ID of the Amazon VPC.
    SecurityGroupIds []string
    A list of one or more security groups IDs in your Amazon VPC.
    Subnets []string
    A list of one or more subnet IDs in your Amazon VPC.
    VpcId string
    The ID of the Amazon VPC.
    securityGroupIds List<String>
    A list of one or more security groups IDs in your Amazon VPC.
    subnets List<String>
    A list of one or more subnet IDs in your Amazon VPC.
    vpcId String
    The ID of the Amazon VPC.
    securityGroupIds string[]
    A list of one or more security groups IDs in your Amazon VPC.
    subnets string[]
    A list of one or more subnet IDs in your Amazon VPC.
    vpcId string
    The ID of the Amazon VPC.
    security_group_ids Sequence[str]
    A list of one or more security groups IDs in your Amazon VPC.
    subnets Sequence[str]
    A list of one or more subnet IDs in your Amazon VPC.
    vpc_id str
    The ID of the Amazon VPC.
    securityGroupIds List<String>
    A list of one or more security groups IDs in your Amazon VPC.
    subnets List<String>
    A list of one or more subnet IDs in your Amazon VPC.
    vpcId String
    The ID of the Amazon VPC.

    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
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi