NamedValueArgs

data class NamedValueArgs(val displayName: Output<String>? = null, val keyVault: Output<KeyVaultContractCreatePropertiesArgs>? = null, val namedValueId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val secret: Output<Boolean>? = null, val serviceName: Output<String>? = null, val tags: Output<List<String>>? = null, val value: Output<String>? = null) : ConvertibleToJava<NamedValueArgs>

NamedValue 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

ApiManagementCreateNamedValue

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var namedValue = new AzureNative.ApiManagement.NamedValue("namedValue", new()
{
DisplayName = "prop3name",
NamedValueId = "testprop2",
ResourceGroupName = "rg1",
Secret = false,
ServiceName = "apimService1",
Tags = new[]
{
"foo",
"bar",
},
Value = "propValue",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewNamedValue(ctx, "namedValue", &apimanagement.NamedValueArgs{
DisplayName: pulumi.String("prop3name"),
NamedValueId: pulumi.String("testprop2"),
ResourceGroupName: pulumi.String("rg1"),
Secret: pulumi.Bool(false),
ServiceName: pulumi.String("apimService1"),
Tags: pulumi.StringArray{
pulumi.String("foo"),
pulumi.String("bar"),
},
Value: pulumi.String("propValue"),
})
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.NamedValue;
import com.pulumi.azurenative.apimanagement.NamedValueArgs;
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 namedValue = new NamedValue("namedValue", NamedValueArgs.builder()
.displayName("prop3name")
.namedValueId("testprop2")
.resourceGroupName("rg1")
.secret(false)
.serviceName("apimService1")
.tags(
"foo",
"bar")
.value("propValue")
.build());
}
}

ApiManagementCreateNamedValueWithKeyVault

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var namedValue = new AzureNative.ApiManagement.NamedValue("namedValue", new()
{
DisplayName = "prop6namekv",
KeyVault = new AzureNative.ApiManagement.Inputs.KeyVaultContractCreatePropertiesArgs
{
IdentityClientId = "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
SecretIdentifier = "https://contoso.vault.azure.net/secrets/aadSecret",
},
NamedValueId = "testprop6",
ResourceGroupName = "rg1",
Secret = true,
ServiceName = "apimService1",
Tags = new[]
{
"foo",
"bar",
},
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewNamedValue(ctx, "namedValue", &apimanagement.NamedValueArgs{
DisplayName: pulumi.String("prop6namekv"),
KeyVault: &apimanagement.KeyVaultContractCreatePropertiesArgs{
IdentityClientId: pulumi.String("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
SecretIdentifier: pulumi.String("https://contoso.vault.azure.net/secrets/aadSecret"),
},
NamedValueId: pulumi.String("testprop6"),
ResourceGroupName: pulumi.String("rg1"),
Secret: pulumi.Bool(true),
ServiceName: pulumi.String("apimService1"),
Tags: pulumi.StringArray{
pulumi.String("foo"),
pulumi.String("bar"),
},
})
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.NamedValue;
import com.pulumi.azurenative.apimanagement.NamedValueArgs;
import com.pulumi.azurenative.apimanagement.inputs.KeyVaultContractCreatePropertiesArgs;
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 namedValue = new NamedValue("namedValue", NamedValueArgs.builder()
.displayName("prop6namekv")
.keyVault(KeyVaultContractCreatePropertiesArgs.builder()
.identityClientId("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0")
.secretIdentifier("https://contoso.vault.azure.net/secrets/aadSecret")
.build())
.namedValueId("testprop6")
.resourceGroupName("rg1")
.secret(true)
.serviceName("apimService1")
.tags(
"foo",
"bar")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:apimanagement:NamedValue testprop6 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}

Constructors

Link copied to clipboard
constructor(displayName: Output<String>? = null, keyVault: Output<KeyVaultContractCreatePropertiesArgs>? = null, namedValueId: Output<String>? = null, resourceGroupName: Output<String>? = null, secret: Output<Boolean>? = null, serviceName: Output<String>? = null, tags: Output<List<String>>? = null, value: Output<String>? = null)

Properties

Link copied to clipboard
val displayName: Output<String>? = null

Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.

Link copied to clipboard

KeyVault location details of the namedValue.

Link copied to clipboard
val namedValueId: Output<String>? = null

Identifier of the NamedValue.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val secret: Output<Boolean>? = null

Determines whether the value is a secret and should be encrypted or not. Default value is false.

Link copied to clipboard
val serviceName: Output<String>? = null

The name of the API Management service.

Link copied to clipboard
val tags: Output<List<String>>? = null

Optional tags that when provided can be used to filter the NamedValue list.

Link copied to clipboard
val value: Output<String>? = null

Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.

Functions

Link copied to clipboard
open override fun toJava(): NamedValueArgs