Documentation ¶
Overview ¶
Package snapshotclient implements the client for Snapshots.
Index ¶
- Constants
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, ...) *retry.Error
- func (c *Client) Delete(ctx context.Context, resourceGroupName string, snapshotName string) *retry.Error
- func (c *Client) Get(ctx context.Context, resourceGroupName string, snapshotName string) (compute.Snapshot, *retry.Error)
- func (c *Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Snapshot, *retry.Error)
- func (c *Client) SnapshotListResultPreparer(ctx context.Context, lr compute.SnapshotList) (*http.Request, error)
- type Interface
- type SnapshotListPage
Constants ¶
const ( // APIVersion is the API version for compute. APIVersion = "2022-03-02" // AzureStackCloudAPIVersion is the API version for Azure Stack AzureStackCloudAPIVersion = "2019-03-01" // AzureStackCloudName is the cloud name of Azure Stack AzureStackCloudName = "AZURESTACKCLOUD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // ARM throttling configures. RetryAfterReader time.Time RetryAfterWriter time.Time // contains filtered or unexported fields }
Client implements Snapshot client Interface.
func New ¶
func New(config *azclients.ClientConfig) *Client
New creates a new Snapshot client with ratelimiting.
func (*Client) CreateOrUpdate ¶
func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot compute.Snapshot) *retry.Error
CreateOrUpdate creates or updates a Snapshot.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, resourceGroupName string, snapshotName string) *retry.Error
Delete deletes a Snapshot by name.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, resourceGroupName string, snapshotName string) (compute.Snapshot, *retry.Error)
Get gets a Snapshot.
func (*Client) ListByResourceGroup ¶
func (c *Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Snapshot, *retry.Error)
ListByResourceGroup get a list snapshots by resourceGroup.
func (*Client) SnapshotListResultPreparer ¶
func (c *Client) SnapshotListResultPreparer(ctx context.Context, lr compute.SnapshotList) (*http.Request, error)
SnapshotListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type Interface ¶
type Interface interface { // Get gets a Snapshot. Get(ctx context.Context, resourceGroupName string, snapshotName string) (compute.Snapshot, *retry.Error) // Delete deletes a Snapshot by name. Delete(ctx context.Context, resourceGroupName string, snapshotName string) *retry.Error // ListByResourceGroup get a list snapshots by resourceGroup. ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Snapshot, *retry.Error) // CreateOrUpdate creates or updates a Snapshot. CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot compute.Snapshot) *retry.Error }
Interface is the client interface for Snapshots. Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.
type SnapshotListPage ¶
type SnapshotListPage struct {
// contains filtered or unexported fields
}
SnapshotListPage contains a page of Snapshot values.
func (*SnapshotListPage) Next ¶
func (page *SnapshotListPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (*SnapshotListPage) NextWithContext ¶
func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (SnapshotListPage) NotDone ¶
func (page SnapshotListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (SnapshotListPage) Response ¶
func (page SnapshotListPage) Response() compute.SnapshotList
Response returns the raw server response from the last page request.
func (SnapshotListPage) Values ¶
func (page SnapshotListPage) Values() []compute.Snapshot
Values returns the slice of values for the current page or nil if there are no values.
Directories ¶
Path | Synopsis |
---|---|
Package mocksnapshotclient implements the mock client for Snapshots.
|
Package mocksnapshotclient implements the mock client for Snapshots. |