README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/tableservice
Documentation
The tableservice
SDK allows for interaction with the Azure Resource Manager Service storage
(API Version 2023-05-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/tableservice"
Client Initialization
client := tableservice.NewTableServiceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: TableServiceClient.TableCreate
ctx := context.TODO()
id := tableservice.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "tableValue")
payload := tableservice.Table{
// ...
}
read, err := client.TableCreate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TableServiceClient.TableDelete
ctx := context.TODO()
id := tableservice.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "tableValue")
read, err := client.TableDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TableServiceClient.TableGet
ctx := context.TODO()
id := tableservice.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "tableValue")
read, err := client.TableGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TableServiceClient.TableList
ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue")
// alternatively `client.TableList(ctx, id)` can be used to do batched pagination
items, err := client.TableListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: TableServiceClient.TableUpdate
ctx := context.TODO()
id := tableservice.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "tableValue")
payload := tableservice.Table{
// ...
}
read, err := client.TableUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func ValidateTableID(input interface{}, key string) (warnings []string, errors []error)
- type Table
- type TableAccessPolicy
- type TableCreateOperationResponse
- type TableDeleteOperationResponse
- type TableGetOperationResponse
- type TableId
- type TableListCompleteResult
- type TableListOperationResponse
- type TableOperationPredicate
- type TableProperties
- type TableServiceClient
- func (c TableServiceClient) TableCreate(ctx context.Context, id TableId, input Table) (result TableCreateOperationResponse, err error)
- func (c TableServiceClient) TableDelete(ctx context.Context, id TableId) (result TableDeleteOperationResponse, err error)
- func (c TableServiceClient) TableGet(ctx context.Context, id TableId) (result TableGetOperationResponse, err error)
- func (c TableServiceClient) TableList(ctx context.Context, id commonids.StorageAccountId) (result TableListOperationResponse, err error)
- func (c TableServiceClient) TableListComplete(ctx context.Context, id commonids.StorageAccountId) (TableListCompleteResult, error)
- func (c TableServiceClient) TableListCompleteMatchingPredicate(ctx context.Context, id commonids.StorageAccountId, ...) (result TableListCompleteResult, err error)
- func (c TableServiceClient) TableUpdate(ctx context.Context, id TableId, input Table) (result TableUpdateOperationResponse, err error)
- type TableSignedIdentifier
- type TableUpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateTableID ¶
ValidateTableID checks that 'input' can be parsed as a Table ID
Types ¶
type Table ¶
type Table struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *TableProperties `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` }
type TableAccessPolicy ¶
type TableAccessPolicy struct { ExpiryTime *string `json:"expiryTime,omitempty"` Permission string `json:"permission"` StartTime *string `json:"startTime,omitempty"` }
func (*TableAccessPolicy) GetExpiryTimeAsTime ¶
func (o *TableAccessPolicy) GetExpiryTimeAsTime() (*time.Time, error)
func (*TableAccessPolicy) GetStartTimeAsTime ¶
func (o *TableAccessPolicy) GetStartTimeAsTime() (*time.Time, error)
func (*TableAccessPolicy) SetExpiryTimeAsTime ¶
func (o *TableAccessPolicy) SetExpiryTimeAsTime(input time.Time)
func (*TableAccessPolicy) SetStartTimeAsTime ¶
func (o *TableAccessPolicy) SetStartTimeAsTime(input time.Time)
type TableId ¶
type TableId struct { SubscriptionId string ResourceGroupName string StorageAccountName string TableName string }
TableId is a struct representing the Resource ID for a Table
func NewTableID ¶
func NewTableID(subscriptionId string, resourceGroupName string, storageAccountName string, tableName string) TableId
NewTableID returns a new TableId struct
func ParseTableID ¶
ParseTableID parses 'input' into a TableId
func ParseTableIDInsensitively ¶
ParseTableIDInsensitively parses 'input' case-insensitively into a TableId note: this method should only be used for API response data and not user input
func (*TableId) FromParseResult ¶
func (id *TableId) FromParseResult(input resourceids.ParseResult) error
func (TableId) Segments ¶
func (id TableId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Table ID
type TableListCompleteResult ¶
type TableOperationPredicate ¶
func (TableOperationPredicate) Matches ¶
func (p TableOperationPredicate) Matches(input Table) bool
type TableProperties ¶
type TableProperties struct { SignedIdentifiers *[]TableSignedIdentifier `json:"signedIdentifiers,omitempty"` TableName *string `json:"tableName,omitempty"` }
type TableServiceClient ¶
type TableServiceClient struct {
Client *resourcemanager.Client
}
func NewTableServiceClientWithBaseURI ¶
func NewTableServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*TableServiceClient, error)
func (TableServiceClient) TableCreate ¶
func (c TableServiceClient) TableCreate(ctx context.Context, id TableId, input Table) (result TableCreateOperationResponse, err error)
TableCreate ...
func (TableServiceClient) TableDelete ¶
func (c TableServiceClient) TableDelete(ctx context.Context, id TableId) (result TableDeleteOperationResponse, err error)
TableDelete ...
func (TableServiceClient) TableGet ¶
func (c TableServiceClient) TableGet(ctx context.Context, id TableId) (result TableGetOperationResponse, err error)
TableGet ...
func (TableServiceClient) TableList ¶
func (c TableServiceClient) TableList(ctx context.Context, id commonids.StorageAccountId) (result TableListOperationResponse, err error)
TableList ...
func (TableServiceClient) TableListComplete ¶
func (c TableServiceClient) TableListComplete(ctx context.Context, id commonids.StorageAccountId) (TableListCompleteResult, error)
TableListComplete retrieves all the results into a single object
func (TableServiceClient) TableListCompleteMatchingPredicate ¶
func (c TableServiceClient) TableListCompleteMatchingPredicate(ctx context.Context, id commonids.StorageAccountId, predicate TableOperationPredicate) (result TableListCompleteResult, err error)
TableListCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (TableServiceClient) TableUpdate ¶
func (c TableServiceClient) TableUpdate(ctx context.Context, id TableId, input Table) (result TableUpdateOperationResponse, err error)
TableUpdate ...
type TableSignedIdentifier ¶
type TableSignedIdentifier struct { AccessPolicy *TableAccessPolicy `json:"accessPolicy,omitempty"` Id string `json:"id"` }