Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi
alicloud.cloudmonitor.getServiceHybridDoubleWrites
This data source provides the Cloud Monitor Service Hybrid Double Writes of the current Alibaba Cloud user.
NOTE: Available since v1.220.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.getAccount({});
const source = new alicloud.cms.Namespace("source", {namespace: "your-source-namespace"});
const defaultNamespace = new alicloud.cms.Namespace("default", {namespace: "your-namespace"});
const defaultServiceHybridDoubleWrite = new alicloud.cloudmonitor.ServiceHybridDoubleWrite("default", {
sourceNamespace: source.id,
sourceUserId: _default.then(_default => _default.id),
namespace: defaultNamespace.id,
userId: _default.then(_default => _default.id),
});
const ids = alicloud.cloudmonitor.getServiceHybridDoubleWritesOutput({
ids: [defaultServiceHybridDoubleWrite.id],
});
export const cloudMonitorServiceHybridDoubleWritesId1 = ids.apply(ids => ids.hybridDoubleWrites?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.get_account()
source = alicloud.cms.Namespace("source", namespace="your-source-namespace")
default_namespace = alicloud.cms.Namespace("default", namespace="your-namespace")
default_service_hybrid_double_write = alicloud.cloudmonitor.ServiceHybridDoubleWrite("default",
source_namespace=source.id,
source_user_id=default.id,
namespace=default_namespace.id,
user_id=default.id)
ids = alicloud.cloudmonitor.get_service_hybrid_double_writes_output(ids=[default_service_hybrid_double_write.id])
pulumi.export("cloudMonitorServiceHybridDoubleWritesId1", ids.hybrid_double_writes[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudmonitor"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
source, err := cms.NewNamespace(ctx, "source", &cms.NamespaceArgs{
Namespace: pulumi.String("your-source-namespace"),
})
if err != nil {
return err
}
defaultNamespace, err := cms.NewNamespace(ctx, "default", &cms.NamespaceArgs{
Namespace: pulumi.String("your-namespace"),
})
if err != nil {
return err
}
defaultServiceHybridDoubleWrite, err := cloudmonitor.NewServiceHybridDoubleWrite(ctx, "default", &cloudmonitor.ServiceHybridDoubleWriteArgs{
SourceNamespace: source.ID(),
SourceUserId: pulumi.String(_default.Id),
Namespace: defaultNamespace.ID(),
UserId: pulumi.String(_default.Id),
})
if err != nil {
return err
}
ids := cloudmonitor.GetServiceHybridDoubleWritesOutput(ctx, cloudmonitor.GetServiceHybridDoubleWritesOutputArgs{
Ids: pulumi.StringArray{
defaultServiceHybridDoubleWrite.ID(),
},
}, nil)
ctx.Export("cloudMonitorServiceHybridDoubleWritesId1", ids.ApplyT(func(ids cloudmonitor.GetServiceHybridDoubleWritesResult) (*string, error) {
return &ids.HybridDoubleWrites[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 @default = AliCloud.GetAccount.Invoke();
var source = new AliCloud.Cms.Namespace("source", new()
{
NamespaceName = "your-source-namespace",
});
var defaultNamespace = new AliCloud.Cms.Namespace("default", new()
{
NamespaceName = "your-namespace",
});
var defaultServiceHybridDoubleWrite = new AliCloud.CloudMonitor.ServiceHybridDoubleWrite("default", new()
{
SourceNamespace = source.Id,
SourceUserId = @default.Apply(@default => @default.Apply(getAccountResult => getAccountResult.Id)),
Namespace = defaultNamespace.Id,
UserId = @default.Apply(@default => @default.Apply(getAccountResult => getAccountResult.Id)),
});
var ids = AliCloud.CloudMonitor.GetServiceHybridDoubleWrites.Invoke(new()
{
Ids = new[]
{
defaultServiceHybridDoubleWrite.Id,
},
});
return new Dictionary<string, object?>
{
["cloudMonitorServiceHybridDoubleWritesId1"] = ids.Apply(getServiceHybridDoubleWritesResult => getServiceHybridDoubleWritesResult.HybridDoubleWrites[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.cms.Namespace;
import com.pulumi.alicloud.cms.NamespaceArgs;
import com.pulumi.alicloud.cloudmonitor.ServiceHybridDoubleWrite;
import com.pulumi.alicloud.cloudmonitor.ServiceHybridDoubleWriteArgs;
import com.pulumi.alicloud.cloudmonitor.CloudmonitorFunctions;
import com.pulumi.alicloud.cloudmonitor.inputs.GetServiceHybridDoubleWritesArgs;
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 default = AlicloudFunctions.getAccount(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var source = new Namespace("source", NamespaceArgs.builder()
.namespace("your-source-namespace")
.build());
var defaultNamespace = new Namespace("defaultNamespace", NamespaceArgs.builder()
.namespace("your-namespace")
.build());
var defaultServiceHybridDoubleWrite = new ServiceHybridDoubleWrite("defaultServiceHybridDoubleWrite", ServiceHybridDoubleWriteArgs.builder()
.sourceNamespace(source.id())
.sourceUserId(default_.id())
.namespace(defaultNamespace.id())
.userId(default_.id())
.build());
final var ids = CloudmonitorFunctions.getServiceHybridDoubleWrites(GetServiceHybridDoubleWritesArgs.builder()
.ids(defaultServiceHybridDoubleWrite.id())
.build());
ctx.export("cloudMonitorServiceHybridDoubleWritesId1", ids.applyValue(_ids -> _ids.hybridDoubleWrites()[0].id()));
}
}
resources:
source:
type: alicloud:cms:Namespace
properties:
namespace: your-source-namespace
defaultNamespace:
type: alicloud:cms:Namespace
name: default
properties:
namespace: your-namespace
defaultServiceHybridDoubleWrite:
type: alicloud:cloudmonitor:ServiceHybridDoubleWrite
name: default
properties:
sourceNamespace: ${source.id}
sourceUserId: ${default.id}
namespace: ${defaultNamespace.id}
userId: ${default.id}
variables:
default:
fn::invoke:
function: alicloud:getAccount
arguments: {}
ids:
fn::invoke:
function: alicloud:cloudmonitor:getServiceHybridDoubleWrites
arguments:
ids:
- ${defaultServiceHybridDoubleWrite.id}
outputs:
cloudMonitorServiceHybridDoubleWritesId1: ${ids.hybridDoubleWrites[0].id}
Using getServiceHybridDoubleWrites
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 getServiceHybridDoubleWrites(args: GetServiceHybridDoubleWritesArgs, opts?: InvokeOptions): Promise<GetServiceHybridDoubleWritesResult>
function getServiceHybridDoubleWritesOutput(args: GetServiceHybridDoubleWritesOutputArgs, opts?: InvokeOptions): Output<GetServiceHybridDoubleWritesResult>def get_service_hybrid_double_writes(ids: Optional[Sequence[str]] = None,
namespace: Optional[str] = None,
output_file: Optional[str] = None,
source_namespace: Optional[str] = None,
source_user_id: Optional[str] = None,
user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceHybridDoubleWritesResult
def get_service_hybrid_double_writes_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
namespace: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
source_namespace: Optional[pulumi.Input[str]] = None,
source_user_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceHybridDoubleWritesResult]func GetServiceHybridDoubleWrites(ctx *Context, args *GetServiceHybridDoubleWritesArgs, opts ...InvokeOption) (*GetServiceHybridDoubleWritesResult, error)
func GetServiceHybridDoubleWritesOutput(ctx *Context, args *GetServiceHybridDoubleWritesOutputArgs, opts ...InvokeOption) GetServiceHybridDoubleWritesResultOutput> Note: This function is named GetServiceHybridDoubleWrites in the Go SDK.
public static class GetServiceHybridDoubleWrites
{
public static Task<GetServiceHybridDoubleWritesResult> InvokeAsync(GetServiceHybridDoubleWritesArgs args, InvokeOptions? opts = null)
public static Output<GetServiceHybridDoubleWritesResult> Invoke(GetServiceHybridDoubleWritesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceHybridDoubleWritesResult> getServiceHybridDoubleWrites(GetServiceHybridDoubleWritesArgs args, InvokeOptions options)
public static Output<GetServiceHybridDoubleWritesResult> getServiceHybridDoubleWrites(GetServiceHybridDoubleWritesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudmonitor/getServiceHybridDoubleWrites:getServiceHybridDoubleWrites
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Hybrid Double Write IDs.
- Namespace string
- Target Namespace.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- Ids []string
- A list of Hybrid Double Write IDs.
- Namespace string
- Target Namespace.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- ids List<String>
- A list of Hybrid Double Write IDs.
- namespace String
- Target Namespace.
- output
File String - File name where to save data source results (after running
pulumi preview). - source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
- ids string[]
- A list of Hybrid Double Write IDs.
- namespace string
- Target Namespace.
- output
File string - File name where to save data source results (after running
pulumi preview). - source
Namespace string - Source Namespace.
- source
User stringId - Source UserId.
- user
Id string - Target UserId.
- ids Sequence[str]
- A list of Hybrid Double Write IDs.
- namespace str
- Target Namespace.
- output_
file str - File name where to save data source results (after running
pulumi preview). - source_
namespace str - Source Namespace.
- source_
user_ strid - Source UserId.
- user_
id str - Target UserId.
- ids List<String>
- A list of Hybrid Double Write IDs.
- namespace String
- Target Namespace.
- output
File String - File name where to save data source results (after running
pulumi preview). - source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
getServiceHybridDoubleWrites Result
The following output properties are available:
- Hybrid
Double List<Pulumi.Writes Ali Cloud. Cloud Monitor. Outputs. Get Service Hybrid Double Writes Hybrid Double Write> - A list of Hybrid Double Writes. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Namespace string
- Target Namespace.
- Output
File string - Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- Hybrid
Double []GetWrites Service Hybrid Double Writes Hybrid Double Write - A list of Hybrid Double Writes. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Namespace string
- Target Namespace.
- Output
File string - Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- hybrid
Double List<GetWrites Service Hybrid Double Writes Hybrid Double Write> - A list of Hybrid Double Writes. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- namespace String
- Target Namespace.
- output
File String - source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
- hybrid
Double GetWrites Service Hybrid Double Writes Hybrid Double Write[] - A list of Hybrid Double Writes. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- namespace string
- Target Namespace.
- output
File string - source
Namespace string - Source Namespace.
- source
User stringId - Source UserId.
- user
Id string - Target UserId.
- hybrid_
double_ Sequence[Getwrites Service Hybrid Double Writes Hybrid Double Write] - A list of Hybrid Double Writes. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- namespace str
- Target Namespace.
- output_
file str - source_
namespace str - Source Namespace.
- source_
user_ strid - Source UserId.
- user_
id str - Target UserId.
- hybrid
Double List<Property Map>Writes - A list of Hybrid Double Writes. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- namespace String
- Target Namespace.
- output
File String - source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
Supporting Types
GetServiceHybridDoubleWritesHybridDoubleWrite
- Id string
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - Namespace string
- Target Namespace.
- Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- Id string
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - Namespace string
- Target Namespace.
- Source
Namespace string - Source Namespace.
- Source
User stringId - Source UserId.
- User
Id string - Target UserId.
- id String
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - namespace String
- Target Namespace.
- source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
- id string
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - namespace string
- Target Namespace.
- source
Namespace string - Source Namespace.
- source
User stringId - Source UserId.
- user
Id string - Target UserId.
- id str
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - namespace str
- Target Namespace.
- source_
namespace str - Source Namespace.
- source_
user_ strid - Source UserId.
- user_
id str - Target UserId.
- id String
- The ID of the Hybrid Double Write. It formats as
<source_namespace>:<source_user_id>. - namespace String
- Target Namespace.
- source
Namespace String - Source Namespace.
- source
User StringId - Source UserId.
- user
Id String - Target UserId.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
