We recommend using Azure Native.
azure.appinsights.ApiKey
Explore with Pulumi AI
Manages an Application Insights API key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
export = async () => {
const example = new azure.core.ResourceGroup("example", {
name: "tf-test",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "tf-test-appinsights",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const readTelemetry = new azure.appinsights.ApiKey("read_telemetry", {
name: "tf-test-appinsights-read-telemetry-api-key",
applicationInsightsId: exampleInsights.id,
readPermissions: [
"aggregate",
"api",
"draft",
"extendqueries",
"search",
],
});
const writeAnnotations = new azure.appinsights.ApiKey("write_annotations", {
name: "tf-test-appinsights-write-annotations-api-key",
applicationInsightsId: exampleInsights.id,
writePermissions: ["annotations"],
});
const authenticateSdkControlChannel = new azure.appinsights.ApiKey("authenticate_sdk_control_channel", {
name: "tf-test-appinsights-authenticate-sdk-control-channel-api-key",
applicationInsightsId: exampleInsights.id,
readPermissions: ["agentconfig"],
});
const fullPermissions = new azure.appinsights.ApiKey("full_permissions", {
name: "tf-test-appinsights-full-permissions-api-key",
applicationInsightsId: exampleInsights.id,
readPermissions: [
"agentconfig",
"aggregate",
"api",
"draft",
"extendqueries",
"search",
],
writePermissions: ["annotations"],
});
return {
readTelemetryApiKey: readTelemetry.apiKey,
writeAnnotationsApiKey: writeAnnotations.apiKey,
authenticateSdkControlChannel: authenticateSdkControlChannel.apiKey,
fullPermissionsApiKey: fullPermissions.apiKey,
};
}
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tf-test",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="tf-test-appinsights",
location=example.location,
resource_group_name=example.name,
application_type="web")
read_telemetry = azure.appinsights.ApiKey("read_telemetry",
name="tf-test-appinsights-read-telemetry-api-key",
application_insights_id=example_insights.id,
read_permissions=[
"aggregate",
"api",
"draft",
"extendqueries",
"search",
])
write_annotations = azure.appinsights.ApiKey("write_annotations",
name="tf-test-appinsights-write-annotations-api-key",
application_insights_id=example_insights.id,
write_permissions=["annotations"])
authenticate_sdk_control_channel = azure.appinsights.ApiKey("authenticate_sdk_control_channel",
name="tf-test-appinsights-authenticate-sdk-control-channel-api-key",
application_insights_id=example_insights.id,
read_permissions=["agentconfig"])
full_permissions = azure.appinsights.ApiKey("full_permissions",
name="tf-test-appinsights-full-permissions-api-key",
application_insights_id=example_insights.id,
read_permissions=[
"agentconfig",
"aggregate",
"api",
"draft",
"extendqueries",
"search",
],
write_permissions=["annotations"])
pulumi.export("readTelemetryApiKey", read_telemetry.api_key)
pulumi.export("writeAnnotationsApiKey", write_annotations.api_key)
pulumi.export("authenticateSdkControlChannel", authenticate_sdk_control_channel.api_key)
pulumi.export("fullPermissionsApiKey", full_permissions.api_key)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
"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("tf-test"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("tf-test-appinsights"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
readTelemetry, err := appinsights.NewApiKey(ctx, "read_telemetry", &appinsights.ApiKeyArgs{
Name: pulumi.String("tf-test-appinsights-read-telemetry-api-key"),
ApplicationInsightsId: exampleInsights.ID(),
ReadPermissions: pulumi.StringArray{
pulumi.String("aggregate"),
pulumi.String("api"),
pulumi.String("draft"),
pulumi.String("extendqueries"),
pulumi.String("search"),
},
})
if err != nil {
return err
}
writeAnnotations, err := appinsights.NewApiKey(ctx, "write_annotations", &appinsights.ApiKeyArgs{
Name: pulumi.String("tf-test-appinsights-write-annotations-api-key"),
ApplicationInsightsId: exampleInsights.ID(),
WritePermissions: pulumi.StringArray{
pulumi.String("annotations"),
},
})
if err != nil {
return err
}
authenticateSdkControlChannel, err := appinsights.NewApiKey(ctx, "authenticate_sdk_control_channel", &appinsights.ApiKeyArgs{
Name: pulumi.String("tf-test-appinsights-authenticate-sdk-control-channel-api-key"),
ApplicationInsightsId: exampleInsights.ID(),
ReadPermissions: pulumi.StringArray{
pulumi.String("agentconfig"),
},
})
if err != nil {
return err
}
fullPermissions, err := appinsights.NewApiKey(ctx, "full_permissions", &appinsights.ApiKeyArgs{
Name: pulumi.String("tf-test-appinsights-full-permissions-api-key"),
ApplicationInsightsId: exampleInsights.ID(),
ReadPermissions: pulumi.StringArray{
pulumi.String("agentconfig"),
pulumi.String("aggregate"),
pulumi.String("api"),
pulumi.String("draft"),
pulumi.String("extendqueries"),
pulumi.String("search"),
},
WritePermissions: pulumi.StringArray{
pulumi.String("annotations"),
},
})
if err != nil {
return err
}
ctx.Export("readTelemetryApiKey", readTelemetry.ApiKey)
ctx.Export("writeAnnotationsApiKey", writeAnnotations.ApiKey)
ctx.Export("authenticateSdkControlChannel", authenticateSdkControlChannel.ApiKey)
ctx.Export("fullPermissionsApiKey", fullPermissions.ApiKey)
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 = "tf-test",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "tf-test-appinsights",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var readTelemetry = new Azure.AppInsights.ApiKey("read_telemetry", new()
{
Name = "tf-test-appinsights-read-telemetry-api-key",
ApplicationInsightsId = exampleInsights.Id,
ReadPermissions = new[]
{
"aggregate",
"api",
"draft",
"extendqueries",
"search",
},
});
var writeAnnotations = new Azure.AppInsights.ApiKey("write_annotations", new()
{
Name = "tf-test-appinsights-write-annotations-api-key",
ApplicationInsightsId = exampleInsights.Id,
WritePermissions = new[]
{
"annotations",
},
});
var authenticateSdkControlChannel = new Azure.AppInsights.ApiKey("authenticate_sdk_control_channel", new()
{
Name = "tf-test-appinsights-authenticate-sdk-control-channel-api-key",
ApplicationInsightsId = exampleInsights.Id,
ReadPermissions = new[]
{
"agentconfig",
},
});
var fullPermissions = new Azure.AppInsights.ApiKey("full_permissions", new()
{
Name = "tf-test-appinsights-full-permissions-api-key",
ApplicationInsightsId = exampleInsights.Id,
ReadPermissions = new[]
{
"agentconfig",
"aggregate",
"api",
"draft",
"extendqueries",
"search",
},
WritePermissions = new[]
{
"annotations",
},
});
return new Dictionary<string, object?>
{
["readTelemetryApiKey"] = readTelemetry.ApiKey,
["writeAnnotationsApiKey"] = writeAnnotations.ApiKey,
["authenticateSdkControlChannel"] = authenticateSdkControlChannel.ApiKey,
["fullPermissionsApiKey"] = fullPermissions.ApiKey,
};
});
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.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.appinsights.ApiKey;
import com.pulumi.azure.appinsights.ApiKeyArgs;
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("tf-test")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("tf-test-appinsights")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var readTelemetry = new ApiKey("readTelemetry", ApiKeyArgs.builder()
.name("tf-test-appinsights-read-telemetry-api-key")
.applicationInsightsId(exampleInsights.id())
.readPermissions(
"aggregate",
"api",
"draft",
"extendqueries",
"search")
.build());
var writeAnnotations = new ApiKey("writeAnnotations", ApiKeyArgs.builder()
.name("tf-test-appinsights-write-annotations-api-key")
.applicationInsightsId(exampleInsights.id())
.writePermissions("annotations")
.build());
var authenticateSdkControlChannel = new ApiKey("authenticateSdkControlChannel", ApiKeyArgs.builder()
.name("tf-test-appinsights-authenticate-sdk-control-channel-api-key")
.applicationInsightsId(exampleInsights.id())
.readPermissions("agentconfig")
.build());
var fullPermissions = new ApiKey("fullPermissions", ApiKeyArgs.builder()
.name("tf-test-appinsights-full-permissions-api-key")
.applicationInsightsId(exampleInsights.id())
.readPermissions(
"agentconfig",
"aggregate",
"api",
"draft",
"extendqueries",
"search")
.writePermissions("annotations")
.build());
ctx.export("readTelemetryApiKey", readTelemetry.apiKey());
ctx.export("writeAnnotationsApiKey", writeAnnotations.apiKey());
ctx.export("authenticateSdkControlChannel", authenticateSdkControlChannel.apiKey());
ctx.export("fullPermissionsApiKey", fullPermissions.apiKey());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tf-test
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: tf-test-appinsights
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
readTelemetry:
type: azure:appinsights:ApiKey
name: read_telemetry
properties:
name: tf-test-appinsights-read-telemetry-api-key
applicationInsightsId: ${exampleInsights.id}
readPermissions:
- aggregate
- api
- draft
- extendqueries
- search
writeAnnotations:
type: azure:appinsights:ApiKey
name: write_annotations
properties:
name: tf-test-appinsights-write-annotations-api-key
applicationInsightsId: ${exampleInsights.id}
writePermissions:
- annotations
authenticateSdkControlChannel:
type: azure:appinsights:ApiKey
name: authenticate_sdk_control_channel
properties:
name: tf-test-appinsights-authenticate-sdk-control-channel-api-key
applicationInsightsId: ${exampleInsights.id}
readPermissions:
- agentconfig
fullPermissions:
type: azure:appinsights:ApiKey
name: full_permissions
properties:
name: tf-test-appinsights-full-permissions-api-key
applicationInsightsId: ${exampleInsights.id}
readPermissions:
- agentconfig
- aggregate
- api
- draft
- extendqueries
- search
writePermissions:
- annotations
outputs:
readTelemetryApiKey: ${readTelemetry.apiKey}
writeAnnotationsApiKey: ${writeAnnotations.apiKey}
authenticateSdkControlChannel: ${authenticateSdkControlChannel.apiKey}
fullPermissionsApiKey: ${fullPermissions.apiKey}
Create ApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
@overload
def ApiKey(resource_name: str,
args: ApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_insights_id: Optional[str] = None,
name: Optional[str] = None,
read_permissions: Optional[Sequence[str]] = None,
write_permissions: Optional[Sequence[str]] = None)
func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
public ApiKey(String name, ApiKeyArgs args)
public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
type: azure:appinsights:ApiKey
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 ApiKeyArgs
- 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 ApiKeyArgs
- 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 ApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiKeyArgs
- 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 apiKeyResource = new Azure.AppInsights.ApiKey("apiKeyResource", new()
{
ApplicationInsightsId = "string",
Name = "string",
ReadPermissions = new[]
{
"string",
},
WritePermissions = new[]
{
"string",
},
});
example, err := appinsights.NewApiKey(ctx, "apiKeyResource", &appinsights.ApiKeyArgs{
ApplicationInsightsId: pulumi.String("string"),
Name: pulumi.String("string"),
ReadPermissions: pulumi.StringArray{
pulumi.String("string"),
},
WritePermissions: pulumi.StringArray{
pulumi.String("string"),
},
})
var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()
.applicationInsightsId("string")
.name("string")
.readPermissions("string")
.writePermissions("string")
.build());
api_key_resource = azure.appinsights.ApiKey("apiKeyResource",
application_insights_id="string",
name="string",
read_permissions=["string"],
write_permissions=["string"])
const apiKeyResource = new azure.appinsights.ApiKey("apiKeyResource", {
applicationInsightsId: "string",
name: "string",
readPermissions: ["string"],
writePermissions: ["string"],
});
type: azure:appinsights:ApiKey
properties:
applicationInsightsId: string
name: string
readPermissions:
- string
writePermissions:
- string
ApiKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApiKey resource accepts the following input properties:
- Application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- Read
Permissions List<string> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - Write
Permissions List<string> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- Application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- Read
Permissions []string - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - Write
Permissions []string Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- application
Insights StringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name String
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions List<String> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions List<String> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions string[] - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions string[] Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- application_
insights_ strid - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name str
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read_
permissions Sequence[str] - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write_
permissions Sequence[str] Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- application
Insights StringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name String
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions List<String> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions List<String> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:
Look up Existing ApiKey Resource
Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None,
application_insights_id: Optional[str] = None,
name: Optional[str] = None,
read_permissions: Optional[Sequence[str]] = None,
write_permissions: Optional[Sequence[str]] = None) -> ApiKey
func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
public static ApiKey get(String name, Output<String> id, ApiKeyState 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.
- Application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- Key string
- The API Key secret (Sensitive).
- Name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- Read
Permissions List<string> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - Write
Permissions List<string> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- Api
Key string - The API Key secret (Sensitive).
- Application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- Read
Permissions []string - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - Write
Permissions []string Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- api
Key String - The API Key secret (Sensitive).
- application
Insights StringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name String
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions List<String> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions List<String> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- api
Key string - The API Key secret (Sensitive).
- application
Insights stringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name string
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions string[] - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions string[] Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- api_
key str - The API Key secret (Sensitive).
- application_
insights_ strid - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name str
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read_
permissions Sequence[str] - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write_
permissions Sequence[str] Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
- api
Key String - The API Key secret (Sensitive).
- application
Insights StringId - The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
- name String
- Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
- read
Permissions List<String> - Specifies the list of read permissions granted to the API key. Valid values are
agentconfig
,aggregate
,api
,draft
,extendqueries
,search
. Please note these values are case sensitive. Changing this forces a new resource to be created. - write
Permissions List<String> Specifies the list of write permissions granted to the API key. Valid values are
annotations
. Please note these values are case sensitive. Changing this forces a new resource to be created.Note: At least one read or write permission must be defined.
Import
Application Insights API keys can be imported using the resource id
, e.g.
$ pulumi import azure:appinsights/apiKey:ApiKey my_key /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/instance1/apiKeys/00000000-0000-0000-0000-000000000000
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.