Time Series Insights Access Policy
Manages an Azure IoT Time Series Insights Access Policy.
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 exampleTimeSeriesInsightsStandardEnvironment = new azure.iot.TimeSeriesInsightsStandardEnvironment("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
skuName: "S1_1",
dataRetentionTime: "P30D",
});
const exampleTimeSeriesInsightsAccessPolicy = new azure.iot.TimeSeriesInsightsAccessPolicy("example", {
name: "example",
timeSeriesInsightsEnvironmentId: exampleTimeSeriesInsightsStandardEnvironment.name,
principalObjectId: "aGUID",
roles: ["Reader"],
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_time_series_insights_standard_environment = azure.iot.TimeSeriesInsightsStandardEnvironment("example",
name="example",
location=example.location,
resource_group_name=example.name,
sku_name="S1_1",
data_retention_time="P30D")
example_time_series_insights_access_policy = azure.iot.TimeSeriesInsightsAccessPolicy("example",
name="example",
time_series_insights_environment_id=example_time_series_insights_standard_environment.name,
principal_object_id="aGUID",
roles=["Reader"])
Content copied to clipboard
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 exampleTimeSeriesInsightsStandardEnvironment = new Azure.Iot.TimeSeriesInsightsStandardEnvironment("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
SkuName = "S1_1",
DataRetentionTime = "P30D",
});
var exampleTimeSeriesInsightsAccessPolicy = new Azure.Iot.TimeSeriesInsightsAccessPolicy("example", new()
{
Name = "example",
TimeSeriesInsightsEnvironmentId = exampleTimeSeriesInsightsStandardEnvironment.Name,
PrincipalObjectId = "aGUID",
Roles = new[]
{
"Reader",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
"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
}
exampleTimeSeriesInsightsStandardEnvironment, err := iot.NewTimeSeriesInsightsStandardEnvironment(ctx, "example", &iot.TimeSeriesInsightsStandardEnvironmentArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
SkuName: pulumi.String("S1_1"),
DataRetentionTime: pulumi.String("P30D"),
})
if err != nil {
return err
}
_, err = iot.NewTimeSeriesInsightsAccessPolicy(ctx, "example", &iot.TimeSeriesInsightsAccessPolicyArgs{
Name: pulumi.String("example"),
TimeSeriesInsightsEnvironmentId: exampleTimeSeriesInsightsStandardEnvironment.Name,
PrincipalObjectId: pulumi.String("aGUID"),
Roles: pulumi.StringArray{
pulumi.String("Reader"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.iot.TimeSeriesInsightsStandardEnvironment;
import com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironmentArgs;
import com.pulumi.azure.iot.TimeSeriesInsightsAccessPolicy;
import com.pulumi.azure.iot.TimeSeriesInsightsAccessPolicyArgs;
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 exampleTimeSeriesInsightsStandardEnvironment = new TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", TimeSeriesInsightsStandardEnvironmentArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.skuName("S1_1")
.dataRetentionTime("P30D")
.build());
var exampleTimeSeriesInsightsAccessPolicy = new TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy", TimeSeriesInsightsAccessPolicyArgs.builder()
.name("example")
.timeSeriesInsightsEnvironmentId(exampleTimeSeriesInsightsStandardEnvironment.name())
.principalObjectId("aGUID")
.roles("Reader")
.build());
}
}
Content copied to clipboard
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleTimeSeriesInsightsStandardEnvironment:
type: azure:iot:TimeSeriesInsightsStandardEnvironment
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
skuName: S1_1
dataRetentionTime: P30D
exampleTimeSeriesInsightsAccessPolicy:
type: azure:iot:TimeSeriesInsightsAccessPolicy
name: example
properties:
name: example
timeSeriesInsightsEnvironmentId: ${exampleTimeSeriesInsightsStandardEnvironment.name}
principalObjectId: aGUID
roles:
- Reader
Content copied to clipboard
Import
Azure IoT Time Series Insights Access Policy can be imported using the resource id
, e.g.
$ pulumi import azure:iot/timeSeriesInsightsAccessPolicy:TimeSeriesInsightsAccessPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/environment1/accessPolicies/example
Content copied to clipboard
Properties
Link copied to clipboard
The description of the Azure IoT Time Series Insights Access Policy.
Link copied to clipboard
The id of the principal in Azure Active Directory. Changing this forces a new resource to be created.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.