Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.ecs.inputs.GetTaskExecutionArgs Maven / Gradle / Ivy
Go to download
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.inputs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionCapacityProviderStrategyArgs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionNetworkConfigurationArgs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionOverridesArgs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionPlacementConstraintArgs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionPlacementStrategyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
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 GetTaskExecutionArgs extends com.pulumi.resources.InvokeArgs {
public static final GetTaskExecutionArgs Empty = new GetTaskExecutionArgs();
/**
* Set of capacity provider strategies to use for the cluster. See below.
*
*/
@Import(name="capacityProviderStrategies")
private @Nullable Output> capacityProviderStrategies;
/**
* @return Set of capacity provider strategies to use for the cluster. See below.
*
*/
public Optional>> capacityProviderStrategies() {
return Optional.ofNullable(this.capacityProviderStrategies);
}
/**
* An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html).
*
*/
@Import(name="clientToken")
private @Nullable Output clientToken;
/**
* @return An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html).
*
*/
public Optional> clientToken() {
return Optional.ofNullable(this.clientToken);
}
/**
* Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
*
*/
@Import(name="cluster", required=true)
private Output cluster;
/**
* @return Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
*
*/
public Output cluster() {
return this.cluster;
}
/**
* Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
*
*/
@Import(name="desiredCount")
private @Nullable Output desiredCount;
/**
* @return Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
*
*/
public Optional> desiredCount() {
return Optional.ofNullable(this.desiredCount);
}
/**
* Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
*
*/
@Import(name="enableEcsManagedTags")
private @Nullable Output enableEcsManagedTags;
/**
* @return Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
*
*/
public Optional> enableEcsManagedTags() {
return Optional.ofNullable(this.enableEcsManagedTags);
}
/**
* Specifies whether to enable Amazon ECS Exec for the tasks within the service.
*
*/
@Import(name="enableExecuteCommand")
private @Nullable Output enableExecuteCommand;
/**
* @return Specifies whether to enable Amazon ECS Exec for the tasks within the service.
*
*/
public Optional> enableExecuteCommand() {
return Optional.ofNullable(this.enableExecuteCommand);
}
/**
* Name of the task group to associate with the task. The default value is the family name of the task definition.
*
*/
@Import(name="group")
private @Nullable Output group;
/**
* @return Name of the task group to associate with the task. The default value is the family name of the task definition.
*
*/
public Optional> group() {
return Optional.ofNullable(this.group);
}
/**
* Launch type on which to run your service. Valid values are `EC2`, `FARGATE`, and `EXTERNAL`.
*
*/
@Import(name="launchType")
private @Nullable Output launchType;
/**
* @return Launch type on which to run your service. Valid values are `EC2`, `FARGATE`, and `EXTERNAL`.
*
*/
public Optional> launchType() {
return Optional.ofNullable(this.launchType);
}
/**
* Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
*
*/
@Import(name="networkConfiguration")
private @Nullable Output networkConfiguration;
/**
* @return Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
*
*/
public Optional> networkConfiguration() {
return Optional.ofNullable(this.networkConfiguration);
}
/**
* A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
*
*/
@Import(name="overrides")
private @Nullable Output overrides;
/**
* @return A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
*
*/
public Optional> overrides() {
return Optional.ofNullable(this.overrides);
}
/**
* An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
*
*/
@Import(name="placementConstraints")
private @Nullable Output> placementConstraints;
/**
* @return An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
*
*/
public Optional>> placementConstraints() {
return Optional.ofNullable(this.placementConstraints);
}
/**
* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
*
*/
@Import(name="placementStrategies")
private @Nullable Output> placementStrategies;
/**
* @return The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
*
*/
public Optional>> placementStrategies() {
return Optional.ofNullable(this.placementStrategies);
}
/**
* The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the `LATEST` platform version is used.
*
*/
@Import(name="platformVersion")
private @Nullable Output platformVersion;
/**
* @return The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the `LATEST` platform version is used.
*
*/
public Optional> platformVersion() {
return Optional.ofNullable(this.platformVersion);
}
/**
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. An error will be received if you specify the `SERVICE` option when running a task. Valid values are `TASK_DEFINITION` or `NONE`.
*
*/
@Import(name="propagateTags")
private @Nullable Output propagateTags;
/**
* @return Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. An error will be received if you specify the `SERVICE` option when running a task. Valid values are `TASK_DEFINITION` or `NONE`.
*
*/
public Optional> propagateTags() {
return Optional.ofNullable(this.propagateTags);
}
/**
* The reference ID to use for the task.
*
*/
@Import(name="referenceId")
private @Nullable Output referenceId;
/**
* @return The reference ID to use for the task.
*
*/
public Optional> referenceId() {
return Optional.ofNullable(this.referenceId);
}
/**
* An optional tag specified when a task is started.
*
*/
@Import(name="startedBy")
private @Nullable Output startedBy;
/**
* @return An optional tag specified when a task is started.
*
*/
public Optional> startedBy() {
return Optional.ofNullable(this.startedBy);
}
/**
* Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* The `family` and `revision` (`family:revision`) or full ARN of the task definition to run. If a revision isn't specified, the latest `ACTIVE` revision is used.
*
* The following arguments are optional:
*
*/
@Import(name="taskDefinition", required=true)
private Output taskDefinition;
/**
* @return The `family` and `revision` (`family:revision`) or full ARN of the task definition to run. If a revision isn't specified, the latest `ACTIVE` revision is used.
*
* The following arguments are optional:
*
*/
public Output taskDefinition() {
return this.taskDefinition;
}
private GetTaskExecutionArgs() {}
private GetTaskExecutionArgs(GetTaskExecutionArgs $) {
this.capacityProviderStrategies = $.capacityProviderStrategies;
this.clientToken = $.clientToken;
this.cluster = $.cluster;
this.desiredCount = $.desiredCount;
this.enableEcsManagedTags = $.enableEcsManagedTags;
this.enableExecuteCommand = $.enableExecuteCommand;
this.group = $.group;
this.launchType = $.launchType;
this.networkConfiguration = $.networkConfiguration;
this.overrides = $.overrides;
this.placementConstraints = $.placementConstraints;
this.placementStrategies = $.placementStrategies;
this.platformVersion = $.platformVersion;
this.propagateTags = $.propagateTags;
this.referenceId = $.referenceId;
this.startedBy = $.startedBy;
this.tags = $.tags;
this.taskDefinition = $.taskDefinition;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetTaskExecutionArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private GetTaskExecutionArgs $;
public Builder() {
$ = new GetTaskExecutionArgs();
}
public Builder(GetTaskExecutionArgs defaults) {
$ = new GetTaskExecutionArgs(Objects.requireNonNull(defaults));
}
/**
* @param capacityProviderStrategies Set of capacity provider strategies to use for the cluster. See below.
*
* @return builder
*
*/
public Builder capacityProviderStrategies(@Nullable Output> capacityProviderStrategies) {
$.capacityProviderStrategies = capacityProviderStrategies;
return this;
}
/**
* @param capacityProviderStrategies Set of capacity provider strategies to use for the cluster. See below.
*
* @return builder
*
*/
public Builder capacityProviderStrategies(List capacityProviderStrategies) {
return capacityProviderStrategies(Output.of(capacityProviderStrategies));
}
/**
* @param capacityProviderStrategies Set of capacity provider strategies to use for the cluster. See below.
*
* @return builder
*
*/
public Builder capacityProviderStrategies(GetTaskExecutionCapacityProviderStrategyArgs... capacityProviderStrategies) {
return capacityProviderStrategies(List.of(capacityProviderStrategies));
}
/**
* @param clientToken An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html).
*
* @return builder
*
*/
public Builder clientToken(@Nullable Output clientToken) {
$.clientToken = clientToken;
return this;
}
/**
* @param clientToken An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html).
*
* @return builder
*
*/
public Builder clientToken(String clientToken) {
return clientToken(Output.of(clientToken));
}
/**
* @param cluster Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
*
* @return builder
*
*/
public Builder cluster(Output cluster) {
$.cluster = cluster;
return this;
}
/**
* @param cluster Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
*
* @return builder
*
*/
public Builder cluster(String cluster) {
return cluster(Output.of(cluster));
}
/**
* @param desiredCount Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
*
* @return builder
*
*/
public Builder desiredCount(@Nullable Output desiredCount) {
$.desiredCount = desiredCount;
return this;
}
/**
* @param desiredCount Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
*
* @return builder
*
*/
public Builder desiredCount(Integer desiredCount) {
return desiredCount(Output.of(desiredCount));
}
/**
* @param enableEcsManagedTags Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
*
* @return builder
*
*/
public Builder enableEcsManagedTags(@Nullable Output enableEcsManagedTags) {
$.enableEcsManagedTags = enableEcsManagedTags;
return this;
}
/**
* @param enableEcsManagedTags Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
*
* @return builder
*
*/
public Builder enableEcsManagedTags(Boolean enableEcsManagedTags) {
return enableEcsManagedTags(Output.of(enableEcsManagedTags));
}
/**
* @param enableExecuteCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
*
* @return builder
*
*/
public Builder enableExecuteCommand(@Nullable Output enableExecuteCommand) {
$.enableExecuteCommand = enableExecuteCommand;
return this;
}
/**
* @param enableExecuteCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
*
* @return builder
*
*/
public Builder enableExecuteCommand(Boolean enableExecuteCommand) {
return enableExecuteCommand(Output.of(enableExecuteCommand));
}
/**
* @param group Name of the task group to associate with the task. The default value is the family name of the task definition.
*
* @return builder
*
*/
public Builder group(@Nullable Output group) {
$.group = group;
return this;
}
/**
* @param group Name of the task group to associate with the task. The default value is the family name of the task definition.
*
* @return builder
*
*/
public Builder group(String group) {
return group(Output.of(group));
}
/**
* @param launchType Launch type on which to run your service. Valid values are `EC2`, `FARGATE`, and `EXTERNAL`.
*
* @return builder
*
*/
public Builder launchType(@Nullable Output launchType) {
$.launchType = launchType;
return this;
}
/**
* @param launchType Launch type on which to run your service. Valid values are `EC2`, `FARGATE`, and `EXTERNAL`.
*
* @return builder
*
*/
public Builder launchType(String launchType) {
return launchType(Output.of(launchType));
}
/**
* @param networkConfiguration Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
*
* @return builder
*
*/
public Builder networkConfiguration(@Nullable Output networkConfiguration) {
$.networkConfiguration = networkConfiguration;
return this;
}
/**
* @param networkConfiguration Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
*
* @return builder
*
*/
public Builder networkConfiguration(GetTaskExecutionNetworkConfigurationArgs networkConfiguration) {
return networkConfiguration(Output.of(networkConfiguration));
}
/**
* @param overrides A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
*
* @return builder
*
*/
public Builder overrides(@Nullable Output overrides) {
$.overrides = overrides;
return this;
}
/**
* @param overrides A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
*
* @return builder
*
*/
public Builder overrides(GetTaskExecutionOverridesArgs overrides) {
return overrides(Output.of(overrides));
}
/**
* @param placementConstraints An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
*
* @return builder
*
*/
public Builder placementConstraints(@Nullable Output> placementConstraints) {
$.placementConstraints = placementConstraints;
return this;
}
/**
* @param placementConstraints An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
*
* @return builder
*
*/
public Builder placementConstraints(List placementConstraints) {
return placementConstraints(Output.of(placementConstraints));
}
/**
* @param placementConstraints An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
*
* @return builder
*
*/
public Builder placementConstraints(GetTaskExecutionPlacementConstraintArgs... placementConstraints) {
return placementConstraints(List.of(placementConstraints));
}
/**
* @param placementStrategies The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
*
* @return builder
*
*/
public Builder placementStrategies(@Nullable Output> placementStrategies) {
$.placementStrategies = placementStrategies;
return this;
}
/**
* @param placementStrategies The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
*
* @return builder
*
*/
public Builder placementStrategies(List placementStrategies) {
return placementStrategies(Output.of(placementStrategies));
}
/**
* @param placementStrategies The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
*
* @return builder
*
*/
public Builder placementStrategies(GetTaskExecutionPlacementStrategyArgs... placementStrategies) {
return placementStrategies(List.of(placementStrategies));
}
/**
* @param platformVersion The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the `LATEST` platform version is used.
*
* @return builder
*
*/
public Builder platformVersion(@Nullable Output platformVersion) {
$.platformVersion = platformVersion;
return this;
}
/**
* @param platformVersion The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the `LATEST` platform version is used.
*
* @return builder
*
*/
public Builder platformVersion(String platformVersion) {
return platformVersion(Output.of(platformVersion));
}
/**
* @param propagateTags Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. An error will be received if you specify the `SERVICE` option when running a task. Valid values are `TASK_DEFINITION` or `NONE`.
*
* @return builder
*
*/
public Builder propagateTags(@Nullable Output propagateTags) {
$.propagateTags = propagateTags;
return this;
}
/**
* @param propagateTags Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. An error will be received if you specify the `SERVICE` option when running a task. Valid values are `TASK_DEFINITION` or `NONE`.
*
* @return builder
*
*/
public Builder propagateTags(String propagateTags) {
return propagateTags(Output.of(propagateTags));
}
/**
* @param referenceId The reference ID to use for the task.
*
* @return builder
*
*/
public Builder referenceId(@Nullable Output referenceId) {
$.referenceId = referenceId;
return this;
}
/**
* @param referenceId The reference ID to use for the task.
*
* @return builder
*
*/
public Builder referenceId(String referenceId) {
return referenceId(Output.of(referenceId));
}
/**
* @param startedBy An optional tag specified when a task is started.
*
* @return builder
*
*/
public Builder startedBy(@Nullable Output startedBy) {
$.startedBy = startedBy;
return this;
}
/**
* @param startedBy An optional tag specified when a task is started.
*
* @return builder
*
*/
public Builder startedBy(String startedBy) {
return startedBy(Output.of(startedBy));
}
/**
* @param tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param taskDefinition The `family` and `revision` (`family:revision`) or full ARN of the task definition to run. If a revision isn't specified, the latest `ACTIVE` revision is used.
*
* The following arguments are optional:
*
* @return builder
*
*/
public Builder taskDefinition(Output taskDefinition) {
$.taskDefinition = taskDefinition;
return this;
}
/**
* @param taskDefinition The `family` and `revision` (`family:revision`) or full ARN of the task definition to run. If a revision isn't specified, the latest `ACTIVE` revision is used.
*
* The following arguments are optional:
*
* @return builder
*
*/
public Builder taskDefinition(String taskDefinition) {
return taskDefinition(Output.of(taskDefinition));
}
public GetTaskExecutionArgs build() {
if ($.cluster == null) {
throw new MissingRequiredPropertyException("GetTaskExecutionArgs", "cluster");
}
if ($.taskDefinition == null) {
throw new MissingRequiredPropertyException("GetTaskExecutionArgs", "taskDefinition");
}
return $;
}
}
}