software.amazon.awssdk.services.codebuild.model.CreateFleetRequest Maven / Gradle / Ivy
Show all versions of codebuild Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.codebuild.model;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateFleetRequest extends CodeBuildRequest implements
ToCopyableBuilder {
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(CreateFleetRequest::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField BASE_CAPACITY_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("baseCapacity").getter(getter(CreateFleetRequest::baseCapacity)).setter(setter(Builder::baseCapacity))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("baseCapacity").build()).build();
private static final SdkField ENVIRONMENT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("environmentType").getter(getter(CreateFleetRequest::environmentTypeAsString))
.setter(setter(Builder::environmentType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentType").build()).build();
private static final SdkField COMPUTE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("computeType").getter(getter(CreateFleetRequest::computeTypeAsString))
.setter(setter(Builder::computeType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeType").build()).build();
private static final SdkField SCALING_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("scalingConfiguration")
.getter(getter(CreateFleetRequest::scalingConfiguration)).setter(setter(Builder::scalingConfiguration))
.constructor(ScalingConfigurationInput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("scalingConfiguration").build())
.build();
private static final SdkField OVERFLOW_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("overflowBehavior").getter(getter(CreateFleetRequest::overflowBehaviorAsString))
.setter(setter(Builder::overflowBehavior))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("overflowBehavior").build()).build();
private static final SdkField VPC_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("vpcConfig").getter(getter(CreateFleetRequest::vpcConfig)).setter(setter(Builder::vpcConfig))
.constructor(VpcConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("vpcConfig").build()).build();
private static final SdkField IMAGE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("imageId").getter(getter(CreateFleetRequest::imageId)).setter(setter(Builder::imageId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imageId").build()).build();
private static final SdkField FLEET_SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fleetServiceRole").getter(getter(CreateFleetRequest::fleetServiceRole))
.setter(setter(Builder::fleetServiceRole))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fleetServiceRole").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("tags")
.getter(getter(CreateFleetRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Tag::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD,
BASE_CAPACITY_FIELD, ENVIRONMENT_TYPE_FIELD, COMPUTE_TYPE_FIELD, SCALING_CONFIGURATION_FIELD,
OVERFLOW_BEHAVIOR_FIELD, VPC_CONFIG_FIELD, IMAGE_ID_FIELD, FLEET_SERVICE_ROLE_FIELD, TAGS_FIELD));
private final String name;
private final Integer baseCapacity;
private final String environmentType;
private final String computeType;
private final ScalingConfigurationInput scalingConfiguration;
private final String overflowBehavior;
private final VpcConfig vpcConfig;
private final String imageId;
private final String fleetServiceRole;
private final List tags;
private CreateFleetRequest(BuilderImpl builder) {
super(builder);
this.name = builder.name;
this.baseCapacity = builder.baseCapacity;
this.environmentType = builder.environmentType;
this.computeType = builder.computeType;
this.scalingConfiguration = builder.scalingConfiguration;
this.overflowBehavior = builder.overflowBehavior;
this.vpcConfig = builder.vpcConfig;
this.imageId = builder.imageId;
this.fleetServiceRole = builder.fleetServiceRole;
this.tags = builder.tags;
}
/**
*
* The name of the compute fleet.
*
*
* @return The name of the compute fleet.
*/
public final String name() {
return name;
}
/**
*
* The initial number of machines allocated to the fleet, which defines the number of builds that can run in parallel.
*
*
* @return The initial number of machines allocated to the fleet, which defines the number of builds that can run in
* parallel.
*/
public final Integer baseCapacity() {
return baseCapacity;
}
/**
*
* The environment type of the compute fleet.
*
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore),
* Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia
* Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai)
* and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific
* (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build environment
* compute types in the CodeBuild user guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #environmentType}
* will return {@link EnvironmentType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #environmentTypeAsString}.
*
*
* @return The environment type of the compute fleet.
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific
* (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific
* (Mumbai) and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia
* Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild user guide.
* @see EnvironmentType
*/
public final EnvironmentType environmentType() {
return EnvironmentType.fromValue(environmentType);
}
/**
*
* The environment type of the compute fleet.
*
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore),
* Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia
* Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai)
* and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific
* (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build environment
* compute types in the CodeBuild user guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #environmentType}
* will return {@link EnvironmentType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #environmentTypeAsString}.
*
*
* @return The environment type of the compute fleet.
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific
* (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific
* (Mumbai) and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia
* Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild user guide.
* @see EnvironmentType
*/
public final String environmentTypeAsString() {
return environmentType;
}
/**
*
* Information about the compute resources the compute fleet uses. Available values include:
*
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment
* type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment
* type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds.
* This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G
* Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA
* Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build environment
* compute types in the CodeBuild User Guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #computeType} will
* return {@link ComputeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #computeTypeAsString}.
*
*
* @return Information about the compute resources the compute fleet uses. Available values include:
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for
* builds. This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1
* NVIDIA A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4
* NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
* @see ComputeType
*/
public final ComputeType computeType() {
return ComputeType.fromValue(computeType);
}
/**
*
* Information about the compute resources the compute fleet uses. Available values include:
*
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment
* type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment
* type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds.
* This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G
* Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA
* Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build environment
* compute types in the CodeBuild User Guide.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #computeType} will
* return {@link ComputeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #computeTypeAsString}.
*
*
* @return Information about the compute resources the compute fleet uses. Available values include:
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for
* builds. This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1
* NVIDIA A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4
* NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
* @see ComputeType
*/
public final String computeTypeAsString() {
return computeType;
}
/**
*
* The scaling configuration of the compute fleet.
*
*
* @return The scaling configuration of the compute fleet.
*/
public final ScalingConfigurationInput scalingConfiguration() {
return scalingConfiguration;
}
/**
*
* The compute fleet overflow behavior.
*
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet instance to
* become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you
* add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC
* network interface.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #overflowBehavior}
* will return {@link FleetOverflowBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #overflowBehaviorAsString}.
*
*
* @return The compute fleet overflow behavior.
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet
* instance to become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure
* that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a
* VPC network interface.
*
*
* @see FleetOverflowBehavior
*/
public final FleetOverflowBehavior overflowBehavior() {
return FleetOverflowBehavior.fromValue(overflowBehavior);
}
/**
*
* The compute fleet overflow behavior.
*
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet instance to
* become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you
* add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC
* network interface.
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #overflowBehavior}
* will return {@link FleetOverflowBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #overflowBehaviorAsString}.
*
*
* @return The compute fleet overflow behavior.
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet
* instance to become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure
* that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a
* VPC network interface.
*
*
* @see FleetOverflowBehavior
*/
public final String overflowBehaviorAsString() {
return overflowBehavior;
}
/**
* Returns the value of the VpcConfig property for this object.
*
* @return The value of the VpcConfig property for this object.
*/
public final VpcConfig vpcConfig() {
return vpcConfig;
}
/**
*
* The Amazon Machine Image (AMI) of the compute fleet.
*
*
* @return The Amazon Machine Image (AMI) of the compute fleet.
*/
public final String imageId() {
return imageId;
}
/**
*
* The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide.
*
*
* @return The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User
* Guide.
*/
public final String fleetServiceRole() {
return fleetServiceRole;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructList);
}
/**
*
* A list of tag key and value pairs associated with this compute fleet.
*
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return A list of tag key and value pairs associated with this compute fleet.
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project
* tags.
*/
public final List tags() {
return tags;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(baseCapacity());
hashCode = 31 * hashCode + Objects.hashCode(environmentTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(computeTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(scalingConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(overflowBehaviorAsString());
hashCode = 31 * hashCode + Objects.hashCode(vpcConfig());
hashCode = 31 * hashCode + Objects.hashCode(imageId());
hashCode = 31 * hashCode + Objects.hashCode(fleetServiceRole());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateFleetRequest)) {
return false;
}
CreateFleetRequest other = (CreateFleetRequest) obj;
return Objects.equals(name(), other.name()) && Objects.equals(baseCapacity(), other.baseCapacity())
&& Objects.equals(environmentTypeAsString(), other.environmentTypeAsString())
&& Objects.equals(computeTypeAsString(), other.computeTypeAsString())
&& Objects.equals(scalingConfiguration(), other.scalingConfiguration())
&& Objects.equals(overflowBehaviorAsString(), other.overflowBehaviorAsString())
&& Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(imageId(), other.imageId())
&& Objects.equals(fleetServiceRole(), other.fleetServiceRole()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("CreateFleetRequest").add("Name", name()).add("BaseCapacity", baseCapacity())
.add("EnvironmentType", environmentTypeAsString()).add("ComputeType", computeTypeAsString())
.add("ScalingConfiguration", scalingConfiguration()).add("OverflowBehavior", overflowBehaviorAsString())
.add("VpcConfig", vpcConfig()).add("ImageId", imageId()).add("FleetServiceRole", fleetServiceRole())
.add("Tags", hasTags() ? tags() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "baseCapacity":
return Optional.ofNullable(clazz.cast(baseCapacity()));
case "environmentType":
return Optional.ofNullable(clazz.cast(environmentTypeAsString()));
case "computeType":
return Optional.ofNullable(clazz.cast(computeTypeAsString()));
case "scalingConfiguration":
return Optional.ofNullable(clazz.cast(scalingConfiguration()));
case "overflowBehavior":
return Optional.ofNullable(clazz.cast(overflowBehaviorAsString()));
case "vpcConfig":
return Optional.ofNullable(clazz.cast(vpcConfig()));
case "imageId":
return Optional.ofNullable(clazz.cast(imageId()));
case "fleetServiceRole":
return Optional.ofNullable(clazz.cast(fleetServiceRole()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and
* Asia Pacific (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East
* (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia
* Pacific (Mumbai) and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East
* (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney),
* Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild user guide.
* @see EnvironmentType
* @return Returns a reference to this object so that method calls can be chained together.
* @see EnvironmentType
*/
Builder environmentType(String environmentType);
/**
*
* The environment type of the compute fleet.
*
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East
* (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia
* Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific
* (Mumbai) and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia
* Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild user guide.
*
*
* @param environmentType
* The environment type of the compute fleet.
*
* -
*
* The environment type ARM_CONTAINER
is available only in regions US East (N. Virginia), US
* East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
*
*
* -
*
* The environment type LINUX_CONTAINER
is available only in regions US East (N. Virginia),
* US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific
* (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
*
*
* -
*
* The environment type LINUX_GPU_CONTAINER
is available only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and
* Asia Pacific (Sydney).
*
*
* -
*
* The environment type MAC_ARM
is available for Medium fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt)
*
*
* -
*
* The environment type MAC_ARM
is available for Large fleets only in regions US East (N.
* Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney).
*
*
* -
*
* The environment type WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East
* (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia
* Pacific (Mumbai) and EU (Ireland).
*
*
* -
*
* The environment type WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East
* (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney),
* Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild user guide.
* @see EnvironmentType
* @return Returns a reference to this object so that method calls can be chained together.
* @see EnvironmentType
*/
Builder environmentType(EnvironmentType environmentType);
/**
*
* Information about the compute resources the compute fleet uses. Available values include:
*
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds.
* This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA
* A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4
* NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
*
*
* @param computeType
* Information about the compute resources the compute fleet uses. Available values include:
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for
* builds. This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for
* builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1
* NVIDIA A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on
* ARM-based processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for
* builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and
* 4 NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on
* ARM-based processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
* @see ComputeType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComputeType
*/
Builder computeType(String computeType);
/**
*
* Information about the compute resources the compute fleet uses. Available values include:
*
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds.
* This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA
* A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4
* NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based
* processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
*
*
* @param computeType
* Information about the compute resources the compute fleet uses. Available values include:
*
* -
*
* BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds.
*
*
* -
*
* BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your
* environment type.
*
*
* -
*
* BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for
* builds. This compute type supports Docker images up to 100 GB uncompressed.
*
*
*
*
* If you use BUILD_GENERAL1_SMALL
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for
* builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1
* NVIDIA A10G Tensor Core GPU for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on
* ARM-based processors for builds.
*
*
*
*
* If you use BUILD_GENERAL1_LARGE
:
*
*
* -
*
* For environment type LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for
* builds.
*
*
* -
*
* For environment type LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and
* 4 NVIDIA Tesla V100 GPUs for builds.
*
*
* -
*
* For environment type ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on
* ARM-based processors for builds.
*
*
*
*
* For more information, see Build
* environment compute types in the CodeBuild User Guide.
* @see ComputeType
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComputeType
*/
Builder computeType(ComputeType computeType);
/**
*
* The scaling configuration of the compute fleet.
*
*
* @param scalingConfiguration
* The scaling configuration of the compute fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder scalingConfiguration(ScalingConfigurationInput scalingConfiguration);
/**
*
* The scaling configuration of the compute fleet.
*
* This is a convenience method that creates an instance of the {@link ScalingConfigurationInput.Builder}
* avoiding the need to create one manually via {@link ScalingConfigurationInput#builder()}.
*
*
* When the {@link Consumer} completes, {@link ScalingConfigurationInput.Builder#build()} is called immediately
* and its result is passed to {@link #scalingConfiguration(ScalingConfigurationInput)}.
*
* @param scalingConfiguration
* a consumer that will call methods on {@link ScalingConfigurationInput.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #scalingConfiguration(ScalingConfigurationInput)
*/
default Builder scalingConfiguration(Consumer scalingConfiguration) {
return scalingConfiguration(ScalingConfigurationInput.builder().applyMutation(scalingConfiguration).build());
}
/**
*
* The compute fleet overflow behavior.
*
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet instance to
* become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that
* you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC
* network interface.
*
*
*
*
* @param overflowBehavior
* The compute fleet overflow behavior.
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet
* instance to become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make
* sure that you add the required VPC permissions to your project service role. For more information, see
* Example policy statement to allow CodeBuild access to Amazon Web Services services required to create
* a VPC network interface.
*
*
* @see FleetOverflowBehavior
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetOverflowBehavior
*/
Builder overflowBehavior(String overflowBehavior);
/**
*
* The compute fleet overflow behavior.
*
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet instance to
* become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that
* you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC
* network interface.
*
*
*
*
* @param overflowBehavior
* The compute fleet overflow behavior.
*
* -
*
* For overflow behavior QUEUE
, your overflow builds need to wait on the existing fleet
* instance to become available.
*
*
* -
*
* For overflow behavior ON_DEMAND
, your overflow builds run on CodeBuild on-demand.
*
*
*
* If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make
* sure that you add the required VPC permissions to your project service role. For more information, see
* Example policy statement to allow CodeBuild access to Amazon Web Services services required to create
* a VPC network interface.
*
*
* @see FleetOverflowBehavior
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetOverflowBehavior
*/
Builder overflowBehavior(FleetOverflowBehavior overflowBehavior);
/**
* Sets the value of the VpcConfig property for this object.
*
* @param vpcConfig
* The new value for the VpcConfig property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vpcConfig(VpcConfig vpcConfig);
/**
* Sets the value of the VpcConfig property for this object.
*
* This is a convenience method that creates an instance of the {@link VpcConfig.Builder} avoiding the need to
* create one manually via {@link VpcConfig#builder()}.
*
*
* When the {@link Consumer} completes, {@link VpcConfig.Builder#build()} is called immediately and its result
* is passed to {@link #vpcConfig(VpcConfig)}.
*
* @param vpcConfig
* a consumer that will call methods on {@link VpcConfig.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #vpcConfig(VpcConfig)
*/
default Builder vpcConfig(Consumer vpcConfig) {
return vpcConfig(VpcConfig.builder().applyMutation(vpcConfig).build());
}
/**
*
* The Amazon Machine Image (AMI) of the compute fleet.
*
*
* @param imageId
* The Amazon Machine Image (AMI) of the compute fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder imageId(String imageId);
/**
*
* The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide.
*
*
* @param fleetServiceRole
* The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User
* Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder fleetServiceRole(String fleetServiceRole);
/**
*
* A list of tag key and value pairs associated with this compute fleet.
*
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
*
*
* @param tags
* A list of tag key and value pairs associated with this compute fleet.
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project
* tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Collection tags);
/**
*
* A list of tag key and value pairs associated with this compute fleet.
*
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
*
*
* @param tags
* A list of tag key and value pairs associated with this compute fleet.
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project
* tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Tag... tags);
/**
*
* A list of tag key and value pairs associated with this compute fleet.
*
*
* These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.codebuild.model.Tag.Builder} avoiding the need to create one manually
* via {@link software.amazon.awssdk.services.codebuild.model.Tag#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.codebuild.model.Tag.Builder#build()} is called immediately and its
* result is passed to {@link #tags(List)}.
*
* @param tags
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.codebuild.model.Tag.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #tags(java.util.Collection)
*/
Builder tags(Consumer... tags);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends CodeBuildRequest.BuilderImpl implements Builder {
private String name;
private Integer baseCapacity;
private String environmentType;
private String computeType;
private ScalingConfigurationInput scalingConfiguration;
private String overflowBehavior;
private VpcConfig vpcConfig;
private String imageId;
private String fleetServiceRole;
private List tags = DefaultSdkAutoConstructList.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CreateFleetRequest model) {
super(model);
name(model.name);
baseCapacity(model.baseCapacity);
environmentType(model.environmentType);
computeType(model.computeType);
scalingConfiguration(model.scalingConfiguration);
overflowBehavior(model.overflowBehavior);
vpcConfig(model.vpcConfig);
imageId(model.imageId);
fleetServiceRole(model.fleetServiceRole);
tags(model.tags);
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final Integer getBaseCapacity() {
return baseCapacity;
}
public final void setBaseCapacity(Integer baseCapacity) {
this.baseCapacity = baseCapacity;
}
@Override
public final Builder baseCapacity(Integer baseCapacity) {
this.baseCapacity = baseCapacity;
return this;
}
public final String getEnvironmentType() {
return environmentType;
}
public final void setEnvironmentType(String environmentType) {
this.environmentType = environmentType;
}
@Override
public final Builder environmentType(String environmentType) {
this.environmentType = environmentType;
return this;
}
@Override
public final Builder environmentType(EnvironmentType environmentType) {
this.environmentType(environmentType == null ? null : environmentType.toString());
return this;
}
public final String getComputeType() {
return computeType;
}
public final void setComputeType(String computeType) {
this.computeType = computeType;
}
@Override
public final Builder computeType(String computeType) {
this.computeType = computeType;
return this;
}
@Override
public final Builder computeType(ComputeType computeType) {
this.computeType(computeType == null ? null : computeType.toString());
return this;
}
public final ScalingConfigurationInput.Builder getScalingConfiguration() {
return scalingConfiguration != null ? scalingConfiguration.toBuilder() : null;
}
public final void setScalingConfiguration(ScalingConfigurationInput.BuilderImpl scalingConfiguration) {
this.scalingConfiguration = scalingConfiguration != null ? scalingConfiguration.build() : null;
}
@Override
public final Builder scalingConfiguration(ScalingConfigurationInput scalingConfiguration) {
this.scalingConfiguration = scalingConfiguration;
return this;
}
public final String getOverflowBehavior() {
return overflowBehavior;
}
public final void setOverflowBehavior(String overflowBehavior) {
this.overflowBehavior = overflowBehavior;
}
@Override
public final Builder overflowBehavior(String overflowBehavior) {
this.overflowBehavior = overflowBehavior;
return this;
}
@Override
public final Builder overflowBehavior(FleetOverflowBehavior overflowBehavior) {
this.overflowBehavior(overflowBehavior == null ? null : overflowBehavior.toString());
return this;
}
public final VpcConfig.Builder getVpcConfig() {
return vpcConfig != null ? vpcConfig.toBuilder() : null;
}
public final void setVpcConfig(VpcConfig.BuilderImpl vpcConfig) {
this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null;
}
@Override
public final Builder vpcConfig(VpcConfig vpcConfig) {
this.vpcConfig = vpcConfig;
return this;
}
public final String getImageId() {
return imageId;
}
public final void setImageId(String imageId) {
this.imageId = imageId;
}
@Override
public final Builder imageId(String imageId) {
this.imageId = imageId;
return this;
}
public final String getFleetServiceRole() {
return fleetServiceRole;
}
public final void setFleetServiceRole(String fleetServiceRole) {
this.fleetServiceRole = fleetServiceRole;
}
@Override
public final Builder fleetServiceRole(String fleetServiceRole) {
this.fleetServiceRole = fleetServiceRole;
return this;
}
public final List getTags() {
List result = TagListCopier.copyToBuilder(this.tags);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setTags(Collection tags) {
this.tags = TagListCopier.copyFromBuilder(tags);
}
@Override
public final Builder tags(Collection tags) {
this.tags = TagListCopier.copy(tags);
return this;
}
@Override
@SafeVarargs
public final Builder tags(Tag... tags) {
tags(Arrays.asList(tags));
return this;
}
@Override
@SafeVarargs
public final Builder tags(Consumer... tags) {
tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateFleetRequest build() {
return new CreateFleetRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}