We recommend using Azure Native.
azure.storage.TableEntity
Explore with Pulumi AI
Manages an Entity within a Table in an Azure Storage Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "azureexample",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "azureexamplestorage1",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleTable = new azure.storage.Table("example", {
name: "myexampletable",
storageAccountName: exampleAccount.name,
});
const exampleTableEntity = new azure.storage.TableEntity("example", {
storageTableId: exampleTable.id,
partitionKey: "examplepartition",
rowKey: "examplerow",
entity: {
example: "example",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="azureexample",
location="West Europe")
example_account = azure.storage.Account("example",
name="azureexamplestorage1",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS")
example_table = azure.storage.Table("example",
name="myexampletable",
storage_account_name=example_account.name)
example_table_entity = azure.storage.TableEntity("example",
storage_table_id=example_table.id,
partition_key="examplepartition",
row_key="examplerow",
entity={
"example": "example",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"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.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("azureexample"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("azureexamplestorage1"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleTable, err := storage.NewTable(ctx, "example", &storage.TableArgs{
Name: pulumi.String("myexampletable"),
StorageAccountName: exampleAccount.Name,
})
if err != nil {
return err
}
_, err = storage.NewTableEntity(ctx, "example", &storage.TableEntityArgs{
StorageTableId: exampleTable.ID(),
PartitionKey: pulumi.String("examplepartition"),
RowKey: pulumi.String("examplerow"),
Entity: pulumi.StringMap{
"example": pulumi.String("example"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "azureexample",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "azureexamplestorage1",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleTable = new Azure.Storage.Table("example", new()
{
Name = "myexampletable",
StorageAccountName = exampleAccount.Name,
});
var exampleTableEntity = new Azure.Storage.TableEntity("example", new()
{
StorageTableId = exampleTable.Id,
PartitionKey = "examplepartition",
RowKey = "examplerow",
Entity =
{
{ "example", "example" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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.Table;
import com.pulumi.azure.storage.TableArgs;
import com.pulumi.azure.storage.TableEntity;
import com.pulumi.azure.storage.TableEntityArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("azureexample")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("azureexamplestorage1")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleTable = new Table("exampleTable", TableArgs.builder()
.name("myexampletable")
.storageAccountName(exampleAccount.name())
.build());
var exampleTableEntity = new TableEntity("exampleTableEntity", TableEntityArgs.builder()
.storageTableId(exampleTable.id())
.partitionKey("examplepartition")
.rowKey("examplerow")
.entity(Map.of("example", "example"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: azureexample
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: azureexamplestorage1
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
exampleTable:
type: azure:storage:Table
name: example
properties:
name: myexampletable
storageAccountName: ${exampleAccount.name}
exampleTableEntity:
type: azure:storage:TableEntity
name: example
properties:
storageTableId: ${exampleTable.id}
partitionKey: examplepartition
rowKey: examplerow
entity:
example: example
Create TableEntity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TableEntity(name: string, args: TableEntityArgs, opts?: CustomResourceOptions);
@overload
def TableEntity(resource_name: str,
args: TableEntityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TableEntity(resource_name: str,
opts: Optional[ResourceOptions] = None,
entity: Optional[Mapping[str, str]] = None,
partition_key: Optional[str] = None,
row_key: Optional[str] = None,
storage_table_id: Optional[str] = None)
func NewTableEntity(ctx *Context, name string, args TableEntityArgs, opts ...ResourceOption) (*TableEntity, error)
public TableEntity(string name, TableEntityArgs args, CustomResourceOptions? opts = null)
public TableEntity(String name, TableEntityArgs args)
public TableEntity(String name, TableEntityArgs args, CustomResourceOptions options)
type: azure:storage:TableEntity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TableEntityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TableEntityArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TableEntityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TableEntityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TableEntityArgs
- 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 tableEntityResource = new Azure.Storage.TableEntity("tableEntityResource", new()
{
Entity =
{
{ "string", "string" },
},
PartitionKey = "string",
RowKey = "string",
StorageTableId = "string",
});
example, err := storage.NewTableEntity(ctx, "tableEntityResource", &storage.TableEntityArgs{
Entity: pulumi.StringMap{
"string": pulumi.String("string"),
},
PartitionKey: pulumi.String("string"),
RowKey: pulumi.String("string"),
StorageTableId: pulumi.String("string"),
})
var tableEntityResource = new TableEntity("tableEntityResource", TableEntityArgs.builder()
.entity(Map.of("string", "string"))
.partitionKey("string")
.rowKey("string")
.storageTableId("string")
.build());
table_entity_resource = azure.storage.TableEntity("tableEntityResource",
entity={
"string": "string",
},
partition_key="string",
row_key="string",
storage_table_id="string")
const tableEntityResource = new azure.storage.TableEntity("tableEntityResource", {
entity: {
string: "string",
},
partitionKey: "string",
rowKey: "string",
storageTableId: "string",
});
type: azure:storage:TableEntity
properties:
entity:
string: string
partitionKey: string
rowKey: string
storageTableId: string
TableEntity 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 TableEntity resource accepts the following input properties:
- Entity Dictionary<string, string>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- Partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- Entity map[string]string
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- Partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Map<String,String>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key String - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key String - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table StringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity {[key: string]: string}
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Mapping[str, str]
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition_
key str - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row_
key str - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage_
table_ strid - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Map<String>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key String - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key String - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table StringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the TableEntity resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TableEntity Resource
Get an existing TableEntity 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?: TableEntityState, opts?: CustomResourceOptions): TableEntity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
entity: Optional[Mapping[str, str]] = None,
partition_key: Optional[str] = None,
row_key: Optional[str] = None,
storage_table_id: Optional[str] = None) -> TableEntity
func GetTableEntity(ctx *Context, name string, id IDInput, state *TableEntityState, opts ...ResourceOption) (*TableEntity, error)
public static TableEntity Get(string name, Input<string> id, TableEntityState? state, CustomResourceOptions? opts = null)
public static TableEntity get(String name, Output<String> id, TableEntityState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Entity Dictionary<string, string>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- Partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- Entity map[string]string
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- Partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- Storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Map<String,String>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key String - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key String - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table StringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity {[key: string]: string}
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key string - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key string - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table stringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Mapping[str, str]
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition_
key str - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row_
key str - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage_
table_ strid - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
- entity Map<String>
- A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
- partition
Key String - The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
- row
Key String - The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
- storage
Table StringId - The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created.
Import
Entities within a Table in an Azure Storage Account can be imported using the resource id
, e.g.
$ pulumi import azure:storage/tableEntity:TableEntity entity1 https://example.table.core.windows.net/table1(PartitionKey='samplepartition',RowKey='samplerow')
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.