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>
Policy that determines how a video can be accessed. API Version: 2021-05-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 = "RS256",
E = "ZLFzZTY0IQ==",
Kid = "123",
N = "YmFzZTY0IQ==",
Type = "#Microsoft.VideoAnalyzer.RsaTokenKey",
},
new AzureNative.VideoAnalyzer.Inputs.EccTokenKeyArgs
{
Alg = "ES256",
Kid = "124",
Type = "#Microsoft.VideoAnalyzer.EccTokenKey",
X = "XX==",
Y = "YY==",
},
},
Type = "#Microsoft.VideoAnalyzer.JwtAuthentication",
},
ResourceGroupName = "testrg",
Role = "Reader",
});
});
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 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(Map.ofEntries(
Map.entry("audiences", "audience1"),
Map.entry("claims",
Map.ofEntries(
Map.entry("name", "claimname1"),
Map.entry("value", "claimvalue1")
),
Map.ofEntries(
Map.entry("name", "claimname2"),
Map.entry("value", "claimvalue2")
)),
Map.entry("issuers",
"issuer1",
"issuer2"),
Map.entry("keys",
Map.ofEntries(
Map.entry("alg", "RS256"),
Map.entry("e", "ZLFzZTY0IQ=="),
Map.entry("kid", "123"),
Map.entry("n", "YmFzZTY0IQ=="),
Map.entry("type", "#Microsoft.VideoAnalyzer.RsaTokenKey")
),
Map.ofEntries(
Map.entry("alg", "ES256"),
Map.entry("kid", "124"),
Map.entry("type", "#Microsoft.VideoAnalyzer.EccTokenKey"),
Map.entry("x", "XX=="),
Map.entry("y", "YY==")
)),
Map.entry("type", "#Microsoft.VideoAnalyzer.JwtAuthentication")
))
.resourceGroupName("testrg")
.role("Reader")
.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/591e76c3-3e97-44db-879c-3e2b12961b62/resourceGroups/testrg/providers/Microsoft.Media/videoAnalyzers/testaccount2/accesspolicies/accessPolicyName1
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 name of the access policy to create or update.
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.