![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.apimanagement.kotlin.CacheArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.azurenative.apimanagement.CacheArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Cache details.
* Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2019-12-01-preview, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateCache
* ```csharp
* 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",
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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.
* ```sh
* $ pulumi import azure-native:apimanagement:Cache c1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}
* ```
* @property cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
* @property connectionString Runtime connection string to cache
* @property description Cache description
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property resourceId Original uri of entity in external system cache points to
* @property serviceName The name of the API Management service.
* @property useFromLocation Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
*/
public data class CacheArgs(
public val cacheId: Output? = null,
public val connectionString: Output? = null,
public val description: Output? = null,
public val resourceGroupName: Output? = null,
public val resourceId: Output? = null,
public val serviceName: Output? = null,
public val useFromLocation: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apimanagement.CacheArgs =
com.pulumi.azurenative.apimanagement.CacheArgs.builder()
.cacheId(cacheId?.applyValue({ args0 -> args0 }))
.connectionString(connectionString?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.resourceId(resourceId?.applyValue({ args0 -> args0 }))
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.useFromLocation(useFromLocation?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CacheArgs].
*/
@PulumiTagMarker
public class CacheArgsBuilder internal constructor() {
private var cacheId: Output? = null
private var connectionString: Output? = null
private var description: Output? = null
private var resourceGroupName: Output? = null
private var resourceId: Output? = null
private var serviceName: Output? = null
private var useFromLocation: Output? = null
/**
* @param value Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
*/
@JvmName("drlblficieqifwqs")
public suspend fun cacheId(`value`: Output) {
this.cacheId = value
}
/**
* @param value Runtime connection string to cache
*/
@JvmName("qydsbrdiipdnghuf")
public suspend fun connectionString(`value`: Output) {
this.connectionString = value
}
/**
* @param value Cache description
*/
@JvmName("mrsoysttgrxifabj")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ueugjqfcomsqrkux")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Original uri of entity in external system cache points to
*/
@JvmName("kebkntvjuemtvbbq")
public suspend fun resourceId(`value`: Output) {
this.resourceId = value
}
/**
* @param value The name of the API Management service.
*/
@JvmName("jdbfufxyqhyapofe")
public suspend fun serviceName(`value`: Output) {
this.serviceName = value
}
/**
* @param value Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
*/
@JvmName("woiffubnnrsgcfxm")
public suspend fun useFromLocation(`value`: Output) {
this.useFromLocation = value
}
/**
* @param value Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
*/
@JvmName("ispvjqopxmrbewlx")
public suspend fun cacheId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cacheId = mapped
}
/**
* @param value Runtime connection string to cache
*/
@JvmName("bohtnsjgbwglrkhn")
public suspend fun connectionString(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.connectionString = mapped
}
/**
* @param value Cache description
*/
@JvmName("yyhhhhocmsxjtkie")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("uracqsspwsdgtneq")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Original uri of entity in external system cache points to
*/
@JvmName("jdoukdxvbxejxngv")
public suspend fun resourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceId = mapped
}
/**
* @param value The name of the API Management service.
*/
@JvmName("dhkmpgaktjemtljs")
public suspend fun serviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceName = mapped
}
/**
* @param value Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
*/
@JvmName("gkwamnltasqegqqo")
public suspend fun useFromLocation(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.useFromLocation = mapped
}
internal fun build(): CacheArgs = CacheArgs(
cacheId = cacheId,
connectionString = connectionString,
description = description,
resourceGroupName = resourceGroupName,
resourceId = resourceId,
serviceName = serviceName,
useFromLocation = useFromLocation,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy