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

com.pulumi.azurenative.compute.CapacityReservationArgs 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.compute;

import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class CapacityReservationArgs extends com.pulumi.resources.ResourceArgs {

    public static final CapacityReservationArgs Empty = new CapacityReservationArgs();

    /**
     * The name of the capacity reservation group.
     * 
     */
    @Import(name="capacityReservationGroupName", required=true)
    private Output capacityReservationGroupName;

    /**
     * @return The name of the capacity reservation group.
     * 
     */
    public Output capacityReservationGroupName() {
        return this.capacityReservationGroupName;
    }

    /**
     * The name of the capacity reservation.
     * 
     */
    @Import(name="capacityReservationName")
    private @Nullable Output capacityReservationName;

    /**
     * @return The name of the capacity reservation.
     * 
     */
    public Optional> capacityReservationName() {
        return Optional.ofNullable(this.capacityReservationName);
    }

    /**
     * Resource location
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
     * 
     */
    @Import(name="sku", required=true)
    private Output sku;

    /**
     * @return SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
     * 
     */
    public Output sku() {
        return this.sku;
    }

    /**
     * Resource tags
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
     * 
     */
    @Import(name="zones")
    private @Nullable Output> zones;

    /**
     * @return Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
     * 
     */
    public Optional>> zones() {
        return Optional.ofNullable(this.zones);
    }

    private CapacityReservationArgs() {}

    private CapacityReservationArgs(CapacityReservationArgs $) {
        this.capacityReservationGroupName = $.capacityReservationGroupName;
        this.capacityReservationName = $.capacityReservationName;
        this.location = $.location;
        this.resourceGroupName = $.resourceGroupName;
        this.sku = $.sku;
        this.tags = $.tags;
        this.zones = $.zones;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(CapacityReservationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private CapacityReservationArgs $;

        public Builder() {
            $ = new CapacityReservationArgs();
        }

        public Builder(CapacityReservationArgs defaults) {
            $ = new CapacityReservationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param capacityReservationGroupName The name of the capacity reservation group.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservationGroupName(Output capacityReservationGroupName) {
            $.capacityReservationGroupName = capacityReservationGroupName;
            return this;
        }

        /**
         * @param capacityReservationGroupName The name of the capacity reservation group.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservationGroupName(String capacityReservationGroupName) {
            return capacityReservationGroupName(Output.of(capacityReservationGroupName));
        }

        /**
         * @param capacityReservationName The name of the capacity reservation.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservationName(@Nullable Output capacityReservationName) {
            $.capacityReservationName = capacityReservationName;
            return this;
        }

        /**
         * @param capacityReservationName The name of the capacity reservation.
         * 
         * @return builder
         * 
         */
        public Builder capacityReservationName(String capacityReservationName) {
            return capacityReservationName(Output.of(capacityReservationName));
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource location
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param sku SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
         * 
         * @return builder
         * 
         */
        public Builder sku(Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
         * 
         * @return builder
         * 
         */
        public Builder sku(SkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param zones Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
         * 
         * @return builder
         * 
         */
        public Builder zones(@Nullable Output> zones) {
            $.zones = zones;
            return this;
        }

        /**
         * @param zones Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
         * 
         * @return builder
         * 
         */
        public Builder zones(List zones) {
            return zones(Output.of(zones));
        }

        /**
         * @param zones Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
         * 
         * @return builder
         * 
         */
        public Builder zones(String... zones) {
            return zones(List.of(zones));
        }

        public CapacityReservationArgs build() {
            if ($.capacityReservationGroupName == null) {
                throw new MissingRequiredPropertyException("CapacityReservationArgs", "capacityReservationGroupName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("CapacityReservationArgs", "resourceGroupName");
            }
            if ($.sku == null) {
                throw new MissingRequiredPropertyException("CapacityReservationArgs", "sku");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy