1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. getSlots
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.rds.getSlots

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:rds:getSlots
      arguments:
        dbInstanceId: example_value
outputs:
  firstRdsSlotsName: ${example.slots[0].slotName}
Copy

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>
Copy
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]
Copy
func GetSlots(ctx *Context, args *GetSlotsArgs, opts ...InvokeOption) (*GetSlotsResult, error)
func GetSlotsOutput(ctx *Context, args *GetSlotsOutputArgs, opts ...InvokeOption) GetSlotsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSlotsResult> getSlots(GetSlotsArgs args, InvokeOptions options)
public static Output<GetSlotsResult> getSlots(GetSlotsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:rds/getSlots:getSlots
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DbInstanceId
This property is required.
Changes to this property will trigger replacement.
string
The db instance id.
OutputFile string
File name where to save data source results (after running pulumi preview).
ResourceGroupId Changes to this property will trigger replacement. string
The resource group id.
DbInstanceId
This property is required.
Changes to this property will trigger replacement.
string
The db instance id.
OutputFile string
File name where to save data source results (after running pulumi preview).
ResourceGroupId Changes to this property will trigger replacement. string
The resource group id.
dbInstanceId
This property is required.
Changes to this property will trigger replacement.
String
The db instance id.
outputFile String
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. String
The resource group id.
dbInstanceId
This property is required.
Changes to this property will trigger replacement.
string
The db instance id.
outputFile string
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. string
The resource group id.
db_instance_id
This property is required.
Changes to this property will trigger replacement.
str
The db instance id.
output_file str
File name where to save data source results (after running pulumi preview).
resource_group_id Changes to this property will trigger replacement. str
The resource group id.
dbInstanceId
This property is required.
Changes to this property will trigger replacement.
String
The db instance id.
outputFile String
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. 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 This property is required. string
The name of the database where Replication Slot is located.
Plugin This property is required. string
The plugin used by Replication Slot.
SlotName This property is required. string
The Replication Slot name.
SlotStatus This property is required. string
The Replication Slot status.
SlotType This property is required. string
The Replication Slot type.
Temporary This property is required. string
Is the Replication Slot temporary.
WalDelay This property is required. string
The amount of logs accumulated by Replication Slot.
Database This property is required. string
The name of the database where Replication Slot is located.
Plugin This property is required. string
The plugin used by Replication Slot.
SlotName This property is required. string
The Replication Slot name.
SlotStatus This property is required. string
The Replication Slot status.
SlotType This property is required. string
The Replication Slot type.
Temporary This property is required. string
Is the Replication Slot temporary.
WalDelay This property is required. string
The amount of logs accumulated by Replication Slot.
database This property is required. String
The name of the database where Replication Slot is located.
plugin This property is required. String
The plugin used by Replication Slot.
slotName This property is required. String
The Replication Slot name.
slotStatus This property is required. String
The Replication Slot status.
slotType This property is required. String
The Replication Slot type.
temporary This property is required. String
Is the Replication Slot temporary.
walDelay This property is required. String
The amount of logs accumulated by Replication Slot.
database This property is required. string
The name of the database where Replication Slot is located.
plugin This property is required. string
The plugin used by Replication Slot.
slotName This property is required. string
The Replication Slot name.
slotStatus This property is required. string
The Replication Slot status.
slotType This property is required. string
The Replication Slot type.
temporary This property is required. string
Is the Replication Slot temporary.
walDelay This property is required. string
The amount of logs accumulated by Replication Slot.
database This property is required. str
The name of the database where Replication Slot is located.
plugin This property is required. str
The plugin used by Replication Slot.
slot_name This property is required. str
The Replication Slot name.
slot_status This property is required. str
The Replication Slot status.
slot_type This property is required. str
The Replication Slot type.
temporary This property is required. str
Is the Replication Slot temporary.
wal_delay This property is required. str
The amount of logs accumulated by Replication Slot.
database This property is required. String
The name of the database where Replication Slot is located.
plugin This property is required. String
The plugin used by Replication Slot.
slotName This property is required. String
The Replication Slot name.
slotStatus This property is required. String
The Replication Slot status.
slotType This property is required. String
The Replication Slot type.
temporary This property is required. String
Is the Replication Slot temporary.
walDelay This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi