Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.cloudstoragegateway.getGateways
Explore with Pulumi AI
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(getGatewaysResult -> getGatewaysResult).applyValue(nameRegex -> nameRegex.applyValue(getGatewaysResult -> getGatewaysResult.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:
- StorageBundle stringId 
- storage bundle id.
- Ids List<string>
- A list of Gateway IDs.
- NameRegex string
- A regex string to filter results by Gateway name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- Status string
- gateway status.
- StorageBundle stringId 
- storage bundle id.
- Ids []string
- A list of Gateway IDs.
- NameRegex string
- A regex string to filter results by Gateway name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- Status string
- gateway status.
- storageBundle StringId 
- storage bundle id.
- ids List<String>
- A list of Gateway IDs.
- nameRegex String
- A regex string to filter results by Gateway name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Integer
- pageSize Integer
- status String
- gateway status.
- storageBundle stringId 
- storage bundle id.
- ids string[]
- A list of Gateway IDs.
- nameRegex string
- A regex string to filter results by Gateway name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- pageNumber number
- pageSize 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.
- storageBundle StringId 
- storage bundle id.
- ids List<String>
- A list of Gateway IDs.
- nameRegex String
- A regex string to filter results by Gateway name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Number
- pageSize 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>
- StorageBundle stringId 
- TotalCount int
- NameRegex string
- OutputFile string
- PageNumber int
- PageSize int
- Status string
- Gateways
[]GetGateways Gateway 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- StorageBundle stringId 
- TotalCount int
- NameRegex string
- OutputFile string
- PageNumber int
- PageSize int
- Status string
- gateways
List<GetGateways Gateway> 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- storageBundle StringId 
- totalCount Integer
- nameRegex String
- outputFile String
- pageNumber Integer
- pageSize Integer
- status String
- gateways
GetGateways Gateway[] 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- storageBundle stringId 
- totalCount number
- nameRegex string
- outputFile string
- pageNumber number
- pageSize number
- status string
- gateways
Sequence[GetGateways 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>
- storageBundle StringId 
- totalCount Number
- nameRegex String
- outputFile String
- pageNumber Number
- pageSize Number
- status String
Supporting Types
GetGatewaysGateway  
- ActivatedTime string
- gateway .
- BuyUrl string
- Category string
- gateway category.
- CreateTime string
- gateway created timestamp in second format.
- Description string
- gateway description.
- EcsInstance stringId 
- gateway ecs instance id.
- ExpireStatus int
- gateway expiration status.
- ExpiredTime string
- gateway expiration timestamp in second format.
- GatewayClass string
- gateway class.
- GatewayId string
- gateway id.
- GatewayName string
- gateway name.
- GatewayVersion string
- gateway version.
- Id string
- The ID of the Gateway.
- InnerIp string
- gateway service ip.
- Ip string
- gateway public ip.
- IsRelease boolAfter Expiration 
- whether subscription gateway is released after expiration or not.
- Location string
- gateway location.
- PaymentType string
- gateway payment type. The Payment type of gateway. The valid value: PayAsYouGo,Subscription.
- PublicNetwork intBandwidth 
- gateway public network bandwidth.
- RenewUrl string
- Status string
- gateway status.
- StorageBundle stringId 
- storage bundle id.
- TaskId string
- gateway task id.
- Type string
- gateway type.
- VpcId string
- gateway vpc id.
- VswitchId string
- The vswitch id.
- ActivatedTime string
- gateway .
- BuyUrl string
- Category string
- gateway category.
- CreateTime string
- gateway created timestamp in second format.
- Description string
- gateway description.
- EcsInstance stringId 
- gateway ecs instance id.
- ExpireStatus int
- gateway expiration status.
- ExpiredTime string
- gateway expiration timestamp in second format.
- GatewayClass string
- gateway class.
- GatewayId string
- gateway id.
- GatewayName string
- gateway name.
- GatewayVersion string
- gateway version.
- Id string
- The ID of the Gateway.
- InnerIp string
- gateway service ip.
- Ip string
- gateway public ip.
- IsRelease boolAfter Expiration 
- whether subscription gateway is released after expiration or not.
- Location string
- gateway location.
- PaymentType string
- gateway payment type. The Payment type of gateway. The valid value: PayAsYouGo,Subscription.
- PublicNetwork intBandwidth 
- gateway public network bandwidth.
- RenewUrl string
- Status string
- gateway status.
- StorageBundle stringId 
- storage bundle id.
- TaskId string
- gateway task id.
- Type string
- gateway type.
- VpcId string
- gateway vpc id.
- VswitchId string
- The vswitch id.
- activatedTime String
- gateway .
- buyUrl String
- category String
- gateway category.
- createTime String
- gateway created timestamp in second format.
- description String
- gateway description.
- ecsInstance StringId 
- gateway ecs instance id.
- expireStatus Integer
- gateway expiration status.
- expiredTime String
- gateway expiration timestamp in second format.
- gatewayClass String
- gateway class.
- gatewayId String
- gateway id.
- gatewayName String
- gateway name.
- gatewayVersion String
- gateway version.
- id String
- The ID of the Gateway.
- innerIp String
- gateway service ip.
- ip String
- gateway public ip.
- isRelease BooleanAfter Expiration 
- whether subscription gateway is released after expiration or not.
- location String
- gateway location.
- paymentType String
- gateway payment type. The Payment type of gateway. The valid value: PayAsYouGo,Subscription.
- publicNetwork IntegerBandwidth 
- gateway public network bandwidth.
- renewUrl String
- status String
- gateway status.
- storageBundle StringId 
- storage bundle id.
- taskId String
- gateway task id.
- type String
- gateway type.
- vpcId String
- gateway vpc id.
- vswitchId String
- The vswitch id.
- activatedTime string
- gateway .
- buyUrl string
- category string
- gateway category.
- createTime string
- gateway created timestamp in second format.
- description string
- gateway description.
- ecsInstance stringId 
- gateway ecs instance id.
- expireStatus number
- gateway expiration status.
- expiredTime string
- gateway expiration timestamp in second format.
- gatewayClass string
- gateway class.
- gatewayId string
- gateway id.
- gatewayName string
- gateway name.
- gatewayVersion string
- gateway version.
- id string
- The ID of the Gateway.
- innerIp string
- gateway service ip.
- ip string
- gateway public ip.
- isRelease booleanAfter Expiration 
- whether subscription gateway is released after expiration or not.
- location string
- gateway location.
- paymentType string
- gateway payment type. The Payment type of gateway. The valid value: PayAsYouGo,Subscription.
- publicNetwork numberBandwidth 
- gateway public network bandwidth.
- renewUrl string
- status string
- gateway status.
- storageBundle stringId 
- storage bundle id.
- taskId string
- gateway task id.
- type string
- gateway type.
- vpcId string
- gateway vpc id.
- vswitchId 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.
- activatedTime String
- gateway .
- buyUrl String
- category String
- gateway category.
- createTime String
- gateway created timestamp in second format.
- description String
- gateway description.
- ecsInstance StringId 
- gateway ecs instance id.
- expireStatus Number
- gateway expiration status.
- expiredTime String
- gateway expiration timestamp in second format.
- gatewayClass String
- gateway class.
- gatewayId String
- gateway id.
- gatewayName String
- gateway name.
- gatewayVersion String
- gateway version.
- id String
- The ID of the Gateway.
- innerIp String
- gateway service ip.
- ip String
- gateway public ip.
- isRelease BooleanAfter Expiration 
- whether subscription gateway is released after expiration or not.
- location String
- gateway location.
- paymentType String
- gateway payment type. The Payment type of gateway. The valid value: PayAsYouGo,Subscription.
- publicNetwork NumberBandwidth 
- gateway public network bandwidth.
- renewUrl String
- status String
- gateway status.
- storageBundle StringId 
- storage bundle id.
- taskId String
- gateway task id.
- type String
- gateway type.
- vpcId String
- gateway vpc id.
- vswitchId 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.