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

com.pulumi.azurenative.devopsinfrastructure.Pool Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show 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.azurenative.devopsinfrastructure;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.devopsinfrastructure.PoolArgs;
import com.pulumi.azurenative.devopsinfrastructure.outputs.AzureDevOpsOrganizationProfileResponse;
import com.pulumi.azurenative.devopsinfrastructure.outputs.ManagedServiceIdentityResponse;
import com.pulumi.azurenative.devopsinfrastructure.outputs.StatefulResponse;
import com.pulumi.azurenative.devopsinfrastructure.outputs.StatelessAgentProfileResponse;
import com.pulumi.azurenative.devopsinfrastructure.outputs.SystemDataResponse;
import com.pulumi.azurenative.devopsinfrastructure.outputs.VmssFabricProfileResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Either;
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;

/**
 * Concrete tracked resource types can be created by aliasing this type using a specific property type.
 * Azure REST API version: 2023-10-30-preview.
 * 
 * Other available API versions: 2023-12-13-preview, 2024-03-26-preview, 2024-04-04-preview.
 * 
 * ## Example Usage
 * ### Pools_CreateOrUpdate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.devopsinfrastructure.Pool;
 * import com.pulumi.azurenative.devopsinfrastructure.PoolArgs;
 * import com.pulumi.azurenative.devopsinfrastructure.inputs.VmssFabricProfileArgs;
 * import com.pulumi.azurenative.devopsinfrastructure.inputs.DevOpsAzureSkuArgs;
 * import com.pulumi.azurenative.devopsinfrastructure.inputs.AzureDevOpsOrganizationProfileArgs;
 * 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 pool = new Pool("pool", PoolArgs.builder()
 *             .agentProfile(StatelessAgentProfileArgs.builder()
 *                 .kind("Stateless")
 *                 .build())
 *             .devCenterProjectResourceId("/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES")
 *             .fabricProfile(VmssFabricProfileArgs.builder()
 *                 .images(PoolImageArgs.builder()
 *                     .resourceId("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest")
 *                     .build())
 *                 .kind("Vmss")
 *                 .sku(DevOpsAzureSkuArgs.builder()
 *                     .name("Standard_D4ads_v5")
 *                     .build())
 *                 .build())
 *             .location("eastus")
 *             .maximumConcurrency(10)
 *             .organizationProfile(AzureDevOpsOrganizationProfileArgs.builder()
 *                 .kind("AzureDevOps")
 *                 .organizations(OrganizationArgs.builder()
 *                     .url("https://mseng.visualstudio.com")
 *                     .build())
 *                 .build())
 *             .poolName("pool")
 *             .provisioningState("Succeeded")
 *             .resourceGroupName("rg")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:devopsinfrastructure:Pool myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOpsInfrastructure/pools/{poolName} * ``` * */ @ResourceType(type="azure-native:devopsinfrastructure:Pool") public class Pool extends com.pulumi.resources.CustomResource { /** * Defines how the machine will be handled once it executed a job. * */ @Export(name="agentProfile", refs={Either.class,StatefulResponse.class,StatelessAgentProfileResponse.class}, tree="[0,1,2]") private Output> agentProfile; /** * @return Defines how the machine will be handled once it executed a job. * */ public Output> agentProfile() { return this.agentProfile; } /** * The resource id of the DevCenter Project the pool belongs to. * */ @Export(name="devCenterProjectResourceId", refs={String.class}, tree="[0]") private Output devCenterProjectResourceId; /** * @return The resource id of the DevCenter Project the pool belongs to. * */ public Output devCenterProjectResourceId() { return this.devCenterProjectResourceId; } /** * Defines the type of fabric the agent will run on. * */ @Export(name="fabricProfile", refs={VmssFabricProfileResponse.class}, tree="[0]") private Output fabricProfile; /** * @return Defines the type of fabric the agent will run on. * */ public Output fabricProfile() { return this.fabricProfile; } /** * The managed service identities assigned to this resource. * */ @Export(name="identity", refs={ManagedServiceIdentityResponse.class}, tree="[0]") private Output identity; /** * @return The managed service identities assigned to this resource. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * Defines how many resources can there be created at any given time. * */ @Export(name="maximumConcurrency", refs={Integer.class}, tree="[0]") private Output maximumConcurrency; /** * @return Defines how many resources can there be created at any given time. * */ public Output maximumConcurrency() { return this.maximumConcurrency; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Defines the organization in which the pool will be used. * */ @Export(name="organizationProfile", refs={AzureDevOpsOrganizationProfileResponse.class}, tree="[0]") private Output organizationProfile; /** * @return Defines the organization in which the pool will be used. * */ public Output organizationProfile() { return this.organizationProfile; } /** * The status of the current operation. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The status of the current operation. * */ public Output> provisioningState() { return Codegen.optional(this.provisioningState); } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Pool(java.lang.String name) { this(name, PoolArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Pool(java.lang.String name, PoolArgs 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 Pool(java.lang.String name, PoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devopsinfrastructure:Pool", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Pool(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devopsinfrastructure:Pool", name, null, makeResourceOptions(options, id), false); } private static PoolArgs makeArgs(PoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? PoolArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:devopsinfrastructure/v20231030preview:Pool").build()), Output.of(Alias.builder().type("azure-native:devopsinfrastructure/v20231213preview:Pool").build()), Output.of(Alias.builder().type("azure-native:devopsinfrastructure/v20240326preview:Pool").build()), Output.of(Alias.builder().type("azure-native:devopsinfrastructure/v20240404preview:Pool").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Pool get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Pool(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy