1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ebs
  5. getDiskReplicaGroups
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.ebs.getDiskReplicaGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source provides the Ebs Disk Replica Groups of the current Alibaba Cloud user.

    NOTE: Available in v1.187.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.ebs.getDiskReplicaGroups({
        ids: ["example_id"],
    });
    export const ebsDiskReplicaGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.ebs.get_disk_replica_groups(ids=["example_id"])
    pulumi.export("ebsDiskReplicaGroupId1", ids.groups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ebs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := ebs.GetDiskReplicaGroups(ctx, &ebs.GetDiskReplicaGroupsArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ebsDiskReplicaGroupId1", ids.Groups[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Ebs.GetDiskReplicaGroups.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["ebsDiskReplicaGroupId1"] = ids.Apply(getDiskReplicaGroupsResult => getDiskReplicaGroupsResult.Groups[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ebs.EbsFunctions;
    import com.pulumi.alicloud.ebs.inputs.GetDiskReplicaGroupsArgs;
    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 = EbsFunctions.getDiskReplicaGroups(GetDiskReplicaGroupsArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("ebsDiskReplicaGroupId1", ids.applyValue(getDiskReplicaGroupsResult -> getDiskReplicaGroupsResult.groups()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:ebs:getDiskReplicaGroups
          Arguments:
            ids:
              - example_id
    outputs:
      ebsDiskReplicaGroupId1: ${ids.groups[0].id}
    

    Using getDiskReplicaGroups

    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 getDiskReplicaGroups(args: GetDiskReplicaGroupsArgs, opts?: InvokeOptions): Promise<GetDiskReplicaGroupsResult>
    function getDiskReplicaGroupsOutput(args: GetDiskReplicaGroupsOutputArgs, opts?: InvokeOptions): Output<GetDiskReplicaGroupsResult>
    def get_disk_replica_groups(ids: Optional[Sequence[str]] = None,
                                output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDiskReplicaGroupsResult
    def get_disk_replica_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetDiskReplicaGroupsResult]
    func GetDiskReplicaGroups(ctx *Context, args *GetDiskReplicaGroupsArgs, opts ...InvokeOption) (*GetDiskReplicaGroupsResult, error)
    func GetDiskReplicaGroupsOutput(ctx *Context, args *GetDiskReplicaGroupsOutputArgs, opts ...InvokeOption) GetDiskReplicaGroupsResultOutput

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

    public static class GetDiskReplicaGroups 
    {
        public static Task<GetDiskReplicaGroupsResult> InvokeAsync(GetDiskReplicaGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetDiskReplicaGroupsResult> Invoke(GetDiskReplicaGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiskReplicaGroupsResult> getDiskReplicaGroups(GetDiskReplicaGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ebs/getDiskReplicaGroups:getDiskReplicaGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Disk Replica Group IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Disk Replica Group IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Disk Replica Group IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Disk Replica Group IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Disk Replica Group IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Disk Replica Group IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getDiskReplicaGroups Result

    The following output properties are available:

    Groups List<Pulumi.AliCloud.Ebs.Outputs.GetDiskReplicaGroupsGroup>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    Groups []GetDiskReplicaGroupsGroup
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    groups List<GetDiskReplicaGroupsGroup>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    groups GetDiskReplicaGroupsGroup[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    groups Sequence[GetDiskReplicaGroupsGroup]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    groups List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String

    Supporting Types

    GetDiskReplicaGroupsGroup

    Description string
    The description of the consistent replication group.
    DestinationRegionId string
    The ID of the region to which the disaster recovery site belongs.
    DestinationZoneId string
    The ID of the zone to which the disaster recovery site belongs.
    GroupName string
    Consistent replication group name.
    Id string
    The ID of the Disk Replica Group.
    LastRecoverPoint string
    PrimaryRegion string
    The initial source region of the replication group.
    PrimaryZone string
    The initial source available area of the replication group.
    ReplicaGroupId string
    The ID of the consistent replication group.
    Rpo int
    The recovery point objective (RPO) of the replication pair-consistent group.
    Site string
    Site information sources for replication pairs and consistent replication groups.
    SourceRegionId string
    The ID of the region to which the production site belongs.
    SourceZoneId string
    The ID of the zone to which the production site belongs.
    StandbyRegion string
    The initial destination region of the replication group.
    StandbyZone string
    The initial destination zone of the replication group.
    Status string
    The status of the consistent replication group. Possible values:
    Description string
    The description of the consistent replication group.
    DestinationRegionId string
    The ID of the region to which the disaster recovery site belongs.
    DestinationZoneId string
    The ID of the zone to which the disaster recovery site belongs.
    GroupName string
    Consistent replication group name.
    Id string
    The ID of the Disk Replica Group.
    LastRecoverPoint string
    PrimaryRegion string
    The initial source region of the replication group.
    PrimaryZone string
    The initial source available area of the replication group.
    ReplicaGroupId string
    The ID of the consistent replication group.
    Rpo int
    The recovery point objective (RPO) of the replication pair-consistent group.
    Site string
    Site information sources for replication pairs and consistent replication groups.
    SourceRegionId string
    The ID of the region to which the production site belongs.
    SourceZoneId string
    The ID of the zone to which the production site belongs.
    StandbyRegion string
    The initial destination region of the replication group.
    StandbyZone string
    The initial destination zone of the replication group.
    Status string
    The status of the consistent replication group. Possible values:
    description String
    The description of the consistent replication group.
    destinationRegionId String
    The ID of the region to which the disaster recovery site belongs.
    destinationZoneId String
    The ID of the zone to which the disaster recovery site belongs.
    groupName String
    Consistent replication group name.
    id String
    The ID of the Disk Replica Group.
    lastRecoverPoint String
    primaryRegion String
    The initial source region of the replication group.
    primaryZone String
    The initial source available area of the replication group.
    replicaGroupId String
    The ID of the consistent replication group.
    rpo Integer
    The recovery point objective (RPO) of the replication pair-consistent group.
    site String
    Site information sources for replication pairs and consistent replication groups.
    sourceRegionId String
    The ID of the region to which the production site belongs.
    sourceZoneId String
    The ID of the zone to which the production site belongs.
    standbyRegion String
    The initial destination region of the replication group.
    standbyZone String
    The initial destination zone of the replication group.
    status String
    The status of the consistent replication group. Possible values:
    description string
    The description of the consistent replication group.
    destinationRegionId string
    The ID of the region to which the disaster recovery site belongs.
    destinationZoneId string
    The ID of the zone to which the disaster recovery site belongs.
    groupName string
    Consistent replication group name.
    id string
    The ID of the Disk Replica Group.
    lastRecoverPoint string
    primaryRegion string
    The initial source region of the replication group.
    primaryZone string
    The initial source available area of the replication group.
    replicaGroupId string
    The ID of the consistent replication group.
    rpo number
    The recovery point objective (RPO) of the replication pair-consistent group.
    site string
    Site information sources for replication pairs and consistent replication groups.
    sourceRegionId string
    The ID of the region to which the production site belongs.
    sourceZoneId string
    The ID of the zone to which the production site belongs.
    standbyRegion string
    The initial destination region of the replication group.
    standbyZone string
    The initial destination zone of the replication group.
    status string
    The status of the consistent replication group. Possible values:
    description str
    The description of the consistent replication group.
    destination_region_id str
    The ID of the region to which the disaster recovery site belongs.
    destination_zone_id str
    The ID of the zone to which the disaster recovery site belongs.
    group_name str
    Consistent replication group name.
    id str
    The ID of the Disk Replica Group.
    last_recover_point str
    primary_region str
    The initial source region of the replication group.
    primary_zone str
    The initial source available area of the replication group.
    replica_group_id str
    The ID of the consistent replication group.
    rpo int
    The recovery point objective (RPO) of the replication pair-consistent group.
    site str
    Site information sources for replication pairs and consistent replication groups.
    source_region_id str
    The ID of the region to which the production site belongs.
    source_zone_id str
    The ID of the zone to which the production site belongs.
    standby_region str
    The initial destination region of the replication group.
    standby_zone str
    The initial destination zone of the replication group.
    status str
    The status of the consistent replication group. Possible values:
    description String
    The description of the consistent replication group.
    destinationRegionId String
    The ID of the region to which the disaster recovery site belongs.
    destinationZoneId String
    The ID of the zone to which the disaster recovery site belongs.
    groupName String
    Consistent replication group name.
    id String
    The ID of the Disk Replica Group.
    lastRecoverPoint String
    primaryRegion String
    The initial source region of the replication group.
    primaryZone String
    The initial source available area of the replication group.
    replicaGroupId String
    The ID of the consistent replication group.
    rpo Number
    The recovery point objective (RPO) of the replication pair-consistent group.
    site String
    Site information sources for replication pairs and consistent replication groups.
    sourceRegionId String
    The ID of the region to which the production site belongs.
    sourceZoneId String
    The ID of the zone to which the production site belongs.
    standbyRegion String
    The initial destination region of the replication group.
    standbyZone String
    The initial destination zone of the replication group.
    status String
    The status of the consistent replication group. Possible values:

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi