1. Packages
  2. Azure Classic
  3. API Docs
  4. keyvault
  5. ManagedStorageAccountSasTokenDefinition

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi

azure.keyvault.ManagedStorageAccountSasTokenDefinition

Explore with Pulumi AI

Manages a Key Vault Managed Storage Account SAS Definition.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
    name: "storageaccountname",
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
});
const exampleGetAccountSAS = azure.storage.getAccountSASOutput({
    connectionString: exampleAccount.primaryConnectionString,
    httpsOnly: true,
    resourceTypes: {
        service: true,
        container: false,
        object: false,
    },
    services: {
        blob: true,
        queue: false,
        table: false,
        file: false,
    },
    start: "2021-04-30T00:00:00Z",
    expiry: "2023-04-30T00:00:00Z",
    permissions: {
        read: true,
        write: true,
        "delete": false,
        list: false,
        add: true,
        create: true,
        update: false,
        process: false,
        tag: false,
        filter: false,
    },
});
const exampleKeyVault = new azure.keyvault.KeyVault("example", {
    name: "example-keyvault",
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    tenantId: example.then(example => example.tenantId),
    skuName: "standard",
    accessPolicies: [{
        tenantId: example.then(example => example.tenantId),
        objectId: example.then(example => example.objectId),
        secretPermissions: [
            "Get",
            "Delete",
        ],
        storagePermissions: [
            "Get",
            "List",
            "Set",
            "SetSAS",
            "GetSAS",
            "DeleteSAS",
            "Update",
            "RegenerateKey",
        ],
    }],
});
const exampleManagedStorageAccount = new azure.keyvault.ManagedStorageAccount("example", {
    name: "examplemanagedstorage",
    keyVaultId: exampleKeyVault.id,
    storageAccountId: exampleAccount.id,
    storageAccountKey: "key1",
    regenerateKeyAutomatically: false,
    regenerationPeriod: "P1D",
});
const exampleManagedStorageAccountSasTokenDefinition = new azure.keyvault.ManagedStorageAccountSasTokenDefinition("example", {
    name: "examplesasdefinition",
    validityPeriod: "P1D",
    managedStorageAccountId: exampleManagedStorageAccount.id,
    sasTemplateUri: exampleGetAccountSAS.apply(exampleGetAccountSAS => exampleGetAccountSAS.sas),
    sasType: "account",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_account = azure.storage.Account("example",
    name="storageaccountname",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_get_account_sas = azure.storage.get_account_sas_output(connection_string=example_account.primary_connection_string,
    https_only=True,
    resource_types={
        "service": True,
        "container": False,
        "object": False,
    },
    services={
        "blob": True,
        "queue": False,
        "table": False,
        "file": False,
    },
    start="2021-04-30T00:00:00Z",
    expiry="2023-04-30T00:00:00Z",
    permissions={
        "read": True,
        "write": True,
        "delete": False,
        "list": False,
        "add": True,
        "create": True,
        "update": False,
        "process": False,
        "tag": False,
        "filter": False,
    })
example_key_vault = azure.keyvault.KeyVault("example",
    name="example-keyvault",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    tenant_id=example.tenant_id,
    sku_name="standard",
    access_policies=[{
        "tenant_id": example.tenant_id,
        "object_id": example.object_id,
        "secret_permissions": [
            "Get",
            "Delete",
        ],
        "storage_permissions": [
            "Get",
            "List",
            "Set",
            "SetSAS",
            "GetSAS",
            "DeleteSAS",
            "Update",
            "RegenerateKey",
        ],
    }])
example_managed_storage_account = azure.keyvault.ManagedStorageAccount("example",
    name="examplemanagedstorage",
    key_vault_id=example_key_vault.id,
    storage_account_id=example_account.id,
    storage_account_key="key1",
    regenerate_key_automatically=False,
    regeneration_period="P1D")
example_managed_storage_account_sas_token_definition = azure.keyvault.ManagedStorageAccountSasTokenDefinition("example",
    name="examplesasdefinition",
    validity_period="P1D",
    managed_storage_account_id=example_managed_storage_account.id,
    sas_template_uri=example_get_account_sas.sas,
    sas_type="account")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("storageaccountname"),
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		exampleGetAccountSAS := storage.GetAccountSASOutput(ctx, storage.GetAccountSASOutputArgs{
			ConnectionString: exampleAccount.PrimaryConnectionString,
			HttpsOnly:        pulumi.Bool(true),
			ResourceTypes: &storage.GetAccountSASResourceTypesArgs{
				Service:   pulumi.Bool(true),
				Container: pulumi.Bool(false),
				Object:    pulumi.Bool(false),
			},
			Services: &storage.GetAccountSASServicesArgs{
				Blob:  pulumi.Bool(true),
				Queue: pulumi.Bool(false),
				Table: pulumi.Bool(false),
				File:  pulumi.Bool(false),
			},
			Start:  pulumi.String("2021-04-30T00:00:00Z"),
			Expiry: pulumi.String("2023-04-30T00:00:00Z"),
			Permissions: &storage.GetAccountSASPermissionsArgs{
				Read:    pulumi.Bool(true),
				Write:   pulumi.Bool(true),
				Delete:  pulumi.Bool(false),
				List:    pulumi.Bool(false),
				Add:     pulumi.Bool(true),
				Create:  pulumi.Bool(true),
				Update:  pulumi.Bool(false),
				Process: pulumi.Bool(false),
				Tag:     pulumi.Bool(false),
				Filter:  pulumi.Bool(false),
			},
		}, nil)
		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
			Name:              pulumi.String("example-keyvault"),
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			TenantId:          pulumi.String(example.TenantId),
			SkuName:           pulumi.String("standard"),
			AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
				&keyvault.KeyVaultAccessPolicyArgs{
					TenantId: pulumi.String(example.TenantId),
					ObjectId: pulumi.String(example.ObjectId),
					SecretPermissions: pulumi.StringArray{
						pulumi.String("Get"),
						pulumi.String("Delete"),
					},
					StoragePermissions: pulumi.StringArray{
						pulumi.String("Get"),
						pulumi.String("List"),
						pulumi.String("Set"),
						pulumi.String("SetSAS"),
						pulumi.String("GetSAS"),
						pulumi.String("DeleteSAS"),
						pulumi.String("Update"),
						pulumi.String("RegenerateKey"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		exampleManagedStorageAccount, err := keyvault.NewManagedStorageAccount(ctx, "example", &keyvault.ManagedStorageAccountArgs{
			Name:                       pulumi.String("examplemanagedstorage"),
			KeyVaultId:                 exampleKeyVault.ID(),
			StorageAccountId:           exampleAccount.ID(),
			StorageAccountKey:          pulumi.String("key1"),
			RegenerateKeyAutomatically: pulumi.Bool(false),
			RegenerationPeriod:         pulumi.String("P1D"),
		})
		if err != nil {
			return err
		}
		_, err = keyvault.NewManagedStorageAccountSasTokenDefinition(ctx, "example", &keyvault.ManagedStorageAccountSasTokenDefinitionArgs{
			Name:                    pulumi.String("examplesasdefinition"),
			ValidityPeriod:          pulumi.String("P1D"),
			ManagedStorageAccountId: exampleManagedStorageAccount.ID(),
			SasTemplateUri: pulumi.String(exampleGetAccountSAS.ApplyT(func(exampleGetAccountSAS storage.GetAccountSASResult) (*string, error) {
				return &exampleGetAccountSAS.Sas, nil
			}).(pulumi.StringPtrOutput)),
			SasType: pulumi.String("account"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Core.GetClientConfig.Invoke();

    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "storageaccountname",
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });

    var exampleGetAccountSAS = Azure.Storage.GetAccountSAS.Invoke(new()
    {
        ConnectionString = exampleAccount.PrimaryConnectionString,
        HttpsOnly = true,
        ResourceTypes = new Azure.Storage.Inputs.GetAccountSASResourceTypesInputArgs
        {
            Service = true,
            Container = false,
            Object = false,
        },
        Services = new Azure.Storage.Inputs.GetAccountSASServicesInputArgs
        {
            Blob = true,
            Queue = false,
            Table = false,
            File = false,
        },
        Start = "2021-04-30T00:00:00Z",
        Expiry = "2023-04-30T00:00:00Z",
        Permissions = new Azure.Storage.Inputs.GetAccountSASPermissionsInputArgs
        {
            Read = true,
            Write = true,
            Delete = false,
            List = false,
            Add = true,
            Create = true,
            Update = false,
            Process = false,
            Tag = false,
            Filter = false,
        },
    });

    var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
    {
        Name = "example-keyvault",
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        TenantId = example.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        SkuName = "standard",
        AccessPolicies = new[]
        {
            new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
            {
                TenantId = example.Apply(getClientConfigResult => getClientConfigResult.TenantId),
                ObjectId = example.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
                SecretPermissions = new[]
                {
                    "Get",
                    "Delete",
                },
                StoragePermissions = new[]
                {
                    "Get",
                    "List",
                    "Set",
                    "SetSAS",
                    "GetSAS",
                    "DeleteSAS",
                    "Update",
                    "RegenerateKey",
                },
            },
        },
    });

    var exampleManagedStorageAccount = new Azure.KeyVault.ManagedStorageAccount("example", new()
    {
        Name = "examplemanagedstorage",
        KeyVaultId = exampleKeyVault.Id,
        StorageAccountId = exampleAccount.Id,
        StorageAccountKey = "key1",
        RegenerateKeyAutomatically = false,
        RegenerationPeriod = "P1D",
    });

    var exampleManagedStorageAccountSasTokenDefinition = new Azure.KeyVault.ManagedStorageAccountSasTokenDefinition("example", new()
    {
        Name = "examplesasdefinition",
        ValidityPeriod = "P1D",
        ManagedStorageAccountId = exampleManagedStorageAccount.Id,
        SasTemplateUri = exampleGetAccountSAS.Apply(getAccountSASResult => getAccountSASResult.Sas),
        SasType = "account",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.StorageFunctions;
import com.pulumi.azure.storage.inputs.GetAccountSASArgs;
import com.pulumi.azure.storage.inputs.GetAccountSASResourceTypesArgs;
import com.pulumi.azure.storage.inputs.GetAccountSASServicesArgs;
import com.pulumi.azure.storage.inputs.GetAccountSASPermissionsArgs;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;
import com.pulumi.azure.keyvault.ManagedStorageAccount;
import com.pulumi.azure.keyvault.ManagedStorageAccountArgs;
import com.pulumi.azure.keyvault.ManagedStorageAccountSasTokenDefinition;
import com.pulumi.azure.keyvault.ManagedStorageAccountSasTokenDefinitionArgs;
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) {
        final var example = CoreFunctions.getClientConfig();

        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("storageaccountname")
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .build());

        final var exampleGetAccountSAS = StorageFunctions.getAccountSAS(GetAccountSASArgs.builder()
            .connectionString(exampleAccount.primaryConnectionString())
            .httpsOnly(true)
            .resourceTypes(GetAccountSASResourceTypesArgs.builder()
                .service(true)
                .container(false)
                .object(false)
                .build())
            .services(GetAccountSASServicesArgs.builder()
                .blob(true)
                .queue(false)
                .table(false)
                .file(false)
                .build())
            .start("2021-04-30T00:00:00Z")
            .expiry("2023-04-30T00:00:00Z")
            .permissions(GetAccountSASPermissionsArgs.builder()
                .read(true)
                .write(true)
                .delete(false)
                .list(false)
                .add(true)
                .create(true)
                .update(false)
                .process(false)
                .tag(false)
                .filter(false)
                .build())
            .build());

        var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
            .name("example-keyvault")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .tenantId(example.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
            .skuName("standard")
            .accessPolicies(KeyVaultAccessPolicyArgs.builder()
                .tenantId(example.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .objectId(example.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
                .secretPermissions(                
                    "Get",
                    "Delete")
                .storagePermissions(                
                    "Get",
                    "List",
                    "Set",
                    "SetSAS",
                    "GetSAS",
                    "DeleteSAS",
                    "Update",
                    "RegenerateKey")
                .build())
            .build());

        var exampleManagedStorageAccount = new ManagedStorageAccount("exampleManagedStorageAccount", ManagedStorageAccountArgs.builder()
            .name("examplemanagedstorage")
            .keyVaultId(exampleKeyVault.id())
            .storageAccountId(exampleAccount.id())
            .storageAccountKey("key1")
            .regenerateKeyAutomatically(false)
            .regenerationPeriod("P1D")
            .build());

        var exampleManagedStorageAccountSasTokenDefinition = new ManagedStorageAccountSasTokenDefinition("exampleManagedStorageAccountSasTokenDefinition", ManagedStorageAccountSasTokenDefinitionArgs.builder()
            .name("examplesasdefinition")
            .validityPeriod("P1D")
            .managedStorageAccountId(exampleManagedStorageAccount.id())
            .sasTemplateUri(exampleGetAccountSAS.applyValue(getAccountSASResult -> getAccountSASResult).applyValue(exampleGetAccountSAS -> exampleGetAccountSAS.applyValue(getAccountSASResult -> getAccountSASResult.sas())))
            .sasType("account")
            .build());

    }
}
Copy
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: storageaccountname
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleKeyVault:
    type: azure:keyvault:KeyVault
    name: example
    properties:
      name: example-keyvault
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      tenantId: ${example.tenantId}
      skuName: standard
      accessPolicies:
        - tenantId: ${example.tenantId}
          objectId: ${example.objectId}
          secretPermissions:
            - Get
            - Delete
          storagePermissions:
            - Get
            - List
            - Set
            - SetSAS
            - GetSAS
            - DeleteSAS
            - Update
            - RegenerateKey
  exampleManagedStorageAccount:
    type: azure:keyvault:ManagedStorageAccount
    name: example
    properties:
      name: examplemanagedstorage
      keyVaultId: ${exampleKeyVault.id}
      storageAccountId: ${exampleAccount.id}
      storageAccountKey: key1
      regenerateKeyAutomatically: false
      regenerationPeriod: P1D
  exampleManagedStorageAccountSasTokenDefinition:
    type: azure:keyvault:ManagedStorageAccountSasTokenDefinition
    name: example
    properties:
      name: examplesasdefinition
      validityPeriod: P1D
      managedStorageAccountId: ${exampleManagedStorageAccount.id}
      sasTemplateUri: ${exampleGetAccountSAS.sas}
      sasType: account
variables:
  example:
    fn::invoke:
      function: azure:core:getClientConfig
      arguments: {}
  exampleGetAccountSAS:
    fn::invoke:
      function: azure:storage:getAccountSAS
      arguments:
        connectionString: ${exampleAccount.primaryConnectionString}
        httpsOnly: true
        resourceTypes:
          service: true
          container: false
          object: false
        services:
          blob: true
          queue: false
          table: false
          file: false
        start: 2021-04-30T00:00:00Z
        expiry: 2023-04-30T00:00:00Z
        permissions:
          read: true
          write: true
          delete: false
          list: false
          add: true
          create: true
          update: false
          process: false
          tag: false
          filter: false
Copy

Create ManagedStorageAccountSasTokenDefinition Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ManagedStorageAccountSasTokenDefinition(name: string, args: ManagedStorageAccountSasTokenDefinitionArgs, opts?: CustomResourceOptions);
@overload
def ManagedStorageAccountSasTokenDefinition(resource_name: str,
                                            args: ManagedStorageAccountSasTokenDefinitionArgs,
                                            opts: Optional[ResourceOptions] = None)

@overload
def ManagedStorageAccountSasTokenDefinition(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            managed_storage_account_id: Optional[str] = None,
                                            sas_template_uri: Optional[str] = None,
                                            sas_type: Optional[str] = None,
                                            validity_period: Optional[str] = None,
                                            name: Optional[str] = None,
                                            tags: Optional[Mapping[str, str]] = None)
func NewManagedStorageAccountSasTokenDefinition(ctx *Context, name string, args ManagedStorageAccountSasTokenDefinitionArgs, opts ...ResourceOption) (*ManagedStorageAccountSasTokenDefinition, error)
public ManagedStorageAccountSasTokenDefinition(string name, ManagedStorageAccountSasTokenDefinitionArgs args, CustomResourceOptions? opts = null)
public ManagedStorageAccountSasTokenDefinition(String name, ManagedStorageAccountSasTokenDefinitionArgs args)
public ManagedStorageAccountSasTokenDefinition(String name, ManagedStorageAccountSasTokenDefinitionArgs args, CustomResourceOptions options)
type: azure:keyvault:ManagedStorageAccountSasTokenDefinition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ManagedStorageAccountSasTokenDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ManagedStorageAccountSasTokenDefinitionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedStorageAccountSasTokenDefinitionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedStorageAccountSasTokenDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ManagedStorageAccountSasTokenDefinitionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var managedStorageAccountSasTokenDefinitionResource = new Azure.KeyVault.ManagedStorageAccountSasTokenDefinition("managedStorageAccountSasTokenDefinitionResource", new()
{
    ManagedStorageAccountId = "string",
    SasTemplateUri = "string",
    SasType = "string",
    ValidityPeriod = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := keyvault.NewManagedStorageAccountSasTokenDefinition(ctx, "managedStorageAccountSasTokenDefinitionResource", &keyvault.ManagedStorageAccountSasTokenDefinitionArgs{
	ManagedStorageAccountId: pulumi.String("string"),
	SasTemplateUri:          pulumi.String("string"),
	SasType:                 pulumi.String("string"),
	ValidityPeriod:          pulumi.String("string"),
	Name:                    pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var managedStorageAccountSasTokenDefinitionResource = new ManagedStorageAccountSasTokenDefinition("managedStorageAccountSasTokenDefinitionResource", ManagedStorageAccountSasTokenDefinitionArgs.builder()
    .managedStorageAccountId("string")
    .sasTemplateUri("string")
    .sasType("string")
    .validityPeriod("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
managed_storage_account_sas_token_definition_resource = azure.keyvault.ManagedStorageAccountSasTokenDefinition("managedStorageAccountSasTokenDefinitionResource",
    managed_storage_account_id="string",
    sas_template_uri="string",
    sas_type="string",
    validity_period="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const managedStorageAccountSasTokenDefinitionResource = new azure.keyvault.ManagedStorageAccountSasTokenDefinition("managedStorageAccountSasTokenDefinitionResource", {
    managedStorageAccountId: "string",
    sasTemplateUri: "string",
    sasType: "string",
    validityPeriod: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure:keyvault:ManagedStorageAccountSasTokenDefinition
properties:
    managedStorageAccountId: string
    name: string
    sasTemplateUri: string
    sasType: string
    tags:
        string: string
    validityPeriod: string
Copy

ManagedStorageAccountSasTokenDefinition Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ManagedStorageAccountSasTokenDefinition resource accepts the following input properties:

ManagedStorageAccountId This property is required. string
The ID of the Managed Storage Account.
SasTemplateUri This property is required. string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
SasType This property is required. string
The type of SAS token the SAS definition will create. Possible values are account and service.
ValidityPeriod This property is required. string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
Name string
The name which should be used for this SAS Definition.
Tags Changes to this property will trigger replacement. Dictionary<string, string>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
ManagedStorageAccountId This property is required. string
The ID of the Managed Storage Account.
SasTemplateUri This property is required. string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
SasType This property is required. string
The type of SAS token the SAS definition will create. Possible values are account and service.
ValidityPeriod This property is required. string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
Name string
The name which should be used for this SAS Definition.
Tags Changes to this property will trigger replacement. map[string]string
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
managedStorageAccountId This property is required. String
The ID of the Managed Storage Account.
sasTemplateUri This property is required. String
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType This property is required. String
The type of SAS token the SAS definition will create. Possible values are account and service.
validityPeriod This property is required. String
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
name String
The name which should be used for this SAS Definition.
tags Changes to this property will trigger replacement. Map<String,String>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
managedStorageAccountId This property is required. string
The ID of the Managed Storage Account.
sasTemplateUri This property is required. string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType This property is required. string
The type of SAS token the SAS definition will create. Possible values are account and service.
validityPeriod This property is required. string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
name string
The name which should be used for this SAS Definition.
tags Changes to this property will trigger replacement. {[key: string]: string}
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
managed_storage_account_id This property is required. str
The ID of the Managed Storage Account.
sas_template_uri This property is required. str
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sas_type This property is required. str
The type of SAS token the SAS definition will create. Possible values are account and service.
validity_period This property is required. str
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
name str
The name which should be used for this SAS Definition.
tags Changes to this property will trigger replacement. Mapping[str, str]
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
managedStorageAccountId This property is required. String
The ID of the Managed Storage Account.
sasTemplateUri This property is required. String
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType This property is required. String
The type of SAS token the SAS definition will create. Possible values are account and service.
validityPeriod This property is required. String
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
name String
The name which should be used for this SAS Definition.
tags Changes to this property will trigger replacement. Map<String>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the ManagedStorageAccountSasTokenDefinition resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
SecretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
Id string
The provider-assigned unique ID for this managed resource.
SecretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
id String
The provider-assigned unique ID for this managed resource.
secretId String
The ID of the Secret that is created by Managed Storage Account SAS Definition.
id string
The provider-assigned unique ID for this managed resource.
secretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
id str
The provider-assigned unique ID for this managed resource.
secret_id str
The ID of the Secret that is created by Managed Storage Account SAS Definition.
id String
The provider-assigned unique ID for this managed resource.
secretId String
The ID of the Secret that is created by Managed Storage Account SAS Definition.

Look up Existing ManagedStorageAccountSasTokenDefinition Resource

Get an existing ManagedStorageAccountSasTokenDefinition 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?: ManagedStorageAccountSasTokenDefinitionState, opts?: CustomResourceOptions): ManagedStorageAccountSasTokenDefinition
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        managed_storage_account_id: Optional[str] = None,
        name: Optional[str] = None,
        sas_template_uri: Optional[str] = None,
        sas_type: Optional[str] = None,
        secret_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        validity_period: Optional[str] = None) -> ManagedStorageAccountSasTokenDefinition
func GetManagedStorageAccountSasTokenDefinition(ctx *Context, name string, id IDInput, state *ManagedStorageAccountSasTokenDefinitionState, opts ...ResourceOption) (*ManagedStorageAccountSasTokenDefinition, error)
public static ManagedStorageAccountSasTokenDefinition Get(string name, Input<string> id, ManagedStorageAccountSasTokenDefinitionState? state, CustomResourceOptions? opts = null)
public static ManagedStorageAccountSasTokenDefinition get(String name, Output<String> id, ManagedStorageAccountSasTokenDefinitionState state, CustomResourceOptions options)
resources:  _:    type: azure:keyvault:ManagedStorageAccountSasTokenDefinition    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ManagedStorageAccountId string
The ID of the Managed Storage Account.
Name string
The name which should be used for this SAS Definition.
SasTemplateUri string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
SasType string
The type of SAS token the SAS definition will create. Possible values are account and service.
SecretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
Tags Changes to this property will trigger replacement. Dictionary<string, string>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
ValidityPeriod string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
ManagedStorageAccountId string
The ID of the Managed Storage Account.
Name string
The name which should be used for this SAS Definition.
SasTemplateUri string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
SasType string
The type of SAS token the SAS definition will create. Possible values are account and service.
SecretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
Tags Changes to this property will trigger replacement. map[string]string
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
ValidityPeriod string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
managedStorageAccountId String
The ID of the Managed Storage Account.
name String
The name which should be used for this SAS Definition.
sasTemplateUri String
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType String
The type of SAS token the SAS definition will create. Possible values are account and service.
secretId String
The ID of the Secret that is created by Managed Storage Account SAS Definition.
tags Changes to this property will trigger replacement. Map<String,String>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
validityPeriod String
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
managedStorageAccountId string
The ID of the Managed Storage Account.
name string
The name which should be used for this SAS Definition.
sasTemplateUri string
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType string
The type of SAS token the SAS definition will create. Possible values are account and service.
secretId string
The ID of the Secret that is created by Managed Storage Account SAS Definition.
tags Changes to this property will trigger replacement. {[key: string]: string}
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
validityPeriod string
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
managed_storage_account_id str
The ID of the Managed Storage Account.
name str
The name which should be used for this SAS Definition.
sas_template_uri str
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sas_type str
The type of SAS token the SAS definition will create. Possible values are account and service.
secret_id str
The ID of the Secret that is created by Managed Storage Account SAS Definition.
tags Changes to this property will trigger replacement. Mapping[str, str]
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
validity_period str
Validity period of SAS token. Value needs to be in ISO 8601 duration format.
managedStorageAccountId String
The ID of the Managed Storage Account.
name String
The name which should be used for this SAS Definition.
sasTemplateUri String
The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period.
sasType String
The type of SAS token the SAS definition will create. Possible values are account and service.
secretId String
The ID of the Secret that is created by Managed Storage Account SAS Definition.
tags Changes to this property will trigger replacement. Map<String>
A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created.
validityPeriod String
Validity period of SAS token. Value needs to be in ISO 8601 duration format.

Import

Key Vaults can be imported using the resource id, e.g.

$ pulumi import azure:keyvault/managedStorageAccountSasTokenDefinition:ManagedStorageAccountSasTokenDefinition example https://example-keyvault.vault.azure.net/storage/exampleStorageAcc01/sas/exampleSasDefinition01
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.