Cache
Cache details. Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-08-01. Other available API versions: 2021-04-01-preview, 2021-08-01, 2021-12-01-preview, 2022-04-01-preview, 2022-08-01, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
ApiManagementCreateCache
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var cache = new AzureNative.ApiManagement.Cache("cache", new()
{
CacheId = "c1",
ConnectionString = "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False",
Description = "Redis cache instances in West India",
ResourceGroupName = "rg1",
ResourceId = "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1",
ServiceName = "apimService1",
UseFromLocation = "default",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewCache(ctx, "cache", &apimanagement.CacheArgs{
CacheId: pulumi.String("c1"),
ConnectionString: pulumi.String("apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False"),
Description: pulumi.String("Redis cache instances in West India"),
ResourceGroupName: pulumi.String("rg1"),
ResourceId: pulumi.String("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
ServiceName: pulumi.String("apimService1"),
UseFromLocation: pulumi.String("default"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.Cache;
import com.pulumi.azurenative.apimanagement.CacheArgs;
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) {
var cache = new Cache("cache", CacheArgs.builder()
.cacheId("c1")
.connectionString("apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False")
.description("Redis cache instances in West India")
.resourceGroupName("rg1")
.resourceId("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1")
.serviceName("apimService1")
.useFromLocation("default")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:Cache c1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}
Properties
The Azure API version of the resource.
Runtime connection string to cache
Cache description
Original uri of entity in external system cache points to
Location identifier to use cache from (should be either 'default' or valid Azure region identifier)