TimeSeriesInsightsAccessPolicy
Manages an Azure IoT Time Series Insights Access Policy.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "northeurope",
});
var exampleTimeSeriesInsightsStandardEnvironment = new Azure.Iot.TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", new Azure.Iot.TimeSeriesInsightsStandardEnvironmentArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
SkuName = "S1_1",
DataRetentionTime = "P30D",
});
var exampleTimeSeriesInsightsAccessPolicy = new Azure.Iot.TimeSeriesInsightsAccessPolicy("exampleTimeSeriesInsightsAccessPolicy", new Azure.Iot.TimeSeriesInsightsAccessPolicyArgs
{
TimeSeriesInsightsEnvironmentId = exampleTimeSeriesInsightsStandardEnvironment.Name,
PrincipalObjectId = "aGUID",
Roles =
{
"Reader",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/iot"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("northeurope"),
})
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
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="northeurope")
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: "northeurope"});
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"],
});Create a TimeSeriesInsightsAccessPolicy Resource
new TimeSeriesInsightsAccessPolicy(name: string, args: TimeSeriesInsightsAccessPolicyArgs, opts?: CustomResourceOptions);def TimeSeriesInsightsAccessPolicy(resource_name, opts=None, description=None, name=None, principal_object_id=None, roles=None, time_series_insights_environment_id=None, __props__=None);func NewTimeSeriesInsightsAccessPolicy(ctx *Context, name string, args TimeSeriesInsightsAccessPolicyArgs, opts ...ResourceOption) (*TimeSeriesInsightsAccessPolicy, error)public TimeSeriesInsightsAccessPolicy(string name, TimeSeriesInsightsAccessPolicyArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
TimeSeriesInsightsAccessPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The TimeSeriesInsightsAccessPolicy resource accepts the following input properties:
- Principal
Object stringId 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
ContributorandReader.- Time
Series stringInsights Environment Id 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 stringId The id of the principal in Azure Active Directory.
- Roles []string
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- Time
Series stringInsights Environment Id 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 stringId The id of the principal in Azure Active Directory.
- roles string[]
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- time
Series stringInsights Environment Id 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_ strid The id of the principal in Azure Active Directory.
- roles List[str]
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- time_
series_ strinsights_ environment_ id 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the TimeSeriesInsightsAccessPolicy resource produces the following output properties:
Look up an 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): TimeSeriesInsightsAccessPolicystatic get(resource_name, id, opts=None, description=None, name=None, principal_object_id=None, roles=None, time_series_insights_environment_id=None, __props__=None);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)- 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.
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.
- Principal
Object stringId 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
ContributorandReader.- Time
Series stringInsights Environment Id 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 stringId The id of the principal in Azure Active Directory.
- Roles []string
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- Time
Series stringInsights Environment Id 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 stringId The id of the principal in Azure Active Directory.
- roles string[]
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- time
Series stringInsights Environment Id 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_ strid The id of the principal in Azure Active Directory.
- roles List[str]
A list of roles to apply to the Access Policy. Valid values include
ContributorandReader.- time_
series_ strinsights_ environment_ id 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.