All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.alicloud.ecs.inputs.GetInstancesArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing AliCloud 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.alicloud.ecs.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;
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 GetInstancesArgs extends com.pulumi.resources.InvokeArgs {
public static final GetInstancesArgs Empty = new GetInstancesArgs();
/**
* Availability zone where instances are located.
*
*/
@Import(name="availabilityZone")
private @Nullable Output availabilityZone;
/**
* @return Availability zone where instances are located.
*
*/
public Optional> availabilityZone() {
return Optional.ofNullable(this.availabilityZone);
}
/**
* Default to `true`. If false, the attributes `ram_role_name` and `disk_device_mappings` will not be fetched and output.
*
*/
@Import(name="enableDetails")
private @Nullable Output enableDetails;
/**
* @return Default to `true`. If false, the attributes `ram_role_name` and `disk_device_mappings` will not be fetched and output.
*
*/
public Optional> enableDetails() {
return Optional.ofNullable(this.enableDetails);
}
/**
* A list of ECS instance IDs.
*
*/
@Import(name="ids")
private @Nullable Output> ids;
/**
* @return A list of ECS instance IDs.
*
*/
public Optional>> ids() {
return Optional.ofNullable(this.ids);
}
/**
* The image ID of some ECS instance used.
*
*/
@Import(name="imageId")
private @Nullable Output imageId;
/**
* @return The image ID of some ECS instance used.
*
*/
public Optional> imageId() {
return Optional.ofNullable(this.imageId);
}
/**
* The name of the instance. Fuzzy search with the asterisk (*) wildcard characters is supported.
*
*/
@Import(name="instanceName")
private @Nullable Output instanceName;
/**
* @return The name of the instance. Fuzzy search with the asterisk (*) wildcard characters is supported.
*
*/
public Optional> instanceName() {
return Optional.ofNullable(this.instanceName);
}
/**
* A regex string to filter results by instance name.
*
*/
@Import(name="nameRegex")
private @Nullable Output nameRegex;
/**
* @return A regex string to filter results by instance name.
*
*/
public Optional> nameRegex() {
return Optional.ofNullable(this.nameRegex);
}
/**
* File name where to save data source results (after running `pulumi preview`).
*
*/
@Import(name="outputFile")
private @Nullable Output outputFile;
/**
* @return File name where to save data source results (after running `pulumi preview`).
*
*/
public Optional> outputFile() {
return Optional.ofNullable(this.outputFile);
}
@Import(name="pageNumber")
private @Nullable Output pageNumber;
public Optional> pageNumber() {
return Optional.ofNullable(this.pageNumber);
}
@Import(name="pageSize")
private @Nullable Output pageSize;
public Optional> pageSize() {
return Optional.ofNullable(this.pageSize);
}
/**
* The RAM role name which the instance attaches.
*
*/
@Import(name="ramRoleName")
private @Nullable Output ramRoleName;
/**
* @return The RAM role name which the instance attaches.
*
*/
public Optional> ramRoleName() {
return Optional.ofNullable(this.ramRoleName);
}
/**
* The ID of resource group which the instance belongs.
*
*/
@Import(name="resourceGroupId")
private @Nullable Output resourceGroupId;
/**
* @return The ID of resource group which the instance belongs.
*
*/
public Optional> resourceGroupId() {
return Optional.ofNullable(this.resourceGroupId);
}
/**
* Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
*
*/
@Import(name="status")
private @Nullable Output status;
/**
* @return Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
*
*/
public Optional> status() {
return Optional.ofNullable(this.status);
}
/**
* A map of tags assigned to the ECS instances. It must be in the format:
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.ecs.EcsFunctions;
* import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
* 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) {
* final var taggedInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
* .tags(Map.ofEntries(
* Map.entry("tagKey1", "tagValue1"),
* Map.entry("tagKey2", "tagValue2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return A map of tags assigned to the ECS instances. It must be in the format:
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.ecs.EcsFunctions;
* import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
* 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) {
* final var taggedInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
* .tags(Map.ofEntries(
* Map.entry("tagKey1", "tagValue1"),
* Map.entry("tagKey2", "tagValue2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* ID of the VPC linked to the instances.
*
*/
@Import(name="vpcId")
private @Nullable Output vpcId;
/**
* @return ID of the VPC linked to the instances.
*
*/
public Optional> vpcId() {
return Optional.ofNullable(this.vpcId);
}
/**
* ID of the VSwitch linked to the instances.
*
*/
@Import(name="vswitchId")
private @Nullable Output vswitchId;
/**
* @return ID of the VSwitch linked to the instances.
*
*/
public Optional> vswitchId() {
return Optional.ofNullable(this.vswitchId);
}
private GetInstancesArgs() {}
private GetInstancesArgs(GetInstancesArgs $) {
this.availabilityZone = $.availabilityZone;
this.enableDetails = $.enableDetails;
this.ids = $.ids;
this.imageId = $.imageId;
this.instanceName = $.instanceName;
this.nameRegex = $.nameRegex;
this.outputFile = $.outputFile;
this.pageNumber = $.pageNumber;
this.pageSize = $.pageSize;
this.ramRoleName = $.ramRoleName;
this.resourceGroupId = $.resourceGroupId;
this.status = $.status;
this.tags = $.tags;
this.vpcId = $.vpcId;
this.vswitchId = $.vswitchId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetInstancesArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private GetInstancesArgs $;
public Builder() {
$ = new GetInstancesArgs();
}
public Builder(GetInstancesArgs defaults) {
$ = new GetInstancesArgs(Objects.requireNonNull(defaults));
}
/**
* @param availabilityZone Availability zone where instances are located.
*
* @return builder
*
*/
public Builder availabilityZone(@Nullable Output availabilityZone) {
$.availabilityZone = availabilityZone;
return this;
}
/**
* @param availabilityZone Availability zone where instances are located.
*
* @return builder
*
*/
public Builder availabilityZone(String availabilityZone) {
return availabilityZone(Output.of(availabilityZone));
}
/**
* @param enableDetails Default to `true`. If false, the attributes `ram_role_name` and `disk_device_mappings` will not be fetched and output.
*
* @return builder
*
*/
public Builder enableDetails(@Nullable Output enableDetails) {
$.enableDetails = enableDetails;
return this;
}
/**
* @param enableDetails Default to `true`. If false, the attributes `ram_role_name` and `disk_device_mappings` will not be fetched and output.
*
* @return builder
*
*/
public Builder enableDetails(Boolean enableDetails) {
return enableDetails(Output.of(enableDetails));
}
/**
* @param ids A list of ECS instance IDs.
*
* @return builder
*
*/
public Builder ids(@Nullable Output> ids) {
$.ids = ids;
return this;
}
/**
* @param ids A list of ECS instance IDs.
*
* @return builder
*
*/
public Builder ids(List ids) {
return ids(Output.of(ids));
}
/**
* @param ids A list of ECS instance IDs.
*
* @return builder
*
*/
public Builder ids(String... ids) {
return ids(List.of(ids));
}
/**
* @param imageId The image ID of some ECS instance used.
*
* @return builder
*
*/
public Builder imageId(@Nullable Output imageId) {
$.imageId = imageId;
return this;
}
/**
* @param imageId The image ID of some ECS instance used.
*
* @return builder
*
*/
public Builder imageId(String imageId) {
return imageId(Output.of(imageId));
}
/**
* @param instanceName The name of the instance. Fuzzy search with the asterisk (*) wildcard characters is supported.
*
* @return builder
*
*/
public Builder instanceName(@Nullable Output instanceName) {
$.instanceName = instanceName;
return this;
}
/**
* @param instanceName The name of the instance. Fuzzy search with the asterisk (*) wildcard characters is supported.
*
* @return builder
*
*/
public Builder instanceName(String instanceName) {
return instanceName(Output.of(instanceName));
}
/**
* @param nameRegex A regex string to filter results by instance name.
*
* @return builder
*
*/
public Builder nameRegex(@Nullable Output nameRegex) {
$.nameRegex = nameRegex;
return this;
}
/**
* @param nameRegex A regex string to filter results by instance name.
*
* @return builder
*
*/
public Builder nameRegex(String nameRegex) {
return nameRegex(Output.of(nameRegex));
}
/**
* @param outputFile File name where to save data source results (after running `pulumi preview`).
*
* @return builder
*
*/
public Builder outputFile(@Nullable Output outputFile) {
$.outputFile = outputFile;
return this;
}
/**
* @param outputFile File name where to save data source results (after running `pulumi preview`).
*
* @return builder
*
*/
public Builder outputFile(String outputFile) {
return outputFile(Output.of(outputFile));
}
public Builder pageNumber(@Nullable Output pageNumber) {
$.pageNumber = pageNumber;
return this;
}
public Builder pageNumber(Integer pageNumber) {
return pageNumber(Output.of(pageNumber));
}
public Builder pageSize(@Nullable Output pageSize) {
$.pageSize = pageSize;
return this;
}
public Builder pageSize(Integer pageSize) {
return pageSize(Output.of(pageSize));
}
/**
* @param ramRoleName The RAM role name which the instance attaches.
*
* @return builder
*
*/
public Builder ramRoleName(@Nullable Output ramRoleName) {
$.ramRoleName = ramRoleName;
return this;
}
/**
* @param ramRoleName The RAM role name which the instance attaches.
*
* @return builder
*
*/
public Builder ramRoleName(String ramRoleName) {
return ramRoleName(Output.of(ramRoleName));
}
/**
* @param resourceGroupId The ID of resource group which the instance belongs.
*
* @return builder
*
*/
public Builder resourceGroupId(@Nullable Output resourceGroupId) {
$.resourceGroupId = resourceGroupId;
return this;
}
/**
* @param resourceGroupId The ID of resource group which the instance belongs.
*
* @return builder
*
*/
public Builder resourceGroupId(String resourceGroupId) {
return resourceGroupId(Output.of(resourceGroupId));
}
/**
* @param status Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
*
* @return builder
*
*/
public Builder status(@Nullable Output status) {
$.status = status;
return this;
}
/**
* @param status Instance status. Valid values: "Creating", "Starting", "Running", "Stopping" and "Stopped". If undefined, all statuses are considered.
*
* @return builder
*
*/
public Builder status(String status) {
return status(Output.of(status));
}
/**
* @param tags A map of tags assigned to the ECS instances. It must be in the format:
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.ecs.EcsFunctions;
* import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
* 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) {
* final var taggedInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
* .tags(Map.ofEntries(
* Map.entry("tagKey1", "tagValue1"),
* Map.entry("tagKey2", "tagValue2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags A map of tags assigned to the ECS instances. It must be in the format:
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.ecs.EcsFunctions;
* import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
* 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) {
* final var taggedInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
* .tags(Map.ofEntries(
* Map.entry("tagKey1", "tagValue1"),
* Map.entry("tagKey2", "tagValue2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param vpcId ID of the VPC linked to the instances.
*
* @return builder
*
*/
public Builder vpcId(@Nullable Output vpcId) {
$.vpcId = vpcId;
return this;
}
/**
* @param vpcId ID of the VPC linked to the instances.
*
* @return builder
*
*/
public Builder vpcId(String vpcId) {
return vpcId(Output.of(vpcId));
}
/**
* @param vswitchId ID of the VSwitch linked to the instances.
*
* @return builder
*
*/
public Builder vswitchId(@Nullable Output vswitchId) {
$.vswitchId = vswitchId;
return this;
}
/**
* @param vswitchId ID of the VSwitch linked to the instances.
*
* @return builder
*
*/
public Builder vswitchId(String vswitchId) {
return vswitchId(Output.of(vswitchId));
}
public GetInstancesArgs build() {
return $;
}
}
}