Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.rds.getSlots
Explore with Pulumi AI
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)
public static Output<GetSlotsResult> getSlots(GetSlotsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:rds/getSlots:getSlots
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DbInstance stringId 
- The db instance id.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The resource group id.
- DbInstance stringId 
- The db instance id.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The resource group id.
- dbInstance StringId 
- The db instance id.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The resource group id.
- dbInstance stringId 
- The db instance id.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- resourceGroup stringId 
- The resource group id.
- db_instance_ strid 
- The db instance id.
- output_file str
- File name where to save data source results (after running pulumi preview).
- resource_group_ strid 
- The resource group id.
- dbInstance StringId 
- The db instance id.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The resource group id.
getSlots Result
The following output properties are available:
- DbInstance stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Slots
List<Pulumi.Ali Cloud. Rds. Outputs. Get Slots Slot> 
- A list of Rds Replication Slots. Each element contains the following attributes:
- OutputFile string
- ResourceGroup stringId 
- DbInstance stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Slots
[]GetSlots Slot 
- A list of Rds Replication Slots. Each element contains the following attributes:
- OutputFile string
- ResourceGroup stringId 
- dbInstance StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- slots
List<GetSlots Slot> 
- A list of Rds Replication Slots. Each element contains the following attributes:
- outputFile String
- resourceGroup StringId 
- dbInstance stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- slots
GetSlots Slot[] 
- A list of Rds Replication Slots. Each element contains the following attributes:
- outputFile string
- resourceGroup stringId 
- db_instance_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- slots
Sequence[GetSlots Slot] 
- A list of Rds Replication Slots. Each element contains the following attributes:
- output_file str
- resource_group_ strid 
- dbInstance StringId 
- 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
- resourceGroup StringId 
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 alicloudTerraform Provider.