tables Package

Packages

aio

Classes

AccountSasPermissions

AccountSasPermissions class to be used with generate_account_sas.

EntityMetadata
EntityProperty

An entity property. Used to explicitly set EdmType when necessary.

Values which require explicit typing are GUID, INT64, and BINARY. Other EdmTypes may be explicitly create as EntityProperty objects but need not be. For example, the below with both create STRING typed properties on the entity:


   entity = TableEntity()
   entity.a = 'b'
   entity.x = EntityProperty('y', EdmType.STRING)
RequestTooLargeError

An error response with status code 413 - Request Entity Too Large

ResourceTypes

Specifies the resource types that are accessible with the account SAS.

TableAccessPolicy

Access Policy class used by the set and get access policy methods.

A stored access policy can specify the start time, expiry time, and permissions for the Shared Access Signatures with which it's associated. Depending on how you want to control access to your resource, you can specify all of these parameters within the stored access policy, and omit them from the URL for the Shared Access Signature. Doing so permits you to modify the associated signature's behavior at any time, as well as to revoke it. Or you can specify one or more of the access policy parameters within the stored access policy, and the others on the URL. Finally, you can specify all of the parameters on the URL. In this case, you can use the stored access policy to revoke the signature, but not to modify its behavior.

Together the Shared Access Signature and the stored access policy must include all fields required to authenticate the signature. If any required fields are missing, the request will fail. Likewise, if a field is specified both in the Shared Access Signature URL and in the stored access policy, the request will fail with status code 400 (Bad Request).

TableAnalyticsLogging

Azure Analytics Logging settings.

TableClient

A client to interact with a specific Table in an Azure Tables account.

Create TableClient from a Credential.

TableCorsRule

CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.

TableEntity

An Entity dictionary with additional metadata

TableItem

Represents an Azure TableItem. Returned by TableServiceClient.list_tables and TableServiceClient.query_tables.

TableMetrics

A summary of request statistics grouped by API in hour or minute aggregates.

TableRetentionPolicy

The retention policy which determines how long the associated data should persist.

TableSasPermissions

TableSasPermissions class to be used with the generate_account_sas function.

TableServiceClient

A client to interact with the Table Service at the account level.

This client provides operations to retrieve and configure the account properties as well as list, create and delete tables within the account. For operations relating to a specific table, a client for this entity can be retrieved using the get_table_client function.

TableTransactionError

There is a failure in the transaction operations.

Enums

EdmType

Used by EntityProperty to represent the type of the entity property to be stored by the Table service.

SASProtocol
TableErrorCode
TransactionOperation
UpdateMode

Functions

generate_account_sas

Generates a shared access signature for the table service. Use the returned signature with the sas_token parameter of TableService.

generate_account_sas(credential: AzureNamedKeyCredential, resource_types: ResourceTypes, permission: str | AccountSasPermissions, expiry: datetime | str, **kwargs: Any) -> str

Parameters

Name Description
credential
Required

Credential for the Azure account

resource_types
Required

Specifies the resource types that are accessible with the account SAS.

permission
Required

The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy.

expiry
Required

The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.

Keyword-Only Parameters

Name Description
start

The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.

ip_address_or_range
str

Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address or address range specified on the SAS token, the request is not authenticated. For example, specifying sip=168.1.5.65 or sip=168.1.5.60-168.1.5.70 on the SAS restricts the request to those IP addresses.

protocol

Specifies the protocol permitted for a request made.

Returns

Type Description
str

A Shared Access Signature (sas) token.

generate_table_sas

Generates a shared access signature for the table service. Use the returned signature with the sas_token parameter of TableService.

generate_table_sas(credential: AzureNamedKeyCredential, table_name: str, **kwargs: Any) -> str

Parameters

Name Description
credential
Required

Credential used for creating Shared Access Signature

table_name
Required
str

Table name

Keyword-Only Parameters

Name Description
permission

The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy.

expiry

The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.

start

The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.

ip_address_or_range
str

Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address or address range specified on the SAS token, the request is not authenticated. For example, specifying sip=168.1.5.65 or sip=168.1.5.60-168.1.5.70 on the SAS restricts the request to those IP addresses.

policy_id
str

Access policy ID.

protocol

Specifies the protocol permitted for a request made.

start_rk
str

Starting row key

start_pk
str

Starting partition key

end_rk
str

End row key

end_pk
str

End partition key

Returns

Type Description
str

A Shared Access Signature (sas) token.