1. Packages
  2. RedisCloud
  3. API Docs
  4. getDataPersistence
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

rediscloud.getDataPersistence

Explore with Pulumi AI

rediscloud logo
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

    The data persistence data source allows access to a list of supported data persistence options.
    Each option represents the rate at which a database will persist its data to storage.

    Example Usage

    The following example returns all of the data persistence options available within your Redis Enterprise Cloud account.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rediscloud = Pulumi.Rediscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Rediscloud.GetDataPersistence.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["dataPersistenceOptions"] = example.Apply(getDataPersistenceResult => getDataPersistenceResult.DataPersistences),
        };
    });
    
    package main
    
    import (
    	"github.com/RedisLabs/pulumi-rediscloud/sdk/go/rediscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := rediscloud.GetDataPersistence(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("dataPersistenceOptions", example.DataPersistences)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rediscloud.RediscloudFunctions;
    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 = RediscloudFunctions.getDataPersistence();
    
            ctx.export("dataPersistenceOptions", example.applyValue(getDataPersistenceResult -> getDataPersistenceResult.dataPersistences()));
        }
    }
    
    import pulumi
    import pulumi_rediscloud as rediscloud
    
    example = rediscloud.get_data_persistence()
    pulumi.export("dataPersistenceOptions", example.data_persistences)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as rediscloud from "@pulumi/rediscloud";
    
    const example = rediscloud.getDataPersistence({});
    export const dataPersistenceOptions = example.then(example => example.dataPersistences);
    
    variables:
      example:
        fn::invoke:
          Function: rediscloud:getDataPersistence
          Arguments: {}
    outputs:
      dataPersistenceOptions: ${example.dataPersistences}
    

    Using getDataPersistence

    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 getDataPersistence(opts?: InvokeOptions): Promise<GetDataPersistenceResult>
    function getDataPersistenceOutput(opts?: InvokeOptions): Output<GetDataPersistenceResult>
    def get_data_persistence(opts: Optional[InvokeOptions] = None) -> GetDataPersistenceResult
    def get_data_persistence_output(opts: Optional[InvokeOptions] = None) -> Output[GetDataPersistenceResult]
    func GetDataPersistence(ctx *Context, opts ...InvokeOption) (*GetDataPersistenceResult, error)
    func GetDataPersistenceOutput(ctx *Context, opts ...InvokeOption) GetDataPersistenceResultOutput

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

    public static class GetDataPersistence 
    {
        public static Task<GetDataPersistenceResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetDataPersistenceResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDataPersistenceResult> getDataPersistence(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: rediscloud:index/getDataPersistence:getDataPersistence
      arguments:
        # arguments dictionary

    getDataPersistence Result

    The following output properties are available:

    DataPersistences List<RedisLabs.Rediscloud.Outputs.GetDataPersistenceDataPersistence>
    A list of data persistence option that can be applied to subscription databases
    Id string
    The provider-assigned unique ID for this managed resource.
    DataPersistences []GetDataPersistenceDataPersistence
    A list of data persistence option that can be applied to subscription databases
    Id string
    The provider-assigned unique ID for this managed resource.
    dataPersistences List<GetDataPersistenceDataPersistence>
    A list of data persistence option that can be applied to subscription databases
    id String
    The provider-assigned unique ID for this managed resource.
    dataPersistences GetDataPersistenceDataPersistence[]
    A list of data persistence option that can be applied to subscription databases
    id string
    The provider-assigned unique ID for this managed resource.
    data_persistences Sequence[GetDataPersistenceDataPersistence]
    A list of data persistence option that can be applied to subscription databases
    id str
    The provider-assigned unique ID for this managed resource.
    dataPersistences List<Property Map>
    A list of data persistence option that can be applied to subscription databases
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetDataPersistenceDataPersistence

    Description string
    A meaningful description of the data persistence option.
    Name string
    The identifier of the data persistence option.
    Description string
    A meaningful description of the data persistence option.
    Name string
    The identifier of the data persistence option.
    description String
    A meaningful description of the data persistence option.
    name String
    The identifier of the data persistence option.
    description string
    A meaningful description of the data persistence option.
    name string
    The identifier of the data persistence option.
    description str
    A meaningful description of the data persistence option.
    name str
    The identifier of the data persistence option.
    description String
    A meaningful description of the data persistence option.
    name String
    The identifier of the data persistence option.

    Package Details

    Repository
    rediscloud RedisLabs/pulumi-rediscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rediscloud Terraform Provider.
    rediscloud logo
    Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs