com.pulumi.aws.ecs.outputs.ServiceCapacityProviderStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** 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.ecs.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ServiceCapacityProviderStrategy {
/**
* @return Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
*
*/
private @Nullable Integer base;
/**
* @return Short name of the capacity provider.
*
*/
private String capacityProvider;
/**
* @return Relative percentage of the total number of launched tasks that should use the specified capacity provider.
*
*/
private @Nullable Integer weight;
private ServiceCapacityProviderStrategy() {}
/**
* @return Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
*
*/
public Optional base() {
return Optional.ofNullable(this.base);
}
/**
* @return Short name of the capacity provider.
*
*/
public String capacityProvider() {
return this.capacityProvider;
}
/**
* @return Relative percentage of the total number of launched tasks that should use the specified capacity provider.
*
*/
public Optional weight() {
return Optional.ofNullable(this.weight);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ServiceCapacityProviderStrategy defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer base;
private String capacityProvider;
private @Nullable Integer weight;
public Builder() {}
public Builder(ServiceCapacityProviderStrategy defaults) {
Objects.requireNonNull(defaults);
this.base = defaults.base;
this.capacityProvider = defaults.capacityProvider;
this.weight = defaults.weight;
}
@CustomType.Setter
public Builder base(@Nullable Integer base) {
this.base = base;
return this;
}
@CustomType.Setter
public Builder capacityProvider(String capacityProvider) {
if (capacityProvider == null) {
throw new MissingRequiredPropertyException("ServiceCapacityProviderStrategy", "capacityProvider");
}
this.capacityProvider = capacityProvider;
return this;
}
@CustomType.Setter
public Builder weight(@Nullable Integer weight) {
this.weight = weight;
return this;
}
public ServiceCapacityProviderStrategy build() {
final var _resultValue = new ServiceCapacityProviderStrategy();
_resultValue.base = base;
_resultValue.capacityProvider = capacityProvider;
_resultValue.weight = weight;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy