getGateways

This data source provides the Cloud Storage Gateway Gateways of the current Alibaba Cloud user.

NOTE: Available in v1.132.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundle;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundleArgs;
import com.pulumi.alicloud.cloudstoragegateway.CloudstoragegatewayFunctions;
import com.pulumi.alicloud.cloudstoragegateway.inputs.GetGatewaysArgs;
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) {
var example = new StorageBundle("example", StorageBundleArgs.builder()
.storageBundleName("example_value")
.build());
final var nameRegex = CloudstoragegatewayFunctions.getGateways(GetGatewaysArgs.builder()
.storageBundleId(example.id())
.nameRegex("^my-Gateway")
.build());
ctx.export("cloudStorageGatewayGatewayId", nameRegex.applyValue(getGatewaysResult -> getGatewaysResult).applyValue(nameRegex -> nameRegex.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].id())));
}
}

Return

A collection of values returned by getGateways.

Parameters

argument

A collection of arguments for invoking getGateways.


suspend fun getGateways(ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, status: String? = null, storageBundleId: String): GetGatewaysResult

Return

A collection of values returned by getGateways.

See also

Parameters

ids

A list of Gateway IDs.

nameRegex

A regex string to filter results by Gateway name.

outputFile

File name where to save data source results (after running pulumi preview).

pageNumber
pageSize
status

gateway status.

storageBundleId

storage bundle id.


suspend fun getGateways(argument: suspend GetGatewaysPlainArgsBuilder.() -> Unit): GetGatewaysResult

Return

A collection of values returned by getGateways.

See also

Parameters

argument

Builder for com.pulumi.alicloud.cloudstoragegateway.kotlin.inputs.GetGatewaysPlainArgs.