TimeSeriesInsightsAccessPolicy

Manages an Azure IoT Time Series Insights Access Policy.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleTimeSeriesInsightsStandardEnvironment = new Azure.Iot.TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        SkuName = "S1_1",
        DataRetentionTime = "P30D",
    });

    var exampleTimeSeriesInsightsAccessPolicy = new Azure.Iot.TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy", new()
    {
        TimeSeriesInsightsEnvironmentId = exampleTimeSeriesInsightsStandardEnvironment.Name,
        PrincipalObjectId = "aGUID",
        Roles = new[]
        {
            "Reader",
        },
    });

});
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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleTimeSeriesInsightsStandardEnvironment, err := iot.NewTimeSeriesInsightsStandardEnvironment(ctx, "exampleTimeSeriesInsightsStandardEnvironment", &iot.TimeSeriesInsightsStandardEnvironmentArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("S1_1"),
			DataRetentionTime: pulumi.String("P30D"),
		})
		if err != nil {
			return err
		}
		_, err = iot.NewTimeSeriesInsightsAccessPolicy(ctx, "exampleTimeSeriesInsightsAccessPolicy", &iot.TimeSeriesInsightsAccessPolicyArgs{
			TimeSeriesInsightsEnvironmentId: exampleTimeSeriesInsightsStandardEnvironment.Name,
			PrincipalObjectId:               pulumi.String("aGUID"),
			Roles: pulumi.StringArray{
				pulumi.String("Reader"),
			},
		})
		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.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleTimeSeriesInsightsStandardEnvironment = new TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", TimeSeriesInsightsStandardEnvironmentArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .skuName("S1_1")
            .dataRetentionTime("P30D")
            .build());

        var exampleTimeSeriesInsightsAccessPolicy = new TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy", TimeSeriesInsightsAccessPolicyArgs.builder()        
            .timeSeriesInsightsEnvironmentId(exampleTimeSeriesInsightsStandardEnvironment.name())
            .principalObjectId("aGUID")
            .roles("Reader")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_time_series_insights_standard_environment = azure.iot.TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="S1_1",
    data_retention_time="P30D")
example_time_series_insights_access_policy = azure.iot.TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy",
    time_series_insights_environment_id=example_time_series_insights_standard_environment.name,
    principal_object_id="aGUID",
    roles=["Reader"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleTimeSeriesInsightsStandardEnvironment = new azure.iot.TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "S1_1",
    dataRetentionTime: "P30D",
});
const exampleTimeSeriesInsightsAccessPolicy = new azure.iot.TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy", {
    timeSeriesInsightsEnvironmentId: exampleTimeSeriesInsightsStandardEnvironment.name,
    principalObjectId: "aGUID",
    roles: ["Reader"],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleTimeSeriesInsightsStandardEnvironment:
    type: azure:iot:TimeSeriesInsightsStandardEnvironment
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: S1_1
      dataRetentionTime: P30D
  exampleTimeSeriesInsightsAccessPolicy:
    type: azure:iot:TimeSeriesInsightsAccessPolicy
    properties:
      timeSeriesInsightsEnvironmentId: ${exampleTimeSeriesInsightsStandardEnvironment.name}
      principalObjectId: aGUID
      roles:
        - Reader

Create TimeSeriesInsightsAccessPolicy Resource

new TimeSeriesInsightsAccessPolicy(name: string, args: TimeSeriesInsightsAccessPolicyArgs, opts?: CustomResourceOptions);
@overload
def TimeSeriesInsightsAccessPolicy(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   description: Optional[str] = None,
                                   name: Optional[str] = None,
                                   principal_object_id: Optional[str] = None,
                                   roles: Optional[Sequence[str]] = None,
                                   time_series_insights_environment_id: Optional[str] = None)
@overload
def TimeSeriesInsightsAccessPolicy(resource_name: str,
                                   args: TimeSeriesInsightsAccessPolicyArgs,
                                   opts: Optional[ResourceOptions] = None)
func NewTimeSeriesInsightsAccessPolicy(ctx *Context, name string, args TimeSeriesInsightsAccessPolicyArgs, opts ...ResourceOption) (*TimeSeriesInsightsAccessPolicy, error)
public TimeSeriesInsightsAccessPolicy(string name, TimeSeriesInsightsAccessPolicyArgs args, CustomResourceOptions? opts = null)
public TimeSeriesInsightsAccessPolicy(String name, TimeSeriesInsightsAccessPolicyArgs args)
public TimeSeriesInsightsAccessPolicy(String name, TimeSeriesInsightsAccessPolicyArgs args, CustomResourceOptions options)
type: azure:iot:TimeSeriesInsightsAccessPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TimeSeriesInsightsAccessPolicyArgs
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 TimeSeriesInsightsAccessPolicyArgs
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 TimeSeriesInsightsAccessPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TimeSeriesInsightsAccessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TimeSeriesInsightsAccessPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

TimeSeriesInsightsAccessPolicy 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 TimeSeriesInsightsAccessPolicy resource accepts the following input properties:

PrincipalObjectId string

The id of the principal in Azure Active Directory.

Roles List<string>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

TimeSeriesInsightsEnvironmentId string

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.

Description string

The description of the Azure IoT Time Series Insights Access Policy.

Name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

PrincipalObjectId string

The id of the principal in Azure Active Directory.

Roles []string

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

TimeSeriesInsightsEnvironmentId string

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.

Description string

The description of the Azure IoT Time Series Insights Access Policy.

Name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId String

The id of the principal in Azure Active Directory.

roles List<String>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId String

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.

description String

The description of the Azure IoT Time Series Insights Access Policy.

name String

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId string

The id of the principal in Azure Active Directory.

roles string[]

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId string

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.

description string

The description of the Azure IoT Time Series Insights Access Policy.

name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principal_object_id str

The id of the principal in Azure Active Directory.

roles Sequence[str]

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

time_series_insights_environment_id str

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.

description str

The description of the Azure IoT Time Series Insights Access Policy.

name str

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId String

The id of the principal in Azure Active Directory.

roles List<String>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId String

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.

description String

The description of the Azure IoT Time Series Insights Access Policy.

name String

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

Outputs

All input properties are implicitly available as output properties. Additionally, the TimeSeriesInsightsAccessPolicy 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 TimeSeriesInsightsAccessPolicy Resource

Get an existing TimeSeriesInsightsAccessPolicy 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?: TimeSeriesInsightsAccessPolicyState, opts?: CustomResourceOptions): TimeSeriesInsightsAccessPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        principal_object_id: Optional[str] = None,
        roles: Optional[Sequence[str]] = None,
        time_series_insights_environment_id: Optional[str] = None) -> TimeSeriesInsightsAccessPolicy
func GetTimeSeriesInsightsAccessPolicy(ctx *Context, name string, id IDInput, state *TimeSeriesInsightsAccessPolicyState, opts ...ResourceOption) (*TimeSeriesInsightsAccessPolicy, error)
public static TimeSeriesInsightsAccessPolicy Get(string name, Input<string> id, TimeSeriesInsightsAccessPolicyState? state, CustomResourceOptions? opts = null)
public static TimeSeriesInsightsAccessPolicy get(String name, Output<String> id, TimeSeriesInsightsAccessPolicyState 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.
The following state arguments are supported:
Description string

The description of the Azure IoT Time Series Insights Access Policy.

Name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

PrincipalObjectId string

The id of the principal in Azure Active Directory.

Roles List<string>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

TimeSeriesInsightsEnvironmentId string

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.

Description string

The description of the Azure IoT Time Series Insights Access Policy.

Name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

PrincipalObjectId string

The id of the principal in Azure Active Directory.

Roles []string

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

TimeSeriesInsightsEnvironmentId string

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.

description String

The description of the Azure IoT Time Series Insights Access Policy.

name String

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId String

The id of the principal in Azure Active Directory.

roles List<String>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId String

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.

description string

The description of the Azure IoT Time Series Insights Access Policy.

name string

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId string

The id of the principal in Azure Active Directory.

roles string[]

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId string

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.

description str

The description of the Azure IoT Time Series Insights Access Policy.

name str

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principal_object_id str

The id of the principal in Azure Active Directory.

roles Sequence[str]

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

time_series_insights_environment_id str

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.

description String

The description of the Azure IoT Time Series Insights Access Policy.

name String

Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique.

principalObjectId String

The id of the principal in Azure Active Directory.

roles List<String>

A list of roles to apply to the Access Policy. Valid values include Contributor and Reader.

timeSeriesInsightsEnvironmentId String

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.

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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.