1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. getSlots
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.rds.getSlots

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Rds Replication Slots of the current Alibaba Cloud user.

    NOTE: Available since v1.204.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.rds.getSlots({
        dbInstanceId: "example_value",
    });
    export const firstRdsSlotsName = example.then(example => example.slots?.[0]?.slotName);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.rds.get_slots(db_instance_id="example_value")
    pulumi.export("firstRdsSlotsName", example.slots[0].slot_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := rds.GetSlots(ctx, &rds.GetSlotsArgs{
    			DbInstanceId: "example_value",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstRdsSlotsName", example.Slots[0].SlotName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Rds.GetSlots.Invoke(new()
        {
            DbInstanceId = "example_value",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstRdsSlotsName"] = example.Apply(getSlotsResult => getSlotsResult.Slots[0]?.SlotName),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetSlotsArgs;
    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 example = RdsFunctions.getSlots(GetSlotsArgs.builder()
                .dbInstanceId("example_value")
                .build());
    
            ctx.export("firstRdsSlotsName", example.applyValue(getSlotsResult -> getSlotsResult.slots()[0].slotName()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:rds:getSlots
          Arguments:
            dbInstanceId: example_value
    outputs:
      firstRdsSlotsName: ${example.slots[0].slotName}
    

    Using getSlots

    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 getSlots(args: GetSlotsArgs, opts?: InvokeOptions): Promise<GetSlotsResult>
    function getSlotsOutput(args: GetSlotsOutputArgs, opts?: InvokeOptions): Output<GetSlotsResult>
    def get_slots(db_instance_id: Optional[str] = None,
                  output_file: Optional[str] = None,
                  resource_group_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSlotsResult
    def get_slots_output(db_instance_id: Optional[pulumi.Input[str]] = None,
                  output_file: Optional[pulumi.Input[str]] = None,
                  resource_group_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetSlotsResult]
    func GetSlots(ctx *Context, args *GetSlotsArgs, opts ...InvokeOption) (*GetSlotsResult, error)
    func GetSlotsOutput(ctx *Context, args *GetSlotsOutputArgs, opts ...InvokeOption) GetSlotsResultOutput

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

    public static class GetSlots 
    {
        public static Task<GetSlotsResult> InvokeAsync(GetSlotsArgs args, InvokeOptions? opts = null)
        public static Output<GetSlotsResult> Invoke(GetSlotsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSlotsResult> getSlots(GetSlotsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:rds/getSlots:getSlots
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DbInstanceId string
    The db instance id.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The resource group id.
    DbInstanceId string
    The db instance id.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The resource group id.
    dbInstanceId String
    The db instance id.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The resource group id.
    dbInstanceId string
    The db instance id.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    resourceGroupId string
    The resource group id.
    db_instance_id str
    The db instance id.
    output_file str
    File name where to save data source results (after running pulumi preview).
    resource_group_id str
    The resource group id.
    dbInstanceId String
    The db instance id.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The resource group id.

    getSlots Result

    The following output properties are available:

    DbInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Slots List<Pulumi.AliCloud.Rds.Outputs.GetSlotsSlot>
    A list of Rds Replication Slots. Each element contains the following attributes:
    OutputFile string
    ResourceGroupId string
    DbInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Slots []GetSlotsSlot
    A list of Rds Replication Slots. Each element contains the following attributes:
    OutputFile string
    ResourceGroupId string
    dbInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    slots List<GetSlotsSlot>
    A list of Rds Replication Slots. Each element contains the following attributes:
    outputFile String
    resourceGroupId String
    dbInstanceId string
    id string
    The provider-assigned unique ID for this managed resource.
    slots GetSlotsSlot[]
    A list of Rds Replication Slots. Each element contains the following attributes:
    outputFile string
    resourceGroupId string
    db_instance_id str
    id str
    The provider-assigned unique ID for this managed resource.
    slots Sequence[GetSlotsSlot]
    A list of Rds Replication Slots. Each element contains the following attributes:
    output_file str
    resource_group_id str
    dbInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    slots List<Property Map>
    A list of Rds Replication Slots. Each element contains the following attributes:
    outputFile String
    resourceGroupId String

    Supporting Types

    GetSlotsSlot

    Database string
    The name of the database where Replication Slot is located.
    Plugin string
    The plugin used by Replication Slot.
    SlotName string
    The Replication Slot name.
    SlotStatus string
    The Replication Slot status.
    SlotType string
    The Replication Slot type.
    Temporary string
    Is the Replication Slot temporary.
    WalDelay string
    The amount of logs accumulated by Replication Slot.
    Database string
    The name of the database where Replication Slot is located.
    Plugin string
    The plugin used by Replication Slot.
    SlotName string
    The Replication Slot name.
    SlotStatus string
    The Replication Slot status.
    SlotType string
    The Replication Slot type.
    Temporary string
    Is the Replication Slot temporary.
    WalDelay string
    The amount of logs accumulated by Replication Slot.
    database String
    The name of the database where Replication Slot is located.
    plugin String
    The plugin used by Replication Slot.
    slotName String
    The Replication Slot name.
    slotStatus String
    The Replication Slot status.
    slotType String
    The Replication Slot type.
    temporary String
    Is the Replication Slot temporary.
    walDelay String
    The amount of logs accumulated by Replication Slot.
    database string
    The name of the database where Replication Slot is located.
    plugin string
    The plugin used by Replication Slot.
    slotName string
    The Replication Slot name.
    slotStatus string
    The Replication Slot status.
    slotType string
    The Replication Slot type.
    temporary string
    Is the Replication Slot temporary.
    walDelay string
    The amount of logs accumulated by Replication Slot.
    database str
    The name of the database where Replication Slot is located.
    plugin str
    The plugin used by Replication Slot.
    slot_name str
    The Replication Slot name.
    slot_status str
    The Replication Slot status.
    slot_type str
    The Replication Slot type.
    temporary str
    Is the Replication Slot temporary.
    wal_delay str
    The amount of logs accumulated by Replication Slot.
    database String
    The name of the database where Replication Slot is located.
    plugin String
    The plugin used by Replication Slot.
    slotName String
    The Replication Slot name.
    slotStatus String
    The Replication Slot status.
    slotType String
    The Replication Slot type.
    temporary String
    Is the Replication Slot temporary.
    walDelay String
    The amount of logs accumulated by Replication Slot.

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi