We recommend using Azure Native.
azure.apimanagement.NamedValue
Explore with Pulumi AI
Manages an API Management Named Value.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleService = new azure.apimanagement.Service("example", {
name: "example-apim",
location: example.location,
resourceGroupName: example.name,
publisherName: "pub1",
publisherEmail: "pub1@email.com",
skuName: "Developer_1",
});
const exampleNamedValue = new azure.apimanagement.NamedValue("example", {
name: "example-apimg",
resourceGroupName: example.name,
apiManagementName: exampleService.name,
displayName: "ExampleProperty",
value: "Example Value",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service = azure.apimanagement.Service("example",
name="example-apim",
location=example.location,
resource_group_name=example.name,
publisher_name="pub1",
publisher_email="pub1@email.com",
sku_name="Developer_1")
example_named_value = azure.apimanagement.NamedValue("example",
name="example-apimg",
resource_group_name=example.name,
api_management_name=example_service.name,
display_name="ExampleProperty",
value="Example Value")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
Name: pulumi.String("example-apim"),
Location: example.Location,
ResourceGroupName: example.Name,
PublisherName: pulumi.String("pub1"),
PublisherEmail: pulumi.String("pub1@email.com"),
SkuName: pulumi.String("Developer_1"),
})
if err != nil {
return err
}
_, err = apimanagement.NewNamedValue(ctx, "example", &apimanagement.NamedValueArgs{
Name: pulumi.String("example-apimg"),
ResourceGroupName: example.Name,
ApiManagementName: exampleService.Name,
DisplayName: pulumi.String("ExampleProperty"),
Value: pulumi.String("Example Value"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleService = new Azure.ApiManagement.Service("example", new()
{
Name = "example-apim",
Location = example.Location,
ResourceGroupName = example.Name,
PublisherName = "pub1",
PublisherEmail = "pub1@email.com",
SkuName = "Developer_1",
});
var exampleNamedValue = new Azure.ApiManagement.NamedValue("example", new()
{
Name = "example-apimg",
ResourceGroupName = example.Name,
ApiManagementName = exampleService.Name,
DisplayName = "ExampleProperty",
Value = "Example Value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.apimanagement.Service;
import com.pulumi.azure.apimanagement.ServiceArgs;
import com.pulumi.azure.apimanagement.NamedValue;
import com.pulumi.azure.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-apim")
.location(example.location())
.resourceGroupName(example.name())
.publisherName("pub1")
.publisherEmail("pub1@email.com")
.skuName("Developer_1")
.build());
var exampleNamedValue = new NamedValue("exampleNamedValue", NamedValueArgs.builder()
.name("example-apimg")
.resourceGroupName(example.name())
.apiManagementName(exampleService.name())
.displayName("ExampleProperty")
.value("Example Value")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleService:
type: azure:apimanagement:Service
name: example
properties:
name: example-apim
location: ${example.location}
resourceGroupName: ${example.name}
publisherName: pub1
publisherEmail: pub1@email.com
skuName: Developer_1
exampleNamedValue:
type: azure:apimanagement:NamedValue
name: example
properties:
name: example-apimg
resourceGroupName: ${example.name}
apiManagementName: ${exampleService.name}
displayName: ExampleProperty
value: Example Value
Create NamedValue Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NamedValue(name: string, args: NamedValueArgs, opts?: CustomResourceOptions);
@overload
def NamedValue(resource_name: str,
args: NamedValueArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NamedValue(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_management_name: Optional[str] = None,
display_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
name: Optional[str] = None,
secret: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
value: Optional[str] = None,
value_from_key_vault: Optional[NamedValueValueFromKeyVaultArgs] = None)
func NewNamedValue(ctx *Context, name string, args NamedValueArgs, opts ...ResourceOption) (*NamedValue, error)
public NamedValue(string name, NamedValueArgs args, CustomResourceOptions? opts = null)
public NamedValue(String name, NamedValueArgs args)
public NamedValue(String name, NamedValueArgs args, CustomResourceOptions options)
type: azure:apimanagement:NamedValue
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NamedValueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NamedValueArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NamedValueArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NamedValueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NamedValueArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var namedValueResource = new Azure.ApiManagement.NamedValue("namedValueResource", new()
{
ApiManagementName = "string",
DisplayName = "string",
ResourceGroupName = "string",
Name = "string",
Secret = false,
Tags = new[]
{
"string",
},
Value = "string",
ValueFromKeyVault = new Azure.ApiManagement.Inputs.NamedValueValueFromKeyVaultArgs
{
SecretId = "string",
IdentityClientId = "string",
},
});
example, err := apimanagement.NewNamedValue(ctx, "namedValueResource", &apimanagement.NamedValueArgs{
ApiManagementName: pulumi.String("string"),
DisplayName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Name: pulumi.String("string"),
Secret: pulumi.Bool(false),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Value: pulumi.String("string"),
ValueFromKeyVault: &apimanagement.NamedValueValueFromKeyVaultArgs{
SecretId: pulumi.String("string"),
IdentityClientId: pulumi.String("string"),
},
})
var namedValueResource = new NamedValue("namedValueResource", NamedValueArgs.builder()
.apiManagementName("string")
.displayName("string")
.resourceGroupName("string")
.name("string")
.secret(false)
.tags("string")
.value("string")
.valueFromKeyVault(NamedValueValueFromKeyVaultArgs.builder()
.secretId("string")
.identityClientId("string")
.build())
.build());
named_value_resource = azure.apimanagement.NamedValue("namedValueResource",
api_management_name="string",
display_name="string",
resource_group_name="string",
name="string",
secret=False,
tags=["string"],
value="string",
value_from_key_vault={
"secret_id": "string",
"identity_client_id": "string",
})
const namedValueResource = new azure.apimanagement.NamedValue("namedValueResource", {
apiManagementName: "string",
displayName: "string",
resourceGroupName: "string",
name: "string",
secret: false,
tags: ["string"],
value: "string",
valueFromKeyVault: {
secretId: "string",
identityClientId: "string",
},
});
type: azure:apimanagement:NamedValue
properties:
apiManagementName: string
displayName: string
name: string
resourceGroupName: string
secret: false
tags:
- string
value: string
valueFromKeyVault:
identityClientId: string
secretId: string
NamedValue Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NamedValue resource accepts the following input properties:
- Api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Display
Name string - The display name of this API Management Named Value.
- Resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- Secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<string>
- A list of tags to be applied to the API Management Named Value.
- Value string
- The value of this API Management Named Value.
- Value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- Api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Display
Name string - The display name of this API Management Named Value.
- Resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- Secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- []string
- A list of tags to be applied to the API Management Named Value.
- Value string
- The value of this API Management Named Value.
- Value
From NamedKey Vault Value Value From Key Vault Args - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management StringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name String - The display name of this API Management Named Value.
- resource
Group StringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- name String
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- secret Boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<String>
- A list of tags to be applied to the API Management Named Value.
- value String
- The value of this API Management Named Value.
- value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name string - The display name of this API Management Named Value.
- resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- secret boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- string[]
- A list of tags to be applied to the API Management Named Value.
- value string
- The value of this API Management Named Value.
- value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api_
management_ strname - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display_
name str - The display name of this API Management Named Value.
- resource_
group_ strname - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- name str
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- Sequence[str]
- A list of tags to be applied to the API Management Named Value.
- value str
- The value of this API Management Named Value.
- value_
from_ Namedkey_ vault Value Value From Key Vault Args - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management StringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name String - The display name of this API Management Named Value.
- resource
Group StringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- name String
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- secret Boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<String>
- A list of tags to be applied to the API Management Named Value.
- value String
- The value of this API Management Named Value.
- value
From Property MapKey Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
Outputs
All input properties are implicitly available as output properties. Additionally, the NamedValue resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NamedValue Resource
Get an existing NamedValue resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NamedValueState, opts?: CustomResourceOptions): NamedValue
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_management_name: Optional[str] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
secret: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
value: Optional[str] = None,
value_from_key_vault: Optional[NamedValueValueFromKeyVaultArgs] = None) -> NamedValue
func GetNamedValue(ctx *Context, name string, id IDInput, state *NamedValueState, opts ...ResourceOption) (*NamedValue, error)
public static NamedValue Get(string name, Input<string> id, NamedValueState? state, CustomResourceOptions? opts = null)
public static NamedValue get(String name, Output<String> id, NamedValueState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Display
Name string - The display name of this API Management Named Value.
- Name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<string>
- A list of tags to be applied to the API Management Named Value.
- Value string
- The value of this API Management Named Value.
- Value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- Api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Display
Name string - The display name of this API Management Named Value.
- Name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- Secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- []string
- A list of tags to be applied to the API Management Named Value.
- Value string
- The value of this API Management Named Value.
- Value
From NamedKey Vault Value Value From Key Vault Args - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management StringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name String - The display name of this API Management Named Value.
- name String
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- secret Boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<String>
- A list of tags to be applied to the API Management Named Value.
- value String
- The value of this API Management Named Value.
- value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management stringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name string - The display name of this API Management Named Value.
- name string
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- secret boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- string[]
- A list of tags to be applied to the API Management Named Value.
- value string
- The value of this API Management Named Value.
- value
From NamedKey Vault Value Value From Key Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api_
management_ strname - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display_
name str - The display name of this API Management Named Value.
- name str
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- secret bool
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- Sequence[str]
- A list of tags to be applied to the API Management Named Value.
- value str
- The value of this API Management Named Value.
- value_
from_ Namedkey_ vault Value Value From Key Vault Args - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
- api
Management StringName - The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- display
Name String - The display name of this API Management Named Value.
- name String
- The name of the API Management Named Value. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
- secret Boolean
Specifies whether the API Management Named Value is secret. Valid values are
true
orfalse
. The default value isfalse
.NOTE: setting the field
secret
totrue
doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.- List<String>
- A list of tags to be applied to the API Management Named Value.
- value String
- The value of this API Management Named Value.
- value
From Property MapKey Vault - A
value_from_key_vault
block as defined below. If specified,secret
must also be set totrue
.
Supporting Types
NamedValueValueFromKeyVault, NamedValueValueFromKeyVaultArgs
- Secret
Id string - The resource ID of the Key Vault Secret.
- Identity
Client stringId - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
- Secret
Id string - The resource ID of the Key Vault Secret.
- Identity
Client stringId - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
- secret
Id String - The resource ID of the Key Vault Secret.
- identity
Client StringId - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
- secret
Id string - The resource ID of the Key Vault Secret.
- identity
Client stringId - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
- secret_
id str - The resource ID of the Key Vault Secret.
- identity_
client_ strid - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
- secret
Id String - The resource ID of the Key Vault Secret.
- identity
Client StringId - The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence.
Import
API Management Properties can be imported using the resource id
, e.g.
$ pulumi import azure:apimanagement/namedValue:NamedValue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ApiManagement/service/example-apim/namedValues/example-apimp
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.