GetAccessPolicy
Use this data source to access information about the permissions from the Management Key Vault Templates.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var contributor = Output.Create(Azure.KeyVault.GetAccessPolicy.InvokeAsync(new Azure.KeyVault.GetAccessPolicyArgs
{
Name = "Key Management",
}));
this.AccessPolicyKeyPermissions = contributor.Apply(contributor => contributor.KeyPermissions);
}
[Output("accessPolicyKeyPermissions")]
public Output<string> AccessPolicyKeyPermissions { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/keyvault"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
contributor, err := keyvault.LookupAccessPolicy(ctx, &keyvault.LookupAccessPolicyArgs{
Name: "Key Management",
}, nil)
if err != nil {
return err
}
ctx.Export("accessPolicyKeyPermissions", contributor.KeyPermissions)
return nil
})
}import pulumi
import pulumi_azure as azure
contributor = azure.keyvault.get_access_policy(name="Key Management")
pulumi.export("accessPolicyKeyPermissions", contributor.key_permissions)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const contributor = azure.keyvault.getAccessPolicy({
name: "Key Management",
});
export const accessPolicyKeyPermissions = contributor.then(contributor => contributor.keyPermissions);Using GetAccessPolicy
function getAccessPolicy(args: GetAccessPolicyArgs, opts?: InvokeOptions): Promise<GetAccessPolicyResult>function get_access_policy(name=None, opts=None)func LookupAccessPolicy(ctx *Context, args *LookupAccessPolicyArgs, opts ...InvokeOption) (*LookupAccessPolicyResult, error)Note: This function is named
LookupAccessPolicyin the Go SDK.
public static class GetAccessPolicy {
public static Task<GetAccessPolicyResult> InvokeAsync(GetAccessPolicyArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetAccessPolicy Result
The following output properties are available:
- Certificate
Permissions List<string> the certificate permissions for the access policy
- Id string
The provider-assigned unique ID for this managed resource.
- Key
Permissions List<string> the key permissions for the access policy
- Name string
- Secret
Permissions List<string> the secret permissions for the access policy
- Certificate
Permissions []string the certificate permissions for the access policy
- Id string
The provider-assigned unique ID for this managed resource.
- Key
Permissions []string the key permissions for the access policy
- Name string
- Secret
Permissions []string the secret permissions for the access policy
- certificate
Permissions string[] the certificate permissions for the access policy
- id string
The provider-assigned unique ID for this managed resource.
- key
Permissions string[] the key permissions for the access policy
- name string
- secret
Permissions string[] the secret permissions for the access policy
- certificate_
permissions List[str] the certificate permissions for the access policy
- id str
The provider-assigned unique ID for this managed resource.
- key_
permissions List[str] the key permissions for the access policy
- name str
- secret_
permissions List[str] the secret permissions for the access policy
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.