storage

package
v60.3.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package storage implements the Azure ARM Storage service API version 2016-12-01.

The Azure Storage Management API.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Storage
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AccessTier

type AccessTier string

AccessTier enumerates the values for access tier.

const (
	// Cool ...
	Cool AccessTier = "Cool"
	// Hot ...
	Hot AccessTier = "Hot"
)

func PossibleAccessTierValues

func PossibleAccessTierValues() []AccessTier

PossibleAccessTierValues returns an array of possible values for the AccessTier const type.

type Account

type Account struct {
	autorest.Response `json:"-"`
	// Sku - READ-ONLY; Gets the SKU.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'BlobStorage'
	Kind               Kind `json:"kind,omitempty"`
	*AccountProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type
	Type *string `json:"type,omitempty"`
	// Location - Resource location
	Location *string `json:"location,omitempty"`
	// Tags - Tags assigned to a resource; can be used for viewing and grouping a resource (across resource groups).
	Tags map[string]*string `json:"tags"`
}

Account the storage account.

func (Account) MarshalJSON

func (a Account) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Account.

func (*Account) UnmarshalJSON

func (a *Account) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Account struct.

type AccountCheckNameAvailabilityParameters

type AccountCheckNameAvailabilityParameters struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

AccountCheckNameAvailabilityParameters the parameters used to check the availability of the storage account name.

type AccountCreateParameters

type AccountCreateParameters struct {
	// Sku - Required. Gets or sets the sku name.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Indicates the type of storage account. Possible values include: 'Storage', 'BlobStorage'
	Kind Kind `json:"kind,omitempty"`
	// Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
	Location *string `json:"location,omitempty"`
	// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.
	Tags                               map[string]*string `json:"tags"`
	*AccountPropertiesCreateParameters `json:"properties,omitempty"`
}

AccountCreateParameters the parameters used when creating a storage account.

func (AccountCreateParameters) MarshalJSON

func (acp AccountCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountCreateParameters.

func (*AccountCreateParameters) UnmarshalJSON

func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct.

type AccountKey

type AccountKey struct {
	// KeyName - READ-ONLY; Name of the key.
	KeyName *string `json:"keyName,omitempty"`
	// Value - READ-ONLY; Base 64-encoded value of the key.
	Value *string `json:"value,omitempty"`
	// Permissions - READ-ONLY; Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full'
	Permissions KeyPermission `json:"permissions,omitempty"`
}

AccountKey an access key for the storage account.

func (AccountKey) MarshalJSON

func (ak AccountKey) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountKey.

type AccountListKeysResult

type AccountListKeysResult struct {
	autorest.Response `json:"-"`
	// Keys - READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account.
	Keys *[]AccountKey `json:"keys,omitempty"`
}

AccountListKeysResult the response from the ListKeys operation.

func (AccountListKeysResult) MarshalJSON

func (alkr AccountListKeysResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountListKeysResult.

type AccountListResult

type AccountListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; Gets the list of storage accounts and their properties.
	Value *[]Account `json:"value,omitempty"`
}

AccountListResult the response from the List Storage Accounts operation.

func (AccountListResult) MarshalJSON

func (alr AccountListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountListResult.

type AccountProperties

type AccountProperties struct {
	// ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
	// PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.
	PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
	// PrimaryLocation - READ-ONLY; Gets the location of the primary data center for the storage account.
	PrimaryLocation *string `json:"primaryLocation,omitempty"`
	// StatusOfPrimary - READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable'
	StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"`
	// LastGeoFailoverTime - READ-ONLY; Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS.
	LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"`
	// SecondaryLocation - READ-ONLY; Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS.
	SecondaryLocation *string `json:"secondaryLocation,omitempty"`
	// StatusOfSecondary - READ-ONLY; Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'Available', 'Unavailable'
	StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"`
	// CreationTime - READ-ONLY; Gets the creation date and time of the storage account in UTC.
	CreationTime *date.Time `json:"creationTime,omitempty"`
	// CustomDomain - READ-ONLY; Gets the custom domain the user assigned to this storage account.
	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
	// SecondaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.
	SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"`
	// Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted.
	Encryption *Encryption `json:"encryption,omitempty"`
	// AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
	AccessTier AccessTier `json:"accessTier,omitempty"`
	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
}

AccountProperties properties of the storage account.

func (AccountProperties) MarshalJSON

func (ap AccountProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountProperties.

type AccountPropertiesCreateParameters

type AccountPropertiesCreateParameters struct {
	// CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.
	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
	// Encryption - Provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted.
	Encryption *Encryption `json:"encryption,omitempty"`
	// AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
	AccessTier AccessTier `json:"accessTier,omitempty"`
	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
}

AccountPropertiesCreateParameters the parameters used to create the storage account.

type AccountPropertiesUpdateParameters

type AccountPropertiesUpdateParameters struct {
	// CustomDomain - Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.
	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
	// Encryption - Provides the encryption settings on the account. The default setting is unencrypted.
	Encryption *Encryption `json:"encryption,omitempty"`
	// AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
	AccessTier AccessTier `json:"accessTier,omitempty"`
	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
}

AccountPropertiesUpdateParameters the parameters used when updating a storage account.

type AccountRegenerateKeyParameters

type AccountRegenerateKeyParameters struct {
	KeyName *string `json:"keyName,omitempty"`
}

AccountRegenerateKeyParameters the parameters used to regenerate the storage account key.

type AccountSasParameters

type AccountSasParameters struct {
	// Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'B', 'Q', 'T', 'F'
	Services Services `json:"signedServices,omitempty"`
	// ResourceTypes - The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 'ResourceTypesS', 'ResourceTypesC', 'ResourceTypesO'
	ResourceTypes ResourceTypes `json:"signedResourceTypes,omitempty"`
	// Permissions - The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'Permissions1R', 'Permissions1D', 'Permissions1W', 'Permissions1L', 'Permissions1A', 'Permissions1C', 'Permissions1U', 'Permissions1P'
	Permissions Permissions1 `json:"signedPermission,omitempty"`
	// IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
	IPAddressOrRange *string `json:"signedIp,omitempty"`
	// Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
	Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
	// SharedAccessStartTime - The time at which the SAS becomes valid.
	SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
	// SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
	SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
	// KeyToSign - The key to sign the account SAS token with.
	KeyToSign *string `json:"keyToSign,omitempty"`
}

AccountSasParameters the parameters to list SAS credentials of a storage account.

type AccountStatus

type AccountStatus string

AccountStatus enumerates the values for account status.

const (
	// Available ...
	Available AccountStatus = "available"
	// Unavailable ...
	Unavailable AccountStatus = "unavailable"
)

func PossibleAccountStatusValues

func PossibleAccountStatusValues() []AccountStatus

PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type.

type AccountUpdateParameters

type AccountUpdateParameters struct {
	// Sku - Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku names be updated to any other value.
	Sku *Sku `json:"sku,omitempty"`
	// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.
	Tags                               map[string]*string `json:"tags"`
	*AccountPropertiesUpdateParameters `json:"properties,omitempty"`
}

AccountUpdateParameters the parameters that can be provided when updating the storage account properties.

func (AccountUpdateParameters) MarshalJSON

func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AccountUpdateParameters.

func (*AccountUpdateParameters) UnmarshalJSON

func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.

type AccountsClient

type AccountsClient struct {
	BaseClient
}

AccountsClient is the the Azure Storage Management API.

func NewAccountsClient

func NewAccountsClient(subscriptionID string) AccountsClient

NewAccountsClient creates an instance of the AccountsClient client.

func NewAccountsClientWithBaseURI

func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient

NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AccountsClient) CheckNameAvailability

func (client AccountsClient) CheckNameAvailability(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error)

CheckNameAvailability checks that the storage account name is valid and is not already in use. Parameters: accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

func (AccountsClient) CheckNameAvailabilityPreparer

func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (*http.Request, error)

CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.

func (AccountsClient) CheckNameAvailabilityResponder

func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error)

CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always closes the http.Response Body.

func (AccountsClient) CheckNameAvailabilitySender

func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error)

CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) Create

func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result AccountsCreateFuture, err error)

Create asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. parameters - the parameters to provide for the created account.

func (AccountsClient) CreatePreparer

func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (*http.Request, error)

CreatePreparer prepares the Create request.

func (AccountsClient) CreateResponder

func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (AccountsClient) CreateSender

func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) Delete

func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error)

Delete deletes a storage account in Microsoft Azure. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

func (AccountsClient) DeletePreparer

func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (AccountsClient) DeleteResponder

func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (AccountsClient) DeleteSender

func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) GetProperties

func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error)

GetProperties returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

func (AccountsClient) GetPropertiesPreparer

func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

GetPropertiesPreparer prepares the GetProperties request.

func (AccountsClient) GetPropertiesResponder

func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, err error)

GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.

func (AccountsClient) GetPropertiesSender

func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error)

GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) List

func (client AccountsClient) List(ctx context.Context) (result AccountListResult, err error)

List lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.

func (AccountsClient) ListAccountSAS

func (client AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (result ListAccountSasResponse, err error)

ListAccountSAS list SAS credentials of a storage account. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. parameters - the parameters to provide to list SAS credentials for the storage account.

func (AccountsClient) ListAccountSASPreparer

func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (*http.Request, error)

ListAccountSASPreparer prepares the ListAccountSAS request.

func (AccountsClient) ListAccountSASResponder

func (client AccountsClient) ListAccountSASResponder(resp *http.Response) (result ListAccountSasResponse, err error)

ListAccountSASResponder handles the response to the ListAccountSAS request. The method always closes the http.Response Body.

func (AccountsClient) ListAccountSASSender

func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error)

ListAccountSASSender sends the ListAccountSAS request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListByResourceGroup

func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResult, err error)

ListByResourceGroup lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive.

func (AccountsClient) ListByResourceGroupPreparer

func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (AccountsClient) ListByResourceGroupResponder

func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (AccountsClient) ListByResourceGroupSender

func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListKeys

func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountListKeysResult, err error)

ListKeys lists the access keys for the specified storage account. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

func (AccountsClient) ListKeysPreparer

func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListKeysPreparer prepares the ListKeys request.

func (AccountsClient) ListKeysResponder

func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountListKeysResult, err error)

ListKeysResponder handles the response to the ListKeys request. The method always closes the http.Response Body.

func (AccountsClient) ListKeysSender

func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error)

ListKeysSender sends the ListKeys request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListPreparer

func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (AccountsClient) ListResponder

func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (AccountsClient) ListSender

func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) ListServiceSAS

func (client AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (result ListServiceSasResponse, err error)

ListServiceSAS list service SAS credentials of a specific resource. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. parameters - the parameters to provide to list service SAS credentials.

func (AccountsClient) ListServiceSASPreparer

func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (*http.Request, error)

ListServiceSASPreparer prepares the ListServiceSAS request.

func (AccountsClient) ListServiceSASResponder

func (client AccountsClient) ListServiceSASResponder(resp *http.Response) (result ListServiceSasResponse, err error)

ListServiceSASResponder handles the response to the ListServiceSAS request. The method always closes the http.Response Body.

func (AccountsClient) ListServiceSASSender

func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error)

ListServiceSASSender sends the ListServiceSAS request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) RegenerateKey

func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (result AccountListKeysResult, err error)

RegenerateKey regenerates one of the access keys for the specified storage account. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. regenerateKey - specifies name of the key which should be regenerated -- key1 or key2.

func (AccountsClient) RegenerateKeyPreparer

func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (*http.Request, error)

RegenerateKeyPreparer prepares the RegenerateKey request.

func (AccountsClient) RegenerateKeyResponder

func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountListKeysResult, err error)

RegenerateKeyResponder handles the response to the RegenerateKey request. The method always closes the http.Response Body.

func (AccountsClient) RegenerateKeySender

func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error)

RegenerateKeySender sends the RegenerateKey request. The method will close the http.Response Body if it receives an error.

func (AccountsClient) Update

func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error)

Update the update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. Parameters: resourceGroupName - the name of the resource group within the user's subscription. The name is case insensitive. accountName - the name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. parameters - the parameters to provide for the updated account.

func (AccountsClient) UpdatePreparer

func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (AccountsClient) UpdateResponder

func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (AccountsClient) UpdateSender

func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type AccountsCreateFuture

type AccountsCreateFuture struct {
	azure.FutureAPI
	// Result returns the result of the asynchronous operation.
	// If the operation has not completed it will return an error.
	Result func(AccountsClient) (Account, error)
}

AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (*AccountsCreateFuture) UnmarshalJSON

func (future *AccountsCreateFuture) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaller for CreateFuture.

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Storage.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	autorest.Response `json:"-"`
	// NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
	NameAvailable *bool `json:"nameAvailable,omitempty"`
	// Reason - READ-ONLY; Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists'
	Reason Reason `json:"reason,omitempty"`
	// Message - READ-ONLY; Gets an error message explaining the Reason value in more detail.
	Message *string `json:"message,omitempty"`
}

CheckNameAvailabilityResult the CheckNameAvailability operation response.

func (CheckNameAvailabilityResult) MarshalJSON

func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CheckNameAvailabilityResult.

type CustomDomain

type CustomDomain struct {
	// Name - Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
	Name *string `json:"name,omitempty"`
	// UseSubDomainName - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.
	UseSubDomainName *bool `json:"useSubDomainName,omitempty"`
}

CustomDomain the custom domain assigned to this storage account. This can be set via Update.

type Encryption

type Encryption struct {
	// Services - List of services which support encryption.
	Services *EncryptionServices `json:"services,omitempty"`
	// KeySource - The encryption keySource (provider). Possible values (case-insensitive):  Microsoft.Storage
	KeySource *string `json:"keySource,omitempty"`
}

Encryption the encryption settings on the storage account.

type EncryptionService

type EncryptionService struct {
	// Enabled - A boolean indicating whether or not the service encrypts the data as it is stored.
	Enabled *bool `json:"enabled,omitempty"`
	// LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate.
	LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
}

EncryptionService a service that allows server-side encryption to be used.

func (EncryptionService) MarshalJSON

func (es EncryptionService) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EncryptionService.

type EncryptionServices

type EncryptionServices struct {
	// Blob - The encryption function of the blob storage service.
	Blob *EncryptionService `json:"blob,omitempty"`
	// File - The encryption function of the file storage service.
	File *EncryptionService `json:"file,omitempty"`
	// Table - READ-ONLY; The encryption function of the table storage service.
	Table *EncryptionService `json:"table,omitempty"`
	// Queue - READ-ONLY; The encryption function of the queue storage service.
	Queue *EncryptionService `json:"queue,omitempty"`
}

EncryptionServices a list of services that support encryption.

func (EncryptionServices) MarshalJSON

func (es EncryptionServices) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EncryptionServices.

type Endpoints

type Endpoints struct {
	// Blob - READ-ONLY; Gets the blob endpoint.
	Blob *string `json:"blob,omitempty"`
	// Queue - READ-ONLY; Gets the queue endpoint.
	Queue *string `json:"queue,omitempty"`
	// Table - READ-ONLY; Gets the table endpoint.
	Table *string `json:"table,omitempty"`
	// File - READ-ONLY; Gets the file endpoint.
	File *string `json:"file,omitempty"`
}

Endpoints the URIs that are used to perform a retrieval of a public blob, queue, or table object.

func (Endpoints) MarshalJSON

func (e Endpoints) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Endpoints.

type HTTPProtocol

type HTTPProtocol string

HTTPProtocol enumerates the values for http protocol.

const (
	// HTTPS ...
	HTTPS HTTPProtocol = "https"
	// Httpshttp ...
	Httpshttp HTTPProtocol = "https,http"
)

func PossibleHTTPProtocolValues

func PossibleHTTPProtocolValues() []HTTPProtocol

PossibleHTTPProtocolValues returns an array of possible values for the HTTPProtocol const type.

type KeyPermission

type KeyPermission string

KeyPermission enumerates the values for key permission.

const (
	// Full ...
	Full KeyPermission = "Full"
	// Read ...
	Read KeyPermission = "Read"
)

func PossibleKeyPermissionValues

func PossibleKeyPermissionValues() []KeyPermission

PossibleKeyPermissionValues returns an array of possible values for the KeyPermission const type.

type Kind

type Kind string

Kind enumerates the values for kind.

const (
	// BlobStorage ...
	BlobStorage Kind = "BlobStorage"
	// Storage ...
	Storage Kind = "Storage"
)

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns an array of possible values for the Kind const type.

type ListAccountSasResponse

type ListAccountSasResponse struct {
	autorest.Response `json:"-"`
	// AccountSasToken - READ-ONLY; List SAS credentials of storage account.
	AccountSasToken *string `json:"accountSasToken,omitempty"`
}

ListAccountSasResponse the List SAS credentials operation response.

func (ListAccountSasResponse) MarshalJSON

func (lasr ListAccountSasResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ListAccountSasResponse.

type ListServiceSasResponse

type ListServiceSasResponse struct {
	autorest.Response `json:"-"`
	// ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource.
	ServiceSasToken *string `json:"serviceSasToken,omitempty"`
}

ListServiceSasResponse the List service SAS credentials operation response.

func (ListServiceSasResponse) MarshalJSON

func (lssr ListServiceSasResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ListServiceSasResponse.

type Permissions

type Permissions string

Permissions enumerates the values for permissions.

const (
	// A ...
	A Permissions = "a"
	// C ...
	C Permissions = "c"
	// D ...
	D Permissions = "d"
	// L ...
	L Permissions = "l"
	// P ...
	P Permissions = "p"
	// R ...
	R Permissions = "r"
	// U ...
	U Permissions = "u"
	// W ...
	W Permissions = "w"
)

func PossiblePermissionsValues

func PossiblePermissionsValues() []Permissions

PossiblePermissionsValues returns an array of possible values for the Permissions const type.

type Permissions1

type Permissions1 string

Permissions1 enumerates the values for permissions 1.

const (
	// Permissions1A ...
	Permissions1A Permissions1 = "a"
	// Permissions1C ...
	Permissions1C Permissions1 = "c"
	// Permissions1D ...
	Permissions1D Permissions1 = "d"
	// Permissions1L ...
	Permissions1L Permissions1 = "l"
	// Permissions1P ...
	Permissions1P Permissions1 = "p"
	// Permissions1R ...
	Permissions1R Permissions1 = "r"
	// Permissions1U ...
	Permissions1U Permissions1 = "u"
	// Permissions1W ...
	Permissions1W Permissions1 = "w"
)

func PossiblePermissions1Values

func PossiblePermissions1Values() []Permissions1

PossiblePermissions1Values returns an array of possible values for the Permissions1 const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState enumerates the values for provisioning state.

const (
	// Creating ...
	Creating ProvisioningState = "Creating"
	// ResolvingDNS ...
	ResolvingDNS ProvisioningState = "ResolvingDNS"
	// Succeeded ...
	Succeeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.

type Reason

type Reason string

Reason enumerates the values for reason.

const (
	// AccountNameInvalid ...
	AccountNameInvalid Reason = "AccountNameInvalid"
	// AlreadyExists ...
	AlreadyExists Reason = "AlreadyExists"
)

func PossibleReasonValues

func PossibleReasonValues() []Reason

PossibleReasonValues returns an array of possible values for the Reason const type.

type Resource

type Resource struct {
	// ID - READ-ONLY; Resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type
	Type *string `json:"type,omitempty"`
	// Location - Resource location
	Location *string `json:"location,omitempty"`
	// Tags - Tags assigned to a resource; can be used for viewing and grouping a resource (across resource groups).
	Tags map[string]*string `json:"tags"`
}

Resource describes a storage resource.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type ResourceTypes

type ResourceTypes string

ResourceTypes enumerates the values for resource types.

const (
	// ResourceTypesC ...
	ResourceTypesC ResourceTypes = "c"
	// ResourceTypesO ...
	ResourceTypesO ResourceTypes = "o"
	// ResourceTypesS ...
	ResourceTypesS ResourceTypes = "s"
)

func PossibleResourceTypesValues

func PossibleResourceTypesValues() []ResourceTypes

PossibleResourceTypesValues returns an array of possible values for the ResourceTypes const type.

type ServiceSasParameters

type ServiceSasParameters struct {
	// CanonicalizedResource - The canonical path to the signed resource.
	CanonicalizedResource *string `json:"canonicalizedResource,omitempty"`
	// Resource - The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'SignedResourceB', 'SignedResourceC', 'SignedResourceF', 'SignedResourceS'
	Resource SignedResource `json:"signedResource,omitempty"`
	// Permissions - The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P'
	Permissions Permissions `json:"signedPermission,omitempty"`
	// IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
	IPAddressOrRange *string `json:"signedIp,omitempty"`
	// Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
	Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
	// SharedAccessStartTime - The time at which the SAS becomes valid.
	SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
	// SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
	SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
	// Identifier - A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.
	Identifier *string `json:"signedIdentifier,omitempty"`
	// PartitionKeyStart - The start of partition key.
	PartitionKeyStart *string `json:"startPk,omitempty"`
	// PartitionKeyEnd - The end of partition key.
	PartitionKeyEnd *string `json:"endPk,omitempty"`
	// RowKeyStart - The start of row key.
	RowKeyStart *string `json:"startRk,omitempty"`
	// RowKeyEnd - The end of row key.
	RowKeyEnd *string `json:"endRk,omitempty"`
	// KeyToSign - The key to sign the account SAS token with.
	KeyToSign *string `json:"keyToSign,omitempty"`
	// CacheControl - The response header override for cache control.
	CacheControl *string `json:"rscc,omitempty"`
	// ContentDisposition - The response header override for content disposition.
	ContentDisposition *string `json:"rscd,omitempty"`
	// ContentEncoding - The response header override for content encoding.
	ContentEncoding *string `json:"rsce,omitempty"`
	// ContentLanguage - The response header override for content language.
	ContentLanguage *string `json:"rscl,omitempty"`
	// ContentType - The response header override for content type.
	ContentType *string `json:"rsct,omitempty"`
}

ServiceSasParameters the parameters to list service SAS credentials of a specific resource.

type Services

type Services string

Services enumerates the values for services.

const (
	// B ...
	B Services = "b"
	// F ...
	F Services = "f"
	// Q ...
	Q Services = "q"
	// T ...
	T Services = "t"
)

func PossibleServicesValues

func PossibleServicesValues() []Services

PossibleServicesValues returns an array of possible values for the Services const type.

type SignedResource

type SignedResource string

SignedResource enumerates the values for signed resource.

const (
	// SignedResourceB ...
	SignedResourceB SignedResource = "b"
	// SignedResourceC ...
	SignedResourceC SignedResource = "c"
	// SignedResourceF ...
	SignedResourceF SignedResource = "f"
	// SignedResourceS ...
	SignedResourceS SignedResource = "s"
)

func PossibleSignedResourceValues

func PossibleSignedResourceValues() []SignedResource

PossibleSignedResourceValues returns an array of possible values for the SignedResource const type.

type Sku

type Sku struct {
	// Name - Gets or sets the sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS'
	Name SkuName `json:"name,omitempty"`
	// Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'
	Tier SkuTier `json:"tier,omitempty"`
}

Sku the SKU of the storage account.

func (Sku) MarshalJSON

func (s Sku) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Sku.

type SkuName

type SkuName string

SkuName enumerates the values for sku name.

const (
	// PremiumLRS ...
	PremiumLRS SkuName = "Premium_LRS"
	// StandardGRS ...
	StandardGRS SkuName = "Standard_GRS"
	// StandardLRS ...
	StandardLRS SkuName = "Standard_LRS"
	// StandardRAGRS ...
	StandardRAGRS SkuName = "Standard_RAGRS"
	// StandardZRS ...
	StandardZRS SkuName = "Standard_ZRS"
)

func PossibleSkuNameValues

func PossibleSkuNameValues() []SkuName

PossibleSkuNameValues returns an array of possible values for the SkuName const type.

type SkuTier

type SkuTier string

SkuTier enumerates the values for sku tier.

const (
	// Premium ...
	Premium SkuTier = "Premium"
	// Standard ...
	Standard SkuTier = "Standard"
)

func PossibleSkuTierValues

func PossibleSkuTierValues() []SkuTier

PossibleSkuTierValues returns an array of possible values for the SkuTier const type.

type Usage

type Usage struct {
	// Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'
	Unit UsageUnit `json:"unit,omitempty"`
	// CurrentValue - READ-ONLY; Gets the current count of the allocated resources in the subscription.
	CurrentValue *int32 `json:"currentValue,omitempty"`
	// Limit - READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription.
	Limit *int32 `json:"limit,omitempty"`
	// Name - READ-ONLY; Gets the name of the type of usage.
	Name *UsageName `json:"name,omitempty"`
}

Usage describes Storage Resource Usage.

func (Usage) MarshalJSON

func (u Usage) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Usage.

type UsageClient

type UsageClient struct {
	BaseClient
}

UsageClient is the the Azure Storage Management API.

func NewUsageClient

func NewUsageClient(subscriptionID string) UsageClient

NewUsageClient creates an instance of the UsageClient client.

func NewUsageClientWithBaseURI

func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient

NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (UsageClient) List

func (client UsageClient) List(ctx context.Context) (result UsageListResult, err error)

List gets the current usage count and the limit for the resources under the subscription.

func (UsageClient) ListPreparer

func (client UsageClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (UsageClient) ListResponder

func (client UsageClient) ListResponder(resp *http.Response) (result UsageListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (UsageClient) ListSender

func (client UsageClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type UsageListResult

type UsageListResult struct {
	autorest.Response `json:"-"`
	// Value - Gets or sets the list of Storage Resource Usages.
	Value *[]Usage `json:"value,omitempty"`
}

UsageListResult the response from the List Usages operation.

type UsageName

type UsageName struct {
	// Value - READ-ONLY; Gets a string describing the resource name.
	Value *string `json:"value,omitempty"`
	// LocalizedValue - READ-ONLY; Gets a localized string describing the resource name.
	LocalizedValue *string `json:"localizedValue,omitempty"`
}

UsageName the usage names that can be used; currently limited to StorageAccount.

func (UsageName) MarshalJSON

func (un UsageName) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for UsageName.

type UsageUnit

type UsageUnit string

UsageUnit enumerates the values for usage unit.

const (
	// Bytes ...
	Bytes UsageUnit = "Bytes"
	// BytesPerSecond ...
	BytesPerSecond UsageUnit = "BytesPerSecond"
	// Count ...
	Count UsageUnit = "Count"
	// CountsPerSecond ...
	CountsPerSecond UsageUnit = "CountsPerSecond"
	// Percent ...
	Percent UsageUnit = "Percent"
	// Seconds ...
	Seconds UsageUnit = "Seconds"
)

func PossibleUsageUnitValues

func PossibleUsageUnitValues() []UsageUnit

PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL