alicloud.cloudstoragegateway.getExpressSyncs
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
using System.Collections.Generic;
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 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, nil, 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
})
}
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()));
}
}
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)
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);
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cloudstoragegateway/getExpressSyncs:getExpressSyncs
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Express Sync IDs.
- Name
Regex string A regex string to filter results by Express Sync name.
- Output
File string
- Ids []string
A list of Express Sync IDs.
- Name
Regex string A regex string to filter results by Express Sync name.
- Output
File string
- ids List<String>
A list of Express Sync IDs.
- name
Regex String A regex string to filter results by Express Sync name.
- output
File String
- ids string[]
A list of Express Sync IDs.
- name
Regex string A regex string to filter results by Express Sync name.
- output
File string
- ids Sequence[str]
A list of Express Sync IDs.
- name_
regex str A regex string to filter results by Express Sync name.
- output_
file str
- ids List<String>
A list of Express Sync IDs.
- name
Regex String A regex string to filter results by Express Sync name.
- output
File String
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 string The name of the OSS Bucket.
- Bucket
Prefix string The prefix of the OSS Bucket.
- Bucket
Region string The region of the OSS Bucket.
- Description string
The description of the Express Sync.
- Express
Sync stringId The ID of the Express Sync.
- Express
Sync stringName The name of the Express Sync.
- Id string
- Mns
Topic string The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
- Bucket
Name string The name of the OSS Bucket.
- Bucket
Prefix string The prefix of the OSS Bucket.
- Bucket
Region string The region of the OSS Bucket.
- Description string
The description of the Express Sync.
- Express
Sync stringId The ID of the Express Sync.
- Express
Sync stringName The name of the Express Sync.
- Id string
- Mns
Topic string The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
- bucket
Name String The name of the OSS Bucket.
- bucket
Prefix String The prefix of the OSS Bucket.
- bucket
Region String The region of the OSS Bucket.
- description String
The description of the Express Sync.
- express
Sync StringId The ID of the Express Sync.
- express
Sync StringName The name of the Express Sync.
- id String
- mns
Topic String The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
- bucket
Name string The name of the OSS Bucket.
- bucket
Prefix string The prefix of the OSS Bucket.
- bucket
Region string The region of the OSS Bucket.
- description string
The description of the Express Sync.
- express
Sync stringId The ID of the Express Sync.
- express
Sync stringName The name of the Express Sync.
- id string
- mns
Topic string The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
- bucket_
name str The name of the OSS Bucket.
- bucket_
prefix str The prefix of the OSS Bucket.
- bucket_
region str The region of the OSS Bucket.
- description str
The description of the Express Sync.
- express_
sync_ strid The ID of the Express Sync.
- express_
sync_ strname The name of the Express Sync.
- id str
- mns_
topic str The name of the message topic (Topic) corresponding to the Express Sync in the Alibaba Cloud Message Service MNS.
- bucket
Name String The name of the OSS Bucket.
- bucket
Prefix String The prefix of the OSS Bucket.
- bucket
Region String The region of the OSS Bucket.
- description String
The description of the Express Sync.
- express
Sync StringId The ID of the Express Sync.
- express
Sync StringName The name of the Express Sync.
- id String
- mns
Topic 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.