1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cloudstoragegateway
  5. getExpressSyncs
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cloudstoragegateway.getExpressSyncs

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available in v1.144.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cloudstoragegateway.getExpressSyncs({});
export const cloudStorageGatewayExpressSyncId1 = ids.then(ids => ids.syncs?.[0]?.id);
const nameRegex = alicloud.cloudstoragegateway.getExpressSyncs({
    nameRegex: "^my-ExpressSync",
});
export const cloudStorageGatewayExpressSyncId2 = nameRegex.then(nameRegex => nameRegex.syncs?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cloudstoragegateway.get_express_syncs()
pulumi.export("cloudStorageGatewayExpressSyncId1", ids.syncs[0].id)
name_regex = alicloud.cloudstoragegateway.get_express_syncs(name_regex="^my-ExpressSync")
pulumi.export("cloudStorageGatewayExpressSyncId2", name_regex.syncs[0].id)
Copy
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 {
		ids, err := cloudstoragegateway.GetExpressSyncs(ctx, &cloudstoragegateway.GetExpressSyncsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudStorageGatewayExpressSyncId1", ids.Syncs[0].Id)
		nameRegex, err := cloudstoragegateway.GetExpressSyncs(ctx, &cloudstoragegateway.GetExpressSyncsArgs{
			NameRegex: pulumi.StringRef("^my-ExpressSync"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudStorageGatewayExpressSyncId2", nameRegex.Syncs[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.CloudStorageGateway.GetExpressSyncs.Invoke();

    var nameRegex = AliCloud.CloudStorageGateway.GetExpressSyncs.Invoke(new()
    {
        NameRegex = "^my-ExpressSync",
    });

    return new Dictionary<string, object?>
    {
        ["cloudStorageGatewayExpressSyncId1"] = ids.Apply(getExpressSyncsResult => getExpressSyncsResult.Syncs[0]?.Id),
        ["cloudStorageGatewayExpressSyncId2"] = nameRegex.Apply(getExpressSyncsResult => getExpressSyncsResult.Syncs[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudstoragegateway.CloudstoragegatewayFunctions;
import com.pulumi.alicloud.cloudstoragegateway.inputs.GetExpressSyncsArgs;
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 ids = CloudstoragegatewayFunctions.getExpressSyncs();

        ctx.export("cloudStorageGatewayExpressSyncId1", ids.applyValue(getExpressSyncsResult -> getExpressSyncsResult.syncs()[0].id()));
        final var nameRegex = CloudstoragegatewayFunctions.getExpressSyncs(GetExpressSyncsArgs.builder()
            .nameRegex("^my-ExpressSync")
            .build());

        ctx.export("cloudStorageGatewayExpressSyncId2", nameRegex.applyValue(getExpressSyncsResult -> getExpressSyncsResult.syncs()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:cloudstoragegateway:getExpressSyncs
      arguments: {}
  nameRegex:
    fn::invoke:
      function: alicloud:cloudstoragegateway:getExpressSyncs
      arguments:
        nameRegex: ^my-ExpressSync
outputs:
  cloudStorageGatewayExpressSyncId1: ${ids.syncs[0].id}
  cloudStorageGatewayExpressSyncId2: ${nameRegex.syncs[0].id}
Copy

Using getExpressSyncs

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 getExpressSyncs(args: GetExpressSyncsArgs, opts?: InvokeOptions): Promise<GetExpressSyncsResult>
function getExpressSyncsOutput(args: GetExpressSyncsOutputArgs, opts?: InvokeOptions): Output<GetExpressSyncsResult>
Copy
def get_express_syncs(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetExpressSyncsResult
def get_express_syncs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetExpressSyncsResult]
Copy
func GetExpressSyncs(ctx *Context, args *GetExpressSyncsArgs, opts ...InvokeOption) (*GetExpressSyncsResult, error)
func GetExpressSyncsOutput(ctx *Context, args *GetExpressSyncsOutputArgs, opts ...InvokeOption) GetExpressSyncsResultOutput
Copy

> Note: This function is named GetExpressSyncs in the Go SDK.

public static class GetExpressSyncs 
{
    public static Task<GetExpressSyncsResult> InvokeAsync(GetExpressSyncsArgs args, InvokeOptions? opts = null)
    public static Output<GetExpressSyncsResult> Invoke(GetExpressSyncsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetExpressSyncsResult> getExpressSyncs(GetExpressSyncsArgs args, InvokeOptions options)
public static Output<GetExpressSyncsResult> getExpressSyncs(GetExpressSyncsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cloudstoragegateway/getExpressSyncs:getExpressSyncs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Express Sync IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Express Sync name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Ids Changes to this property will trigger replacement. []string
A list of Express Sync IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Express Sync name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. List<String>
A list of Express Sync IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Express Sync name.
outputFile String
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. string[]
A list of Express Sync IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Express Sync name.
outputFile string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. Sequence[str]
A list of Express Sync IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Express Sync name.
output_file str
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. List<String>
A list of Express Sync IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Express Sync name.
outputFile String
File name where to save data source results (after running pulumi preview).

getExpressSyncs Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
Syncs List<Pulumi.AliCloud.CloudStorageGateway.Outputs.GetExpressSyncsSync>
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
Syncs []GetExpressSyncsSync
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
syncs List<GetExpressSyncsSync>
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
syncs GetExpressSyncsSync[]
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
syncs Sequence[GetExpressSyncsSync]
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
syncs List<Property Map>
nameRegex String
outputFile String

Supporting Types

GetExpressSyncsSync

BucketName This property is required. string
The name of the OSS Bucket.
BucketPrefix This property is required. string
The prefix of the OSS Bucket.
BucketRegion This property is required. string
The region of the OSS Bucket.
Description This property is required. string
The description of the Express Sync.
ExpressSyncId This property is required. string
The ID of the Express Sync.
ExpressSyncName This property is required. string
The name of the Express Sync.
Id This property is required. string
MnsTopic This property is required. string
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
BucketName This property is required. string
The name of the OSS Bucket.
BucketPrefix This property is required. string
The prefix of the OSS Bucket.
BucketRegion This property is required. string
The region of the OSS Bucket.
Description This property is required. string
The description of the Express Sync.
ExpressSyncId This property is required. string
The ID of the Express Sync.
ExpressSyncName This property is required. string
The name of the Express Sync.
Id This property is required. string
MnsTopic This property is required. string
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
bucketName This property is required. String
The name of the OSS Bucket.
bucketPrefix This property is required. String
The prefix of the OSS Bucket.
bucketRegion This property is required. String
The region of the OSS Bucket.
description This property is required. String
The description of the Express Sync.
expressSyncId This property is required. String
The ID of the Express Sync.
expressSyncName This property is required. String
The name of the Express Sync.
id This property is required. String
mnsTopic This property is required. String
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
bucketName This property is required. string
The name of the OSS Bucket.
bucketPrefix This property is required. string
The prefix of the OSS Bucket.
bucketRegion This property is required. string
The region of the OSS Bucket.
description This property is required. string
The description of the Express Sync.
expressSyncId This property is required. string
The ID of the Express Sync.
expressSyncName This property is required. string
The name of the Express Sync.
id This property is required. string
mnsTopic This property is required. string
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
bucket_name This property is required. str
The name of the OSS Bucket.
bucket_prefix This property is required. str
The prefix of the OSS Bucket.
bucket_region This property is required. str
The region of the OSS Bucket.
description This property is required. str
The description of the Express Sync.
express_sync_id This property is required. str
The ID of the Express Sync.
express_sync_name This property is required. str
The name of the Express Sync.
id This property is required. str
mns_topic This property is required. str
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
bucketName This property is required. String
The name of the OSS Bucket.
bucketPrefix This property is required. String
The prefix of the OSS Bucket.
bucketRegion This property is required. String
The region of the OSS Bucket.
description This property is required. String
The description of the Express Sync.
expressSyncId This property is required. String
The ID of the Express Sync.
expressSyncName This property is required. String
The name of the Express Sync.
id This property is required. String
mnsTopic This property is required. String
The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi