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

com.pulumi.alicloud.ots.inputs.GetInstancesPlainArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.ots.inputs;

import com.pulumi.core.annotations.Import;
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 GetInstancesPlainArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetInstancesPlainArgs Empty = new GetInstancesPlainArgs();

    /**
     * A list of instance IDs.
     * 
     */
    @Import(name="ids")
    private @Nullable List ids;

    /**
     * @return A list of instance IDs.
     * 
     */
    public Optional> ids() {
        return Optional.ofNullable(this.ids);
    }

    /**
     * A regex string to filter results by instance name.
     * 
     */
    @Import(name="nameRegex")
    private @Nullable String 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 String outputFile;

    /**
     * @return File name where to save data source results (after running `pulumi preview`).
     * 
     */
    public Optional outputFile() {
        return Optional.ofNullable(this.outputFile);
    }

    /**
     * A map of tags assigned to the instance. 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.ots.OtsFunctions;
     * import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
     *             .tags(Map.ofEntries(
     *                 Map.entry("tagKey1", "tagValue1"),
     *                 Map.entry("tagKey2", "tagValue2")
     *             ))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ @Import(name="tags") private @Nullable Map tags; /** * @return A map of tags assigned to the instance. 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.ots.OtsFunctions;
     * import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.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); } private GetInstancesPlainArgs() {} private GetInstancesPlainArgs(GetInstancesPlainArgs $) { this.ids = $.ids; this.nameRegex = $.nameRegex; this.outputFile = $.outputFile; this.tags = $.tags; } public static Builder builder() { return new Builder(); } public static Builder builder(GetInstancesPlainArgs defaults) { return new Builder(defaults); } public static final class Builder { private GetInstancesPlainArgs $; public Builder() { $ = new GetInstancesPlainArgs(); } public Builder(GetInstancesPlainArgs defaults) { $ = new GetInstancesPlainArgs(Objects.requireNonNull(defaults)); } /** * @param ids A list of instance IDs. * * @return builder * */ public Builder ids(@Nullable List ids) { $.ids = ids; return this; } /** * @param ids A list of instance IDs. * * @return builder * */ public Builder ids(String... ids) { return ids(List.of(ids)); } /** * @param nameRegex A regex string to filter results by instance name. * * @return builder * */ public Builder nameRegex(@Nullable String nameRegex) { $.nameRegex = nameRegex; return this; } /** * @param outputFile File name where to save data source results (after running `pulumi preview`). * * @return builder * */ public Builder outputFile(@Nullable String outputFile) { $.outputFile = outputFile; return this; } /** * @param tags A map of tags assigned to the instance. 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.ots.OtsFunctions;
         * import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
         *             .tags(Map.ofEntries(
         *                 Map.entry("tagKey1", "tagValue1"),
         *                 Map.entry("tagKey2", "tagValue2")
         *             ))
         *             .build());
         * 
         *     }
         * }
         * }
         * 
* <!--End PulumiCodeChooser --> * * @return builder * */ public Builder tags(@Nullable Map tags) { $.tags = tags; return this; } public GetInstancesPlainArgs build() { return $; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy