Access Policy Args
data class AccessPolicyArgs(val accessPolicyName: Output<String>? = null, val accountName: Output<String>? = null, val authentication: Output<JwtAuthenticationArgs>? = null, val resourceGroupName: Output<String>? = null, val role: Output<Either<String, AccessPolicyRole>>? = null) : ConvertibleToJava<AccessPolicyArgs>
Access policies help define the authentication rules, and control access to specific video resources. Uses Azure REST API version 2021-11-01-preview. In version 2.x of the Azure Native provider, it used API version 2021-11-01-preview.
Example Usage
Register access policy entity.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var accessPolicy = new AzureNative.VideoAnalyzer.AccessPolicy("accessPolicy", new()
{
AccessPolicyName = "accessPolicyName1",
AccountName = "testaccount2",
Authentication = new AzureNative.VideoAnalyzer.Inputs.JwtAuthenticationArgs
{
Audiences = new[]
{
"audience1",
},
Claims = new[]
{
new AzureNative.VideoAnalyzer.Inputs.TokenClaimArgs
{
Name = "claimname1",
Value = "claimvalue1",
},
new AzureNative.VideoAnalyzer.Inputs.TokenClaimArgs
{
Name = "claimname2",
Value = "claimvalue2",
},
},
Issuers = new[]
{
"issuer1",
"issuer2",
},
Keys =
{
new AzureNative.VideoAnalyzer.Inputs.RsaTokenKeyArgs
{
Alg = AzureNative.VideoAnalyzer.AccessPolicyRsaAlgo.RS256,
E = "ZLFzZTY0IQ==",
Kid = "123",
N = "YmFzZTY0IQ==",
Type = "#Microsoft.VideoAnalyzer.RsaTokenKey",
},
new AzureNative.VideoAnalyzer.Inputs.EccTokenKeyArgs
{
Alg = AzureNative.VideoAnalyzer.AccessPolicyEccAlgo.ES256,
Kid = "124",
Type = "#Microsoft.VideoAnalyzer.EccTokenKey",
X = "XX==",
Y = "YY==",
},
},
Type = "#Microsoft.VideoAnalyzer.JwtAuthentication",
},
ResourceGroupName = "testrg",
});
});
Content copied to clipboard
package main
import (
videoanalyzer "github.com/pulumi/pulumi-azure-native-sdk/videoanalyzer/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := videoanalyzer.NewAccessPolicy(ctx, "accessPolicy", &videoanalyzer.AccessPolicyArgs{
AccessPolicyName: pulumi.String("accessPolicyName1"),
AccountName: pulumi.String("testaccount2"),
Authentication: &videoanalyzer.JwtAuthenticationArgs{
Audiences: pulumi.StringArray{
pulumi.String("audience1"),
},
Claims: videoanalyzer.TokenClaimArray{
&videoanalyzer.TokenClaimArgs{
Name: pulumi.String("claimname1"),
Value: pulumi.String("claimvalue1"),
},
&videoanalyzer.TokenClaimArgs{
Name: pulumi.String("claimname2"),
Value: pulumi.String("claimvalue2"),
},
},
Issuers: pulumi.StringArray{
pulumi.String("issuer1"),
pulumi.String("issuer2"),
},
Keys: pulumi.Array{
videoanalyzer.RsaTokenKey{
Alg: videoanalyzer.AccessPolicyRsaAlgoRS256,
E: "ZLFzZTY0IQ==",
Kid: "123",
N: "YmFzZTY0IQ==",
Type: "#Microsoft.VideoAnalyzer.RsaTokenKey",
},
videoanalyzer.EccTokenKey{
Alg: videoanalyzer.AccessPolicyEccAlgoES256,
Kid: "124",
Type: "#Microsoft.VideoAnalyzer.EccTokenKey",
X: "XX==",
Y: "YY==",
},
},
Type: pulumi.String("#Microsoft.VideoAnalyzer.JwtAuthentication"),
},
ResourceGroupName: pulumi.String("testrg"),
})
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.azurenative.videoanalyzer.AccessPolicy;
import com.pulumi.azurenative.videoanalyzer.AccessPolicyArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.JwtAuthenticationArgs;
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("accessPolicyName1")
.accountName("testaccount2")
.authentication(JwtAuthenticationArgs.builder()
.audiences("audience1")
.claims(
TokenClaimArgs.builder()
.name("claimname1")
.value("claimvalue1")
.build(),
TokenClaimArgs.builder()
.name("claimname2")
.value("claimvalue2")
.build())
.issuers(
"issuer1",
"issuer2")
.keys(
RsaTokenKeyArgs.builder()
.alg("RS256")
.e("ZLFzZTY0IQ==")
.kid("123")
.n("YmFzZTY0IQ==")
.type("#Microsoft.VideoAnalyzer.RsaTokenKey")
.build(),
EccTokenKeyArgs.builder()
.alg("ES256")
.kid("124")
.type("#Microsoft.VideoAnalyzer.EccTokenKey")
.x("XX==")
.y("YY==")
.build())
.type("#Microsoft.VideoAnalyzer.JwtAuthentication")
.build())
.resourceGroupName("testrg")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:videoanalyzer:AccessPolicy accessPolicyName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accessPolicyName: Output<String>? = null, accountName: Output<String>? = null, authentication: Output<JwtAuthenticationArgs>? = null, resourceGroupName: Output<String>? = null, role: Output<Either<String, AccessPolicyRole>>? = null)
Properties
Link copied to clipboard
The Access Policy name.
Link copied to clipboard
The Azure Video Analyzer account name.
Link copied to clipboard
Authentication method to be used when validating client API access.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
Defines the access level granted by this policy.