Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:rds/getSlots:getSlots
arguments:
# arguments dictionary
The following arguments are supported:
- Db
Instance stringId - The db instance id.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group stringId - The resource group id.
- Db
Instance stringId - The db instance id.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group stringId - The resource group id.
- db
Instance StringId - The db instance id.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group StringId - The resource group id.
- db
Instance stringId - The db instance id.
- output
File string - File name where to save data source results (after running
pulumi preview
). - resource
Group 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.
- db
Instance StringId - The db instance id.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group StringId - The resource group id.
getSlots Result
The following output properties are available:
- Db
Instance 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:
- Output
File string - Resource
Group stringId
- Db
Instance stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Slots
[]Get
Slots Slot - A list of Rds Replication Slots. Each element contains the following attributes:
- Output
File string - Resource
Group stringId
- db
Instance StringId - id String
- The provider-assigned unique ID for this managed resource.
- slots
List<Get
Slots Slot> - A list of Rds Replication Slots. Each element contains the following attributes:
- output
File String - resource
Group StringId
- db
Instance stringId - id string
- The provider-assigned unique ID for this managed resource.
- slots
Get
Slots Slot[] - A list of Rds Replication Slots. Each element contains the following attributes:
- output
File string - resource
Group stringId
- db_
instance_ strid - id str
- The provider-assigned unique ID for this managed resource.
- slots
Sequence[Get
Slots Slot] - A list of Rds Replication Slots. Each element contains the following attributes:
- output_
file str - resource_
group_ strid
- db
Instance 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:
- output
File String - resource
Group StringId
Supporting Types
GetSlotsSlot
- Database string
- The name of the database where Replication Slot is located.
- Plugin string
- The plugin used by Replication Slot.
- Slot
Name string - The Replication Slot name.
- Slot
Status string - The Replication Slot status.
- Slot
Type string - The Replication Slot type.
- Temporary string
- Is the Replication Slot temporary.
- Wal
Delay 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.
- Slot
Name string - The Replication Slot name.
- Slot
Status string - The Replication Slot status.
- Slot
Type string - The Replication Slot type.
- Temporary string
- Is the Replication Slot temporary.
- Wal
Delay 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.
- slot
Name String - The Replication Slot name.
- slot
Status String - The Replication Slot status.
- slot
Type String - The Replication Slot type.
- temporary String
- Is the Replication Slot temporary.
- wal
Delay 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.
- slot
Name string - The Replication Slot name.
- slot
Status string - The Replication Slot status.
- slot
Type string - The Replication Slot type.
- temporary string
- Is the Replication Slot temporary.
- wal
Delay 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.
- slot
Name String - The Replication Slot name.
- slot
Status String - The Replication Slot status.
- slot
Type String - The Replication Slot type.
- temporary String
- Is the Replication Slot temporary.
- wal
Delay 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.