azure logo
Azure Classic v5.38.0, Mar 21 23

azure.redis.getEnterpriseDatabase

Use this data source to access information about an existing Redis Enterprise Database

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Redis.GetEnterpriseDatabase.Invoke(new()
    {
        Name = "default",
        ResourceGroupName = azurerm_resource_group.Example.Name,
        ClusterId = azurerm_redis_enterprise_cluster.Example.Id,
    });

    return new Dictionary<string, object?>
    {
        ["redisEnterpriseDatabasePrimaryKey"] = example.Apply(getEnterpriseDatabaseResult => getEnterpriseDatabaseResult.PrimaryAccessKey),
        ["redisEnterpriseDatabaseSecondaryKey"] = example.Apply(getEnterpriseDatabaseResult => getEnterpriseDatabaseResult.SecondaryAccessKey),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/redis"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := redis.LookupEnterpriseDatabase(ctx, &redis.LookupEnterpriseDatabaseArgs{
			Name:              "default",
			ResourceGroupName: pulumi.StringRef(azurerm_resource_group.Example.Name),
			ClusterId:         azurerm_redis_enterprise_cluster.Example.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("redisEnterpriseDatabasePrimaryKey", example.PrimaryAccessKey)
		ctx.Export("redisEnterpriseDatabaseSecondaryKey", example.SecondaryAccessKey)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.redis.RedisFunctions;
import com.pulumi.azure.redis.inputs.GetEnterpriseDatabaseArgs;
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 = RedisFunctions.getEnterpriseDatabase(GetEnterpriseDatabaseArgs.builder()
            .name("default")
            .resourceGroupName(azurerm_resource_group.example().name())
            .clusterId(azurerm_redis_enterprise_cluster.example().id())
            .build());

        ctx.export("redisEnterpriseDatabasePrimaryKey", example.applyValue(getEnterpriseDatabaseResult -> getEnterpriseDatabaseResult.primaryAccessKey()));
        ctx.export("redisEnterpriseDatabaseSecondaryKey", example.applyValue(getEnterpriseDatabaseResult -> getEnterpriseDatabaseResult.secondaryAccessKey()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.redis.get_enterprise_database(name="default",
    resource_group_name=azurerm_resource_group["example"]["name"],
    cluster_id=azurerm_redis_enterprise_cluster["example"]["id"])
pulumi.export("redisEnterpriseDatabasePrimaryKey", example.primary_access_key)
pulumi.export("redisEnterpriseDatabaseSecondaryKey", example.secondary_access_key)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.redis.getEnterpriseDatabase({
    name: "default",
    resourceGroupName: azurerm_resource_group.example.name,
    clusterId: azurerm_redis_enterprise_cluster.example.id,
});
export const redisEnterpriseDatabasePrimaryKey = example.then(example => example.primaryAccessKey);
export const redisEnterpriseDatabaseSecondaryKey = example.then(example => example.secondaryAccessKey);
variables:
  example:
    fn::invoke:
      Function: azure:redis:getEnterpriseDatabase
      Arguments:
        name: default
        resourceGroupName: ${azurerm_resource_group.example.name}
        clusterId: ${azurerm_redis_enterprise_cluster.example.id}
outputs:
  redisEnterpriseDatabasePrimaryKey: ${example.primaryAccessKey}
  redisEnterpriseDatabaseSecondaryKey: ${example.secondaryAccessKey}

Using getEnterpriseDatabase

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 getEnterpriseDatabase(args: GetEnterpriseDatabaseArgs, opts?: InvokeOptions): Promise<GetEnterpriseDatabaseResult>
function getEnterpriseDatabaseOutput(args: GetEnterpriseDatabaseOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseDatabaseResult>
def get_enterprise_database(cluster_id: Optional[str] = None,
                            name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetEnterpriseDatabaseResult
def get_enterprise_database_output(cluster_id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseDatabaseResult]
func LookupEnterpriseDatabase(ctx *Context, args *LookupEnterpriseDatabaseArgs, opts ...InvokeOption) (*LookupEnterpriseDatabaseResult, error)
func LookupEnterpriseDatabaseOutput(ctx *Context, args *LookupEnterpriseDatabaseOutputArgs, opts ...InvokeOption) LookupEnterpriseDatabaseResultOutput

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

public static class GetEnterpriseDatabase 
{
    public static Task<GetEnterpriseDatabaseResult> InvokeAsync(GetEnterpriseDatabaseArgs args, InvokeOptions? opts = null)
    public static Output<GetEnterpriseDatabaseResult> Invoke(GetEnterpriseDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEnterpriseDatabaseResult> getEnterpriseDatabase(GetEnterpriseDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:redis/getEnterpriseDatabase:getEnterpriseDatabase
  arguments:
    # arguments dictionary

The following arguments are supported:

ClusterId string

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

Name string

The name of the Redis Enterprise Database.

ResourceGroupName string

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

ClusterId string

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

Name string

The name of the Redis Enterprise Database.

ResourceGroupName string

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

clusterId String

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

name String

The name of the Redis Enterprise Database.

resourceGroupName String

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

clusterId string

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

name string

The name of the Redis Enterprise Database.

resourceGroupName string

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

cluster_id str

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

name str

The name of the Redis Enterprise Database.

resource_group_name str

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

clusterId String

The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance.

name String

The name of the Redis Enterprise Database.

resourceGroupName String

The name of the resource group the Redis Enterprise Database instance is located in.

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

getEnterpriseDatabase Result

The following output properties are available:

ClusterId string

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

Id string

The provider-assigned unique ID for this managed resource.

LinkedDatabaseGroupNickname string

The Linked Database Group Nickname for the Redis Enterprise Database instance.

LinkedDatabaseIds List<string>

The Linked Database list for the Redis Enterprise Database instance.

Name string

The Redis Enterprise Database name.

PrimaryAccessKey string

The Primary Access Key for the Redis Enterprise Database instance.

ResourceGroupName string

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

SecondaryAccessKey string

The Secondary Access Key for the Redis Enterprise Database instance.

ClusterId string

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

Id string

The provider-assigned unique ID for this managed resource.

LinkedDatabaseGroupNickname string

The Linked Database Group Nickname for the Redis Enterprise Database instance.

LinkedDatabaseIds []string

The Linked Database list for the Redis Enterprise Database instance.

Name string

The Redis Enterprise Database name.

PrimaryAccessKey string

The Primary Access Key for the Redis Enterprise Database instance.

ResourceGroupName string

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

SecondaryAccessKey string

The Secondary Access Key for the Redis Enterprise Database instance.

clusterId String

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

id String

The provider-assigned unique ID for this managed resource.

linkedDatabaseGroupNickname String

The Linked Database Group Nickname for the Redis Enterprise Database instance.

linkedDatabaseIds List<String>

The Linked Database list for the Redis Enterprise Database instance.

name String

The Redis Enterprise Database name.

primaryAccessKey String

The Primary Access Key for the Redis Enterprise Database instance.

resourceGroupName String

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

secondaryAccessKey String

The Secondary Access Key for the Redis Enterprise Database instance.

clusterId string

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

id string

The provider-assigned unique ID for this managed resource.

linkedDatabaseGroupNickname string

The Linked Database Group Nickname for the Redis Enterprise Database instance.

linkedDatabaseIds string[]

The Linked Database list for the Redis Enterprise Database instance.

name string

The Redis Enterprise Database name.

primaryAccessKey string

The Primary Access Key for the Redis Enterprise Database instance.

resourceGroupName string

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

secondaryAccessKey string

The Secondary Access Key for the Redis Enterprise Database instance.

cluster_id str

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

id str

The provider-assigned unique ID for this managed resource.

linked_database_group_nickname str

The Linked Database Group Nickname for the Redis Enterprise Database instance.

linked_database_ids Sequence[str]

The Linked Database list for the Redis Enterprise Database instance.

name str

The Redis Enterprise Database name.

primary_access_key str

The Primary Access Key for the Redis Enterprise Database instance.

resource_group_name str

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

secondary_access_key str

The Secondary Access Key for the Redis Enterprise Database instance.

clusterId String

The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database.

id String

The provider-assigned unique ID for this managed resource.

linkedDatabaseGroupNickname String

The Linked Database Group Nickname for the Redis Enterprise Database instance.

linkedDatabaseIds List<String>

The Linked Database list for the Redis Enterprise Database instance.

name String

The Redis Enterprise Database name.

primaryAccessKey String

The Primary Access Key for the Redis Enterprise Database instance.

resourceGroupName String

Deprecated:

This field is no longer used and will be removed in the next major version of the Azure Provider

secondaryAccessKey String

The Secondary Access Key for the Redis Enterprise Database instance.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.