tables Package

Packages

aio

Classes

AccountSasPermissions

AccountSasPermissions class to be used with generate_account_sas

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.

All required parameters must be populated in order to send to Azure.

TableClient

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

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.

All required parameters must be populated in order to send to Azure.

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.

All required parameters must be populated in order to send to Azure.

TableRetentionPolicy
TableSasPermissions
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

An enumeration.

TableErrorCode

An enumeration.

TransactionOperation

An enumeration.

UpdateMode

An enumeration.

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, resource_types, permission, expiry, **kwargs)

Parameters

credential
AzureNamedKeyCredential
Required

Credential for the Azure account

resource_types
ResourceTypes
Required

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

permission
str or AccountSasPermissions
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
datetime or str
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.

start
datetime or str

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
str or SASProtocol

Specifies the protocol permitted for a request made.

Returns

A Shared Access Signature (sas) token.

Return type

str

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, table_name, **kwargs)

Parameters

credential
AzureNamedKeyCredential
Required

Credential used for creating Shared Access Signature

table_name
str
Required

Table name

permission
TableSasPermissions

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
datetime or str

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
datetime or str

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
str or SASProtocol

Specifies the protocol permitted for a request made.

end_rk
str

End row key

end_pk
str

End partition key

start_rk
str

Starting row key

start_pk
str

Starting partition key

Returns

A Shared Access Signature (sas) token.

Return type

str