AccessPolicyArgs

data class AccessPolicyArgs(val accessPolicyName: Output<String>? = null, val description: Output<String>? = null, val environmentName: Output<String>? = null, val principalObjectId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val roles: Output<List<Either<String, AccessPolicyRole>>>? = null) : ConvertibleToJava<AccessPolicyArgs>

An access policy is used to grant users and applications access to the environment. Roles are assigned to service principals in Azure Active Directory. These roles define the actions the principal can perform through the Time Series Insights data plane APIs. Uses Azure REST API version 2020-05-15. In version 2.x of the Azure Native provider, it used API version 2020-05-15. Other available API versions: 2021-03-31-preview, 2021-06-30-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native timeseriesinsights [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

AccessPoliciesCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var accessPolicy = new AzureNative.TimeSeriesInsights.AccessPolicy("accessPolicy", new()
{
AccessPolicyName = "ap1",
Description = "some description",
EnvironmentName = "env1",
PrincipalObjectId = "aGuid",
ResourceGroupName = "rg1",
Roles = new[]
{
AzureNative.TimeSeriesInsights.AccessPolicyRole.Reader,
},
});
});
package main
import (
timeseriesinsights "github.com/pulumi/pulumi-azure-native-sdk/timeseriesinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := timeseriesinsights.NewAccessPolicy(ctx, "accessPolicy", &timeseriesinsights.AccessPolicyArgs{
AccessPolicyName: pulumi.String("ap1"),
Description: pulumi.String("some description"),
EnvironmentName: pulumi.String("env1"),
PrincipalObjectId: pulumi.String("aGuid"),
ResourceGroupName: pulumi.String("rg1"),
Roles: pulumi.StringArray{
pulumi.String(timeseriesinsights.AccessPolicyRoleReader),
},
})
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.azurenative.timeseriesinsights.AccessPolicy;
import com.pulumi.azurenative.timeseriesinsights.AccessPolicyArgs;
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 accessPolicy = new AccessPolicy("accessPolicy", AccessPolicyArgs.builder()
.accessPolicyName("ap1")
.description("some description")
.environmentName("env1")
.principalObjectId("aGuid")
.resourceGroupName("rg1")
.roles("Reader")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:timeseriesinsights:AccessPolicy ap1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}/accessPolicies/{accessPolicyName}

Constructors

Link copied to clipboard
constructor(accessPolicyName: Output<String>? = null, description: Output<String>? = null, environmentName: Output<String>? = null, principalObjectId: Output<String>? = null, resourceGroupName: Output<String>? = null, roles: Output<List<Either<String, AccessPolicyRole>>>? = null)

Properties

Link copied to clipboard
val accessPolicyName: Output<String>? = null

Name of the access policy.

Link copied to clipboard
val description: Output<String>? = null

An description of the access policy.

Link copied to clipboard
val environmentName: Output<String>? = null

The name of the Time Series Insights environment associated with the specified resource group.

Link copied to clipboard
val principalObjectId: Output<String>? = null

The objectId of the principal in Azure Active Directory.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of an Azure Resource group.

Link copied to clipboard
val roles: Output<List<Either<String, AccessPolicyRole>>>? = null

The list of roles the principal is assigned on the environment.

Functions

Link copied to clipboard
open override fun toJava(): AccessPolicyArgs