1. Packages
  2. AWS
  3. API Docs
  4. codebuild
  5. Fleet
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.codebuild.Fleet

Explore with Pulumi AI

Provides a CodeBuild Fleet Resource.

Example Usage

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

const test = 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,
        }],
    },
});
Copy
import pulumi
import pulumi_aws as aws

test = 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,
        }],
    })
Copy
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.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
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = 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,
                },
            },
        },
    });

});
Copy
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 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 test = new Fleet("test", 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());

    }
}
Copy
resources:
  test:
    type: aws:codebuild:Fleet
    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
Copy

Basic Usage

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

const example = new aws.codebuild.Fleet("example", {name: "example-codebuild-fleet"});
Copy
import pulumi
import pulumi_aws as aws

example = aws.codebuild.Fleet("example", name="example-codebuild-fleet")
Copy
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.NewFleet(ctx, "example", &codebuild.FleetArgs{
			Name: pulumi.String("example-codebuild-fleet"),
		})
		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 example = new Aws.CodeBuild.Fleet("example", new()
    {
        Name = "example-codebuild-fleet",
    });

});
Copy
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 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 example = new Fleet("example", FleetArgs.builder()
            .name("example-codebuild-fleet")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:codebuild:Fleet
    properties:
      name: example-codebuild-fleet
Copy

Create Fleet Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Fleet(name: string, args: FleetArgs, opts?: CustomResourceOptions);
@overload
def Fleet(resource_name: str,
          args: FleetArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Fleet(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          base_capacity: Optional[int] = None,
          compute_type: Optional[str] = None,
          environment_type: Optional[str] = None,
          compute_configuration: Optional[FleetComputeConfigurationArgs] = None,
          fleet_service_role: Optional[str] = None,
          image_id: Optional[str] = None,
          name: Optional[str] = None,
          overflow_behavior: Optional[str] = None,
          scaling_configuration: Optional[FleetScalingConfigurationArgs] = None,
          tags: Optional[Mapping[str, str]] = None,
          vpc_configs: Optional[Sequence[FleetVpcConfigArgs]] = None)
func NewFleet(ctx *Context, name string, args FleetArgs, opts ...ResourceOption) (*Fleet, error)
public Fleet(string name, FleetArgs args, CustomResourceOptions? opts = null)
public Fleet(String name, FleetArgs args)
public Fleet(String name, FleetArgs args, CustomResourceOptions options)
type: aws:codebuild:Fleet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FleetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FleetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FleetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FleetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FleetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var awsFleetResource = new Aws.CodeBuild.Fleet("awsFleetResource", new()
{
    BaseCapacity = 0,
    ComputeType = "string",
    EnvironmentType = "string",
    ComputeConfiguration = new Aws.CodeBuild.Inputs.FleetComputeConfigurationArgs
    {
        Disk = 0,
        MachineType = "string",
        Memory = 0,
        Vcpu = 0,
    },
    FleetServiceRole = "string",
    ImageId = "string",
    Name = "string",
    OverflowBehavior = "string",
    ScalingConfiguration = new Aws.CodeBuild.Inputs.FleetScalingConfigurationArgs
    {
        DesiredCapacity = 0,
        MaxCapacity = 0,
        ScalingType = "string",
        TargetTrackingScalingConfigs = new[]
        {
            new Aws.CodeBuild.Inputs.FleetScalingConfigurationTargetTrackingScalingConfigArgs
            {
                MetricType = "string",
                TargetValue = 0,
            },
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
    VpcConfigs = new[]
    {
        new Aws.CodeBuild.Inputs.FleetVpcConfigArgs
        {
            SecurityGroupIds = new[]
            {
                "string",
            },
            Subnets = new[]
            {
                "string",
            },
            VpcId = "string",
        },
    },
});
Copy
example, err := codebuild.NewFleet(ctx, "awsFleetResource", &codebuild.FleetArgs{
	BaseCapacity:    pulumi.Int(0),
	ComputeType:     pulumi.String("string"),
	EnvironmentType: pulumi.String("string"),
	ComputeConfiguration: &codebuild.FleetComputeConfigurationArgs{
		Disk:        pulumi.Int(0),
		MachineType: pulumi.String("string"),
		Memory:      pulumi.Int(0),
		Vcpu:        pulumi.Int(0),
	},
	FleetServiceRole: pulumi.String("string"),
	ImageId:          pulumi.String("string"),
	Name:             pulumi.String("string"),
	OverflowBehavior: pulumi.String("string"),
	ScalingConfiguration: &codebuild.FleetScalingConfigurationArgs{
		DesiredCapacity: pulumi.Int(0),
		MaxCapacity:     pulumi.Int(0),
		ScalingType:     pulumi.String("string"),
		TargetTrackingScalingConfigs: codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArray{
			&codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArgs{
				MetricType:  pulumi.String("string"),
				TargetValue: pulumi.Float64(0),
			},
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VpcConfigs: codebuild.FleetVpcConfigArray{
		&codebuild.FleetVpcConfigArgs{
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			Subnets: pulumi.StringArray{
				pulumi.String("string"),
			},
			VpcId: pulumi.String("string"),
		},
	},
})
Copy
var awsFleetResource = new Fleet("awsFleetResource", FleetArgs.builder()
    .baseCapacity(0)
    .computeType("string")
    .environmentType("string")
    .computeConfiguration(FleetComputeConfigurationArgs.builder()
        .disk(0)
        .machineType("string")
        .memory(0)
        .vcpu(0)
        .build())
    .fleetServiceRole("string")
    .imageId("string")
    .name("string")
    .overflowBehavior("string")
    .scalingConfiguration(FleetScalingConfigurationArgs.builder()
        .desiredCapacity(0)
        .maxCapacity(0)
        .scalingType("string")
        .targetTrackingScalingConfigs(FleetScalingConfigurationTargetTrackingScalingConfigArgs.builder()
            .metricType("string")
            .targetValue(0)
            .build())
        .build())
    .tags(Map.of("string", "string"))
    .vpcConfigs(FleetVpcConfigArgs.builder()
        .securityGroupIds("string")
        .subnets("string")
        .vpcId("string")
        .build())
    .build());
Copy
aws_fleet_resource = aws.codebuild.Fleet("awsFleetResource",
    base_capacity=0,
    compute_type="string",
    environment_type="string",
    compute_configuration={
        "disk": 0,
        "machine_type": "string",
        "memory": 0,
        "vcpu": 0,
    },
    fleet_service_role="string",
    image_id="string",
    name="string",
    overflow_behavior="string",
    scaling_configuration={
        "desired_capacity": 0,
        "max_capacity": 0,
        "scaling_type": "string",
        "target_tracking_scaling_configs": [{
            "metric_type": "string",
            "target_value": 0,
        }],
    },
    tags={
        "string": "string",
    },
    vpc_configs=[{
        "security_group_ids": ["string"],
        "subnets": ["string"],
        "vpc_id": "string",
    }])
Copy
const awsFleetResource = new aws.codebuild.Fleet("awsFleetResource", {
    baseCapacity: 0,
    computeType: "string",
    environmentType: "string",
    computeConfiguration: {
        disk: 0,
        machineType: "string",
        memory: 0,
        vcpu: 0,
    },
    fleetServiceRole: "string",
    imageId: "string",
    name: "string",
    overflowBehavior: "string",
    scalingConfiguration: {
        desiredCapacity: 0,
        maxCapacity: 0,
        scalingType: "string",
        targetTrackingScalingConfigs: [{
            metricType: "string",
            targetValue: 0,
        }],
    },
    tags: {
        string: "string",
    },
    vpcConfigs: [{
        securityGroupIds: ["string"],
        subnets: ["string"],
        vpcId: "string",
    }],
});
Copy
type: aws:codebuild:Fleet
properties:
    baseCapacity: 0
    computeConfiguration:
        disk: 0
        machineType: string
        memory: 0
        vcpu: 0
    computeType: string
    environmentType: string
    fleetServiceRole: string
    imageId: string
    name: string
    overflowBehavior: string
    scalingConfiguration:
        desiredCapacity: 0
        maxCapacity: 0
        scalingType: string
        targetTrackingScalingConfigs:
            - metricType: string
              targetValue: 0
    tags:
        string: string
    vpcConfigs:
        - securityGroupIds:
            - string
          subnets:
            - string
          vpcId: string
Copy

Fleet Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Fleet resource accepts the following input properties:

BaseCapacity This property is required. int
Number of machines allocated to the fleet.
ComputeType This property is required. string
Compute resources the compute fleet uses. See compute types for more information and valid values.
EnvironmentType This property is required. string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

ComputeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
FleetServiceRole string
The service role associated with the compute fleet.
ImageId string
The Amazon Machine Image (AMI) of the compute fleet.
Name Changes to this property will trigger replacement. string
Fleet name.
OverflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
ScalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
Tags Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
VpcConfigs List<FleetVpcConfig>
Configuration block. See vpc_config below.
BaseCapacity This property is required. int
Number of machines allocated to the fleet.
ComputeType This property is required. string
Compute resources the compute fleet uses. See compute types for more information and valid values.
EnvironmentType This property is required. string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

ComputeConfiguration FleetComputeConfigurationArgs
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
FleetServiceRole string
The service role associated with the compute fleet.
ImageId string
The Amazon Machine Image (AMI) of the compute fleet.
Name Changes to this property will trigger replacement. string
Fleet name.
OverflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
ScalingConfiguration FleetScalingConfigurationArgs
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
Tags map[string]string
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
VpcConfigs []FleetVpcConfigArgs
Configuration block. See vpc_config below.
baseCapacity This property is required. Integer
Number of machines allocated to the fleet.
computeType This property is required. String
Compute resources the compute fleet uses. See compute types for more information and valid values.
environmentType This property is required. String

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

computeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
fleetServiceRole String
The service role associated with the compute fleet.
imageId String
The Amazon Machine Image (AMI) of the compute fleet.
name Changes to this property will trigger replacement. String
Fleet name.
overflowBehavior String
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
tags Map<String,String>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfigs List<FleetVpcConfig>
Configuration block. See vpc_config below.
baseCapacity This property is required. number
Number of machines allocated to the fleet.
computeType This property is required. string
Compute resources the compute fleet uses. See compute types for more information and valid values.
environmentType This property is required. string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

computeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
fleetServiceRole string
The service role associated with the compute fleet.
imageId string
The Amazon Machine Image (AMI) of the compute fleet.
name Changes to this property will trigger replacement. string
Fleet name.
overflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
tags {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfigs FleetVpcConfig[]
Configuration block. See vpc_config below.
base_capacity This property is required. int
Number of machines allocated to the fleet.
compute_type This property is required. str
Compute resources the compute fleet uses. See compute types for more information and valid values.
environment_type This property is required. str

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

compute_configuration FleetComputeConfigurationArgs
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
fleet_service_role str
The service role associated with the compute fleet.
image_id str
The Amazon Machine Image (AMI) of the compute fleet.
name Changes to this property will trigger replacement. str
Fleet name.
overflow_behavior str
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scaling_configuration FleetScalingConfigurationArgs
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
tags Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpc_configs Sequence[FleetVpcConfigArgs]
Configuration block. See vpc_config below.
baseCapacity This property is required. Number
Number of machines allocated to the fleet.
computeType This property is required. String
Compute resources the compute fleet uses. See compute types for more information and valid values.
environmentType This property is required. String

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

computeConfiguration Property Map
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
fleetServiceRole String
The service role associated with the compute fleet.
imageId String
The Amazon Machine Image (AMI) of the compute fleet.
name Changes to this property will trigger replacement. String
Fleet name.
overflowBehavior String
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration Property Map
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
tags Map<String>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfigs List<Property Map>
Configuration block. See vpc_config below.

Outputs

All input properties are implicitly available as output properties. Additionally, the Fleet resource produces the following output properties:

Arn string
ARN of the Fleet.
Created string
Creation time of the fleet.
Id string
The provider-assigned unique ID for this managed resource.
LastModified string
Last modification time of the fleet.
Statuses List<FleetStatus>
Nested attribute containing information about the current status of the fleet.
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

Arn string
ARN of the Fleet.
Created string
Creation time of the fleet.
Id string
The provider-assigned unique ID for this managed resource.
LastModified string
Last modification time of the fleet.
Statuses []FleetStatus
Nested attribute containing information about the current status of the fleet.
TagsAll map[string]string

Deprecated: Please use tags instead.

arn String
ARN of the Fleet.
created String
Creation time of the fleet.
id String
The provider-assigned unique ID for this managed resource.
lastModified String
Last modification time of the fleet.
statuses List<FleetStatus>
Nested attribute containing information about the current status of the fleet.
tagsAll Map<String,String>

Deprecated: Please use tags instead.

arn string
ARN of the Fleet.
created string
Creation time of the fleet.
id string
The provider-assigned unique ID for this managed resource.
lastModified string
Last modification time of the fleet.
statuses FleetStatus[]
Nested attribute containing information about the current status of the fleet.
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

arn str
ARN of the Fleet.
created str
Creation time of the fleet.
id str
The provider-assigned unique ID for this managed resource.
last_modified str
Last modification time of the fleet.
statuses Sequence[FleetStatus]
Nested attribute containing information about the current status of the fleet.
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

arn String
ARN of the Fleet.
created String
Creation time of the fleet.
id String
The provider-assigned unique ID for this managed resource.
lastModified String
Last modification time of the fleet.
statuses List<Property Map>
Nested attribute containing information about the current status of the fleet.
tagsAll Map<String>

Deprecated: Please use tags instead.

Look up Existing Fleet Resource

Get an existing Fleet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FleetState, opts?: CustomResourceOptions): Fleet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        base_capacity: Optional[int] = None,
        compute_configuration: Optional[FleetComputeConfigurationArgs] = None,
        compute_type: Optional[str] = None,
        created: Optional[str] = None,
        environment_type: Optional[str] = None,
        fleet_service_role: Optional[str] = None,
        image_id: Optional[str] = None,
        last_modified: Optional[str] = None,
        name: Optional[str] = None,
        overflow_behavior: Optional[str] = None,
        scaling_configuration: Optional[FleetScalingConfigurationArgs] = None,
        statuses: Optional[Sequence[FleetStatusArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        vpc_configs: Optional[Sequence[FleetVpcConfigArgs]] = None) -> Fleet
func GetFleet(ctx *Context, name string, id IDInput, state *FleetState, opts ...ResourceOption) (*Fleet, error)
public static Fleet Get(string name, Input<string> id, FleetState? state, CustomResourceOptions? opts = null)
public static Fleet get(String name, Output<String> id, FleetState state, CustomResourceOptions options)
resources:  _:    type: aws:codebuild:Fleet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
ARN of the Fleet.
BaseCapacity int
Number of machines allocated to the fleet.
ComputeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
ComputeType string
Compute resources the compute fleet uses. See compute types for more information and valid values.
Created string
Creation time of the fleet.
EnvironmentType string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

FleetServiceRole string
The service role associated with the compute fleet.
ImageId string
The Amazon Machine Image (AMI) of the compute fleet.
LastModified string
Last modification time of the fleet.
Name Changes to this property will trigger replacement. string
Fleet name.
OverflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
ScalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
Statuses List<FleetStatus>
Nested attribute containing information about the current status of the fleet.
Tags Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

VpcConfigs List<FleetVpcConfig>
Configuration block. See vpc_config below.
Arn string
ARN of the Fleet.
BaseCapacity int
Number of machines allocated to the fleet.
ComputeConfiguration FleetComputeConfigurationArgs
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
ComputeType string
Compute resources the compute fleet uses. See compute types for more information and valid values.
Created string
Creation time of the fleet.
EnvironmentType string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

FleetServiceRole string
The service role associated with the compute fleet.
ImageId string
The Amazon Machine Image (AMI) of the compute fleet.
LastModified string
Last modification time of the fleet.
Name Changes to this property will trigger replacement. string
Fleet name.
OverflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
ScalingConfiguration FleetScalingConfigurationArgs
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
Statuses []FleetStatusArgs
Nested attribute containing information about the current status of the fleet.
Tags map[string]string
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string

Deprecated: Please use tags instead.

VpcConfigs []FleetVpcConfigArgs
Configuration block. See vpc_config below.
arn String
ARN of the Fleet.
baseCapacity Integer
Number of machines allocated to the fleet.
computeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
computeType String
Compute resources the compute fleet uses. See compute types for more information and valid values.
created String
Creation time of the fleet.
environmentType String

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

fleetServiceRole String
The service role associated with the compute fleet.
imageId String
The Amazon Machine Image (AMI) of the compute fleet.
lastModified String
Last modification time of the fleet.
name Changes to this property will trigger replacement. String
Fleet name.
overflowBehavior String
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
statuses List<FleetStatus>
Nested attribute containing information about the current status of the fleet.
tags Map<String,String>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>

Deprecated: Please use tags instead.

vpcConfigs List<FleetVpcConfig>
Configuration block. See vpc_config below.
arn string
ARN of the Fleet.
baseCapacity number
Number of machines allocated to the fleet.
computeConfiguration FleetComputeConfiguration
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
computeType string
Compute resources the compute fleet uses. See compute types for more information and valid values.
created string
Creation time of the fleet.
environmentType string

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

fleetServiceRole string
The service role associated with the compute fleet.
imageId string
The Amazon Machine Image (AMI) of the compute fleet.
lastModified string
Last modification time of the fleet.
name Changes to this property will trigger replacement. string
Fleet name.
overflowBehavior string
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration FleetScalingConfiguration
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
statuses FleetStatus[]
Nested attribute containing information about the current status of the fleet.
tags {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

vpcConfigs FleetVpcConfig[]
Configuration block. See vpc_config below.
arn str
ARN of the Fleet.
base_capacity int
Number of machines allocated to the fleet.
compute_configuration FleetComputeConfigurationArgs
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
compute_type str
Compute resources the compute fleet uses. See compute types for more information and valid values.
created str
Creation time of the fleet.
environment_type str

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

fleet_service_role str
The service role associated with the compute fleet.
image_id str
The Amazon Machine Image (AMI) of the compute fleet.
last_modified str
Last modification time of the fleet.
name Changes to this property will trigger replacement. str
Fleet name.
overflow_behavior str
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scaling_configuration FleetScalingConfigurationArgs
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
statuses Sequence[FleetStatusArgs]
Nested attribute containing information about the current status of the fleet.
tags Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

vpc_configs Sequence[FleetVpcConfigArgs]
Configuration block. See vpc_config below.
arn String
ARN of the Fleet.
baseCapacity Number
Number of machines allocated to the fleet.
computeConfiguration Property Map
The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.
computeType String
Compute resources the compute fleet uses. See compute types for more information and valid values.
created String
Creation time of the fleet.
environmentType String

Environment type of the compute fleet. See environment types for more information and valid values.

The following arguments are optional:

fleetServiceRole String
The service role associated with the compute fleet.
imageId String
The Amazon Machine Image (AMI) of the compute fleet.
lastModified String
Last modification time of the fleet.
name Changes to this property will trigger replacement. String
Fleet name.
overflowBehavior String
Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.
scalingConfiguration Property Map
Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.
statuses List<Property Map>
Nested attribute containing information about the current status of the fleet.
tags Map<String>
Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>

Deprecated: Please use tags instead.

vpcConfigs List<Property Map>
Configuration block. See vpc_config below.

Supporting Types

FleetComputeConfiguration
, FleetComputeConfigurationArgs

Disk int
Amount of disk space of the instance type included in the fleet.
MachineType string
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
Memory int
Amount of memory of the instance type included in the fleet.
Vcpu int
Number of vCPUs of the instance type included in the fleet.
Disk int
Amount of disk space of the instance type included in the fleet.
MachineType string
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
Memory int
Amount of memory of the instance type included in the fleet.
Vcpu int
Number of vCPUs of the instance type included in the fleet.
disk Integer
Amount of disk space of the instance type included in the fleet.
machineType String
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
memory Integer
Amount of memory of the instance type included in the fleet.
vcpu Integer
Number of vCPUs of the instance type included in the fleet.
disk number
Amount of disk space of the instance type included in the fleet.
machineType string
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
memory number
Amount of memory of the instance type included in the fleet.
vcpu number
Number of vCPUs of the instance type included in the fleet.
disk int
Amount of disk space of the instance type included in the fleet.
machine_type str
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
memory int
Amount of memory of the instance type included in the fleet.
vcpu int
Number of vCPUs of the instance type included in the fleet.
disk Number
Amount of disk space of the instance type included in the fleet.
machineType String
Machine type of the instance type included in the fleet. Valid values: GENERAL, NVME.
memory Number
Amount of memory of the instance type included in the fleet.
vcpu Number
Number of vCPUs of the instance type included in the fleet.

FleetScalingConfiguration
, FleetScalingConfigurationArgs

DesiredCapacity int
MaxCapacity int
Maximum number of instances in the fleet when auto-scaling.
ScalingType string
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
TargetTrackingScalingConfigs List<FleetScalingConfigurationTargetTrackingScalingConfig>
Configuration block. Detailed below.
DesiredCapacity int
MaxCapacity int
Maximum number of instances in the fleet when auto-scaling.
ScalingType string
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
TargetTrackingScalingConfigs []FleetScalingConfigurationTargetTrackingScalingConfig
Configuration block. Detailed below.
desiredCapacity Integer
maxCapacity Integer
Maximum number of instances in the fleet when auto-scaling.
scalingType String
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
targetTrackingScalingConfigs List<FleetScalingConfigurationTargetTrackingScalingConfig>
Configuration block. Detailed below.
desiredCapacity number
maxCapacity number
Maximum number of instances in the fleet when auto-scaling.
scalingType string
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
targetTrackingScalingConfigs FleetScalingConfigurationTargetTrackingScalingConfig[]
Configuration block. Detailed below.
desired_capacity int
max_capacity int
Maximum number of instances in the fleet when auto-scaling.
scaling_type str
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
target_tracking_scaling_configs Sequence[FleetScalingConfigurationTargetTrackingScalingConfig]
Configuration block. Detailed below.
desiredCapacity Number
maxCapacity Number
Maximum number of instances in the fleet when auto-scaling.
scalingType String
Scaling type for a compute fleet. Valid value: TARGET_TRACKING_SCALING.
targetTrackingScalingConfigs List<Property Map>
Configuration block. Detailed below.

FleetScalingConfigurationTargetTrackingScalingConfig
, FleetScalingConfigurationTargetTrackingScalingConfigArgs

MetricType string
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
TargetValue double
Value of metricType when to start scaling.
MetricType string
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
TargetValue float64
Value of metricType when to start scaling.
metricType String
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
targetValue Double
Value of metricType when to start scaling.
metricType string
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
targetValue number
Value of metricType when to start scaling.
metric_type str
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
target_value float
Value of metricType when to start scaling.
metricType String
Metric type to determine auto-scaling. Valid value: FLEET_UTILIZATION_RATE.
targetValue Number
Value of metricType when to start scaling.

FleetStatus
, FleetStatusArgs

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.

FleetVpcConfig
, FleetVpcConfigArgs

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

Import

Using pulumi import, import CodeBuild Fleet using the name. For example:

$ pulumi import aws:codebuild/fleet:Fleet name fleet-name
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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