Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.cloudstoragegateway.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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.cloudstoragegateway.StorageBundle("example", {storageBundleName: "example_value"});
const nameRegex = alicloud.cloudstoragegateway.getGatewaysOutput({
storageBundleId: example.id,
nameRegex: "^my-Gateway",
});
export const cloudStorageGatewayGatewayId = nameRegex.apply(nameRegex => nameRegex.gateways?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cloudstoragegateway.StorageBundle("example", storage_bundle_name="example_value")
name_regex = alicloud.cloudstoragegateway.get_gateways_output(storage_bundle_id=example.id,
name_regex="^my-Gateway")
pulumi.export("cloudStorageGatewayGatewayId", name_regex.gateways[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudstoragegateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cloudstoragegateway.NewStorageBundle(ctx, "example", &cloudstoragegateway.StorageBundleArgs{
StorageBundleName: pulumi.String("example_value"),
})
if err != nil {
return err
}
nameRegex := cloudstoragegateway.GetGatewaysOutput(ctx, cloudstoragegateway.GetGatewaysOutputArgs{
StorageBundleId: example.ID(),
NameRegex: pulumi.String("^my-Gateway"),
}, nil)
ctx.Export("cloudStorageGatewayGatewayId", nameRegex.ApplyT(func(nameRegex cloudstoragegateway.GetGatewaysResult) (*string, error) {
return &nameRegex.Gateways[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.CloudStorageGateway.StorageBundle("example", new()
{
StorageBundleName = "example_value",
});
var nameRegex = AliCloud.CloudStorageGateway.GetGateways.Invoke(new()
{
StorageBundleId = example.Id,
NameRegex = "^my-Gateway",
});
return new Dictionary<string, object?>
{
["cloudStorageGatewayGatewayId"] = nameRegex.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Id),
};
});
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(_nameRegex -> _nameRegex.gateways()[0].id()));
}
}
resources:
example:
type: alicloud:cloudstoragegateway:StorageBundle
properties:
storageBundleName: example_value
variables:
nameRegex:
fn::invoke:
function: alicloud:cloudstoragegateway:getGateways
arguments:
storageBundleId: ${example.id}
nameRegex: ^my-Gateway
outputs:
cloudStorageGatewayGatewayId: ${nameRegex.gateways[0].id}
Using getGateways
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getGateways(args: GetGatewaysArgs, opts?: InvokeOptions): Promise<GetGatewaysResult>
function getGatewaysOutput(args: GetGatewaysOutputArgs, opts?: InvokeOptions): Output<GetGatewaysResult>def get_gateways(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
status: Optional[str] = None,
storage_bundle_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGatewaysResult
def get_gateways_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
storage_bundle_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGatewaysResult]func GetGateways(ctx *Context, args *GetGatewaysArgs, opts ...InvokeOption) (*GetGatewaysResult, error)
func GetGatewaysOutput(ctx *Context, args *GetGatewaysOutputArgs, opts ...InvokeOption) GetGatewaysResultOutput> Note: This function is named GetGateways in the Go SDK.
public static class GetGateways
{
public static Task<GetGatewaysResult> InvokeAsync(GetGatewaysArgs args, InvokeOptions? opts = null)
public static Output<GetGatewaysResult> Invoke(GetGatewaysInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGatewaysResult> getGateways(GetGatewaysArgs args, InvokeOptions options)
public static Output<GetGatewaysResult> getGateways(GetGatewaysArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudstoragegateway/getGateways:getGateways
arguments:
# arguments dictionaryThe following arguments are supported:
- Storage
Bundle stringId - storage bundle id.
- Ids List<string>
- A list of Gateway IDs.
- Name
Regex string - A regex string to filter results by Gateway name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Status string
- gateway status.
- Storage
Bundle stringId - storage bundle id.
- Ids []string
- A list of Gateway IDs.
- Name
Regex string - A regex string to filter results by Gateway name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Status string
- gateway status.
- storage
Bundle StringId - storage bundle id.
- ids List<String>
- A list of Gateway IDs.
- name
Regex String - A regex string to filter results by Gateway name.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Integer - page
Size Integer - status String
- gateway status.
- storage
Bundle stringId - storage bundle id.
- ids string[]
- A list of Gateway IDs.
- name
Regex string - A regex string to filter results by Gateway name.
- output
File string - File name where to save data source results (after running
pulumi preview). - page
Number number - page
Size number - status string
- gateway status.
- storage_
bundle_ strid - storage bundle id.
- ids Sequence[str]
- A list of Gateway IDs.
- name_
regex str - A regex string to filter results by Gateway name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - page_
number int - page_
size int - status str
- gateway status.
- storage
Bundle StringId - storage bundle id.
- ids List<String>
- A list of Gateway IDs.
- name
Regex String - A regex string to filter results by Gateway name.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Number - page
Size Number - status String
- gateway status.
getGateways Result
The following output properties are available:
- Gateways
List<Pulumi.
Ali Cloud. Cloud Storage Gateway. Outputs. Get Gateways Gateway> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Storage
Bundle stringId - Total
Count int - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- Gateways
[]Get
Gateways Gateway - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Storage
Bundle stringId - Total
Count int - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- gateways
List<Get
Gateways Gateway> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- storage
Bundle StringId - total
Count Integer - name
Regex String - output
File String - page
Number Integer - page
Size Integer - status String
- gateways
Get
Gateways Gateway[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- storage
Bundle stringId - total
Count number - name
Regex string - output
File string - page
Number number - page
Size number - status string
- gateways
Sequence[Get
Gateways Gateway] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- storage_
bundle_ strid - total_
count int - name_
regex str - output_
file str - page_
number int - page_
size int - status str
- gateways List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- storage
Bundle StringId - total
Count Number - name
Regex String - output
File String - page
Number Number - page
Size Number - status String
Supporting Types
GetGatewaysGateway
- Activated
Time string - gateway .
- Buy
Url string - Category string
- gateway category.
- Create
Time string - gateway created timestamp in second format.
- Description string
- gateway description.
- Ecs
Instance stringId - gateway ecs instance id.
- Expire
Status int - gateway expiration status.
- Expired
Time string - gateway expiration timestamp in second format.
- Gateway
Class string - gateway class.
- Gateway
Id string - gateway id.
- Gateway
Name string - gateway name.
- Gateway
Version string - gateway version.
- Id string
- The ID of the Gateway.
- Inner
Ip string - gateway service ip.
- Ip string
- gateway public ip.
- Is
Release boolAfter Expiration - whether subscription gateway is released after expiration or not.
- Location string
- gateway location.
- Payment
Type string - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - Public
Network intBandwidth - gateway public network bandwidth.
- Renew
Url string - Status string
- gateway status.
- Storage
Bundle stringId - storage bundle id.
- Task
Id string - gateway task id.
- Type string
- gateway type.
- Vpc
Id string - gateway vpc id.
- Vswitch
Id string - The vswitch id.
- Activated
Time string - gateway .
- Buy
Url string - Category string
- gateway category.
- Create
Time string - gateway created timestamp in second format.
- Description string
- gateway description.
- Ecs
Instance stringId - gateway ecs instance id.
- Expire
Status int - gateway expiration status.
- Expired
Time string - gateway expiration timestamp in second format.
- Gateway
Class string - gateway class.
- Gateway
Id string - gateway id.
- Gateway
Name string - gateway name.
- Gateway
Version string - gateway version.
- Id string
- The ID of the Gateway.
- Inner
Ip string - gateway service ip.
- Ip string
- gateway public ip.
- Is
Release boolAfter Expiration - whether subscription gateway is released after expiration or not.
- Location string
- gateway location.
- Payment
Type string - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - Public
Network intBandwidth - gateway public network bandwidth.
- Renew
Url string - Status string
- gateway status.
- Storage
Bundle stringId - storage bundle id.
- Task
Id string - gateway task id.
- Type string
- gateway type.
- Vpc
Id string - gateway vpc id.
- Vswitch
Id string - The vswitch id.
- activated
Time String - gateway .
- buy
Url String - category String
- gateway category.
- create
Time String - gateway created timestamp in second format.
- description String
- gateway description.
- ecs
Instance StringId - gateway ecs instance id.
- expire
Status Integer - gateway expiration status.
- expired
Time String - gateway expiration timestamp in second format.
- gateway
Class String - gateway class.
- gateway
Id String - gateway id.
- gateway
Name String - gateway name.
- gateway
Version String - gateway version.
- id String
- The ID of the Gateway.
- inner
Ip String - gateway service ip.
- ip String
- gateway public ip.
- is
Release BooleanAfter Expiration - whether subscription gateway is released after expiration or not.
- location String
- gateway location.
- payment
Type String - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - public
Network IntegerBandwidth - gateway public network bandwidth.
- renew
Url String - status String
- gateway status.
- storage
Bundle StringId - storage bundle id.
- task
Id String - gateway task id.
- type String
- gateway type.
- vpc
Id String - gateway vpc id.
- vswitch
Id String - The vswitch id.
- activated
Time string - gateway .
- buy
Url string - category string
- gateway category.
- create
Time string - gateway created timestamp in second format.
- description string
- gateway description.
- ecs
Instance stringId - gateway ecs instance id.
- expire
Status number - gateway expiration status.
- expired
Time string - gateway expiration timestamp in second format.
- gateway
Class string - gateway class.
- gateway
Id string - gateway id.
- gateway
Name string - gateway name.
- gateway
Version string - gateway version.
- id string
- The ID of the Gateway.
- inner
Ip string - gateway service ip.
- ip string
- gateway public ip.
- is
Release booleanAfter Expiration - whether subscription gateway is released after expiration or not.
- location string
- gateway location.
- payment
Type string - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - public
Network numberBandwidth - gateway public network bandwidth.
- renew
Url string - status string
- gateway status.
- storage
Bundle stringId - storage bundle id.
- task
Id string - gateway task id.
- type string
- gateway type.
- vpc
Id string - gateway vpc id.
- vswitch
Id string - The vswitch id.
- activated_
time str - gateway .
- buy_
url str - category str
- gateway category.
- create_
time str - gateway created timestamp in second format.
- description str
- gateway description.
- ecs_
instance_ strid - gateway ecs instance id.
- expire_
status int - gateway expiration status.
- expired_
time str - gateway expiration timestamp in second format.
- gateway_
class str - gateway class.
- gateway_
id str - gateway id.
- gateway_
name str - gateway name.
- gateway_
version str - gateway version.
- id str
- The ID of the Gateway.
- inner_
ip str - gateway service ip.
- ip str
- gateway public ip.
- is_
release_ boolafter_ expiration - whether subscription gateway is released after expiration or not.
- location str
- gateway location.
- payment_
type str - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - public_
network_ intbandwidth - gateway public network bandwidth.
- renew_
url str - status str
- gateway status.
- storage_
bundle_ strid - storage bundle id.
- task_
id str - gateway task id.
- type str
- gateway type.
- vpc_
id str - gateway vpc id.
- vswitch_
id str - The vswitch id.
- activated
Time String - gateway .
- buy
Url String - category String
- gateway category.
- create
Time String - gateway created timestamp in second format.
- description String
- gateway description.
- ecs
Instance StringId - gateway ecs instance id.
- expire
Status Number - gateway expiration status.
- expired
Time String - gateway expiration timestamp in second format.
- gateway
Class String - gateway class.
- gateway
Id String - gateway id.
- gateway
Name String - gateway name.
- gateway
Version String - gateway version.
- id String
- The ID of the Gateway.
- inner
Ip String - gateway service ip.
- ip String
- gateway public ip.
- is
Release BooleanAfter Expiration - whether subscription gateway is released after expiration or not.
- location String
- gateway location.
- payment
Type String - gateway payment type. The Payment type of gateway. The valid value:
PayAsYouGo,Subscription. - public
Network NumberBandwidth - gateway public network bandwidth.
- renew
Url String - status String
- gateway status.
- storage
Bundle StringId - storage bundle id.
- task
Id String - gateway task id.
- type String
- gateway type.
- vpc
Id String - gateway vpc id.
- vswitch
Id String - The vswitch id.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
