get Cache
Use this data source to access information about an existing Redis Cache
Example Usage
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.GetCacheArgs;
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.getCache(GetCacheArgs.builder()
.name("myrediscache")
.resourceGroupName("redis-cache")
.build());
ctx.export("primaryAccessKey", example.applyValue(getCacheResult -> getCacheResult.primaryAccessKey()));
ctx.export("hostname", example.applyValue(getCacheResult -> getCacheResult.hostname()));
}
}
Content copied to clipboard
Return
A collection of values returned by getCache.
Parameters
argument
A collection of arguments for invoking getCache.
Return
A collection of values returned by getCache.
See also
Parameters
name
The name of the Redis cache
resource Group Name
The name of the resource group the Redis cache instance is located in.
Return
A collection of values returned by getCache.
See also
Parameters
argument
Builder for com.pulumi.azure.redis.kotlin.inputs.GetCachePlainArgs.