Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.cloudstoragegateway.getExpressSyncs
Explore with Pulumi AI
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);
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)
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
})
}
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),
};
});
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()));
}
}
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}
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>
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]
func GetExpressSyncs(ctx *Context, args *GetExpressSyncsArgs, opts ...InvokeOption) (*GetExpressSyncsResult, error)
func GetExpressSyncsOutput(ctx *Context, args *GetExpressSyncsOutputArgs, opts ...InvokeOption) GetExpressSyncsResultOutput
> 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)
}
public static CompletableFuture<GetExpressSyncsResult> getExpressSyncs(GetExpressSyncsArgs args, InvokeOptions options)
public static Output<GetExpressSyncsResult> getExpressSyncs(GetExpressSyncsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudstoragegateway/getExpressSyncs:getExpressSyncs
arguments:
# arguments dictionary
The following arguments are supported:
- Ids
Changes to this property will trigger replacement.
- A list of Express Sync IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Express Sync name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids
Changes to this property will trigger replacement.
- A list of Express Sync IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Express Sync name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Express Sync IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Express Sync name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Express Sync IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Express Sync name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Express Sync IDs.
- name_
regex Changes to this property will trigger replacement.
- 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.
- A list of Express Sync IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Express Sync name.
- output
File 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.
Ali Cloud. Cloud Storage Gateway. Outputs. Get Express Syncs Sync> - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Syncs
[]Get
Express Syncs Sync - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- syncs
List<Get
Express Syncs Sync> - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- syncs
Get
Express Syncs Sync[] - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- syncs
Sequence[Get
Express Syncs Sync] - 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>
- name
Regex String - output
File String
Supporting Types
GetExpressSyncsSync
- Bucket
Name This property is required. string - The name of the OSS Bucket.
- Bucket
Prefix This property is required. string - The prefix of the OSS Bucket.
- Bucket
Region This property is required. string - The region of the OSS Bucket.
- Description
This property is required. string - The description of the Express Sync.
- Express
Sync Id This property is required. string - The ID of the Express Sync.
- Express
Sync Name This property is required. string - The name of the Express Sync.
- Id
This property is required. string - Mns
Topic 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. string - The name of the OSS Bucket.
- Bucket
Prefix This property is required. string - The prefix of the OSS Bucket.
- Bucket
Region This property is required. string - The region of the OSS Bucket.
- Description
This property is required. string - The description of the Express Sync.
- Express
Sync Id This property is required. string - The ID of the Express Sync.
- Express
Sync Name This property is required. string - The name of the Express Sync.
- Id
This property is required. string - Mns
Topic 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. String - The name of the OSS Bucket.
- bucket
Prefix This property is required. String - The prefix of the OSS Bucket.
- bucket
Region This property is required. String - The region of the OSS Bucket.
- description
This property is required. String - The description of the Express Sync.
- express
Sync Id This property is required. String - The ID of the Express Sync.
- express
Sync Name This property is required. String - The name of the Express Sync.
- id
This property is required. String - mns
Topic 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. string - The name of the OSS Bucket.
- bucket
Prefix This property is required. string - The prefix of the OSS Bucket.
- bucket
Region This property is required. string - The region of the OSS Bucket.
- description
This property is required. string - The description of the Express Sync.
- express
Sync Id This property is required. string - The ID of the Express Sync.
- express
Sync Name This property is required. string - The name of the Express Sync.
- id
This property is required. string - mns
Topic 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.
- bucket
Name This property is required. String - The name of the OSS Bucket.
- bucket
Prefix This property is required. String - The prefix of the OSS Bucket.
- bucket
Region This property is required. String - The region of the OSS Bucket.
- description
This property is required. String - The description of the Express Sync.
- express
Sync Id This property is required. String - The ID of the Express Sync.
- express
Sync Name This property is required. String - The name of the Express Sync.
- id
This property is required. String - mns
Topic 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.