All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.codebuild.Fleet Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.codebuild;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.codebuild.FleetArgs;
import com.pulumi.aws.codebuild.inputs.FleetState;
import com.pulumi.aws.codebuild.outputs.FleetScalingConfiguration;
import com.pulumi.aws.codebuild.outputs.FleetStatus;
import com.pulumi.aws.codebuild.outputs.FleetVpcConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a CodeBuild Fleet Resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import CodeBuild Fleet using the `name`. For example: * * ```sh * $ pulumi import aws:codebuild/fleet:Fleet name fleet-name * ``` * */ @ResourceType(type="aws:codebuild/fleet:Fleet") public class Fleet extends com.pulumi.resources.CustomResource { /** * ARN of the Fleet. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return ARN of the Fleet. * */ public Output arn() { return this.arn; } /** * Number of machines allocated to the fleet. * */ @Export(name="baseCapacity", refs={Integer.class}, tree="[0]") private Output baseCapacity; /** * @return Number of machines allocated to the fleet. * */ public Output baseCapacity() { return this.baseCapacity; } /** * Compute resources the compute fleet uses. See [compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types) for more information and valid values. * */ @Export(name="computeType", refs={String.class}, tree="[0]") private Output computeType; /** * @return Compute resources the compute fleet uses. See [compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types) for more information and valid values. * */ public Output computeType() { return this.computeType; } /** * Creation time of the fleet. * */ @Export(name="created", refs={String.class}, tree="[0]") private Output created; /** * @return Creation time of the fleet. * */ public Output created() { return this.created; } /** * Environment type of the compute fleet. See [environment types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types) for more information and valid values. * * The following arguments are optional: * */ @Export(name="environmentType", refs={String.class}, tree="[0]") private Output environmentType; /** * @return Environment type of the compute fleet. See [environment types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types) for more information and valid values. * * The following arguments are optional: * */ public Output environmentType() { return this.environmentType; } /** * The service role associated with the compute fleet. * */ @Export(name="fleetServiceRole", refs={String.class}, tree="[0]") private Output fleetServiceRole; /** * @return The service role associated with the compute fleet. * */ public Output> fleetServiceRole() { return Codegen.optional(this.fleetServiceRole); } /** * The Amazon Machine Image (AMI) of the compute fleet. * */ @Export(name="imageId", refs={String.class}, tree="[0]") private Output imageId; /** * @return The Amazon Machine Image (AMI) of the compute fleet. * */ public Output> imageId() { return Codegen.optional(this.imageId); } /** * Last modification time of the fleet. * */ @Export(name="lastModified", refs={String.class}, tree="[0]") private Output lastModified; /** * @return Last modification time of the fleet. * */ public Output lastModified() { return this.lastModified; } /** * Fleet name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Fleet name. * */ public Output name() { return this.name; } /** * Overflow behavior for compute fleet. Valid values: `ON_DEMAND`, `QUEUE`. * */ @Export(name="overflowBehavior", refs={String.class}, tree="[0]") private Output overflowBehavior; /** * @return Overflow behavior for compute fleet. Valid values: `ON_DEMAND`, `QUEUE`. * */ public Output overflowBehavior() { return this.overflowBehavior; } /** * Configuration block. Detailed below. This option is only valid when your overflow behavior is `QUEUE`. * */ @Export(name="scalingConfiguration", refs={FleetScalingConfiguration.class}, tree="[0]") private Output scalingConfiguration; /** * @return Configuration block. Detailed below. This option is only valid when your overflow behavior is `QUEUE`. * */ public Output> scalingConfiguration() { return Codegen.optional(this.scalingConfiguration); } /** * Nested attribute containing information about the current status of the fleet. * */ @Export(name="statuses", refs={List.class,FleetStatus.class}, tree="[0,1]") private Output> statuses; /** * @return Nested attribute containing information about the current status of the fleet. * */ public Output> statuses() { return this.statuses; } /** * 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. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return 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. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; public Output> tagsAll() { return this.tagsAll; } /** * Configuration block. Detailed below. * */ @Export(name="vpcConfigs", refs={List.class,FleetVpcConfig.class}, tree="[0,1]") private Output> vpcConfigs; /** * @return Configuration block. Detailed below. * */ public Output>> vpcConfigs() { return Codegen.optional(this.vpcConfigs); } /** * * @param name The _unique_ name of the resulting resource. */ public Fleet(java.lang.String name) { this(name, FleetArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Fleet(java.lang.String name, FleetArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Fleet(java.lang.String name, FleetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:codebuild/fleet:Fleet", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Fleet(java.lang.String name, Output id, @Nullable FleetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:codebuild/fleet:Fleet", name, state, makeResourceOptions(options, id), false); } private static FleetArgs makeArgs(FleetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? FleetArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Fleet get(java.lang.String name, Output id, @Nullable FleetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Fleet(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy