Documentation ¶
Index ¶
- type AccessPolicy
- type AccessTier
- type Account
- type AccountCheckNameAvailabilityParameters
- type AccountCreateParameters
- type AccountImmutabilityPolicyProperties
- type AccountImmutabilityPolicyState
- type AccountInternetEndpoints
- type AccountKey
- type AccountListKeysResult
- type AccountListResult
- type AccountMicrosoftEndpoints
- type AccountMigration
- type AccountMigrationProperties
- type AccountProperties
- type AccountPropertiesCreateParameters
- type AccountPropertiesUpdateParameters
- type AccountRegenerateKeyParameters
- type AccountSKUConversionStatus
- type AccountSasParameters
- type AccountStatus
- type AccountUpdateParameters
- type AccountsClient
- func (client *AccountsClient) BeginAbortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientAbortHierarchicalNamespaceMigrationResponse], ...)
- func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientCreateResponse], error)
- func (client *AccountsClient) BeginCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error)
- func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientFailoverResponse], error)
- func (client *AccountsClient) BeginHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientHierarchicalNamespaceMigrationResponse], error)
- func (client *AccountsClient) BeginRestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[AccountsClientRestoreBlobRangesResponse], error)
- func (client *AccountsClient) CheckNameAvailability(ctx context.Context, accountName AccountCheckNameAvailabilityParameters, ...) (AccountsClientCheckNameAvailabilityResponse, error)
- func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientDeleteResponse, error)
- func (client *AccountsClient) GetCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientGetCustomerInitiatedMigrationResponse, error)
- func (client *AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientGetPropertiesResponse, error)
- func (client *AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientListAccountSASResponse, error)
- func (client *AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientListKeysResponse, error)
- func (client *AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientListServiceSASResponse, error)
- func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]
- func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]
- func (client *AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientRegenerateKeyResponse, error)
- func (client *AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientRevokeUserDelegationKeysResponse, error)
- func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (AccountsClientUpdateResponse, error)
- type AccountsClientAbortHierarchicalNamespaceMigrationResponse
- type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions
- type AccountsClientBeginCreateOptions
- type AccountsClientBeginCustomerInitiatedMigrationOptions
- type AccountsClientBeginFailoverOptions
- type AccountsClientBeginHierarchicalNamespaceMigrationOptions
- type AccountsClientBeginRestoreBlobRangesOptions
- type AccountsClientCheckNameAvailabilityOptions
- type AccountsClientCheckNameAvailabilityResponse
- type AccountsClientCreateResponse
- type AccountsClientCustomerInitiatedMigrationResponse
- type AccountsClientDeleteOptions
- type AccountsClientDeleteResponse
- type AccountsClientFailoverResponse
- type AccountsClientGetCustomerInitiatedMigrationOptions
- type AccountsClientGetCustomerInitiatedMigrationResponse
- type AccountsClientGetPropertiesOptions
- type AccountsClientGetPropertiesResponse
- type AccountsClientHierarchicalNamespaceMigrationResponse
- type AccountsClientListAccountSASOptions
- type AccountsClientListAccountSASResponse
- type AccountsClientListByResourceGroupOptions
- type AccountsClientListByResourceGroupResponse
- type AccountsClientListKeysOptions
- type AccountsClientListKeysResponse
- type AccountsClientListOptions
- type AccountsClientListResponse
- type AccountsClientListServiceSASOptions
- type AccountsClientListServiceSASResponse
- type AccountsClientRegenerateKeyOptions
- type AccountsClientRegenerateKeyResponse
- type AccountsClientRestoreBlobRangesResponse
- type AccountsClientRevokeUserDelegationKeysOptions
- type AccountsClientRevokeUserDelegationKeysResponse
- type AccountsClientUpdateOptions
- type AccountsClientUpdateResponse
- type ActiveDirectoryProperties
- type ActiveDirectoryPropertiesAccountType
- type AllowedCopyScope
- type AzureEntityResource
- type AzureFilesIdentityBasedAuthentication
- type BlobContainer
- type BlobContainersClient
- func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[BlobContainersClientObjectLevelWormResponse], error)
- func (client *BlobContainersClient) ClearLegalHold(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientClearLegalHoldResponse, error)
- func (client *BlobContainersClient) Create(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientCreateResponse, error)
- func (client *BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse, error)
- func (client *BlobContainersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientDeleteResponse, error)
- func (client *BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientDeleteImmutabilityPolicyResponse, error)
- func (client *BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientExtendImmutabilityPolicyResponse, error)
- func (client *BlobContainersClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientGetResponse, error)
- func (client *BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientGetImmutabilityPolicyResponse, error)
- func (client *BlobContainersClient) Lease(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientLeaseResponse, error)
- func (client *BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientLockImmutabilityPolicyResponse, error)
- func (client *BlobContainersClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[BlobContainersClientListResponse]
- func (client *BlobContainersClient) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientSetLegalHoldResponse, error)
- func (client *BlobContainersClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobContainersClientUpdateResponse, error)
- type BlobContainersClientBeginObjectLevelWormOptions
- type BlobContainersClientClearLegalHoldOptions
- type BlobContainersClientClearLegalHoldResponse
- type BlobContainersClientCreateOptions
- type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions
- type BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse
- type BlobContainersClientCreateResponse
- type BlobContainersClientDeleteImmutabilityPolicyOptions
- type BlobContainersClientDeleteImmutabilityPolicyResponse
- type BlobContainersClientDeleteOptions
- type BlobContainersClientDeleteResponse
- type BlobContainersClientExtendImmutabilityPolicyOptions
- type BlobContainersClientExtendImmutabilityPolicyResponse
- type BlobContainersClientGetImmutabilityPolicyOptions
- type BlobContainersClientGetImmutabilityPolicyResponse
- type BlobContainersClientGetOptions
- type BlobContainersClientGetResponse
- type BlobContainersClientLeaseOptions
- type BlobContainersClientLeaseResponse
- type BlobContainersClientListOptions
- type BlobContainersClientListResponse
- type BlobContainersClientLockImmutabilityPolicyOptions
- type BlobContainersClientLockImmutabilityPolicyResponse
- type BlobContainersClientObjectLevelWormResponse
- type BlobContainersClientSetLegalHoldOptions
- type BlobContainersClientSetLegalHoldResponse
- type BlobContainersClientUpdateOptions
- type BlobContainersClientUpdateResponse
- type BlobInventoryCreationTime
- type BlobInventoryPoliciesClient
- func (client *BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobInventoryPoliciesClientCreateOrUpdateResponse, error)
- func (client *BlobInventoryPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobInventoryPoliciesClientDeleteResponse, error)
- func (client *BlobInventoryPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobInventoryPoliciesClientGetResponse, error)
- func (client *BlobInventoryPoliciesClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[BlobInventoryPoliciesClientListResponse]
- type BlobInventoryPoliciesClientCreateOrUpdateOptions
- type BlobInventoryPoliciesClientCreateOrUpdateResponse
- type BlobInventoryPoliciesClientDeleteOptions
- type BlobInventoryPoliciesClientDeleteResponse
- type BlobInventoryPoliciesClientGetOptions
- type BlobInventoryPoliciesClientGetResponse
- type BlobInventoryPoliciesClientListOptions
- type BlobInventoryPoliciesClientListResponse
- type BlobInventoryPolicy
- type BlobInventoryPolicyDefinition
- type BlobInventoryPolicyFilter
- type BlobInventoryPolicyName
- type BlobInventoryPolicyProperties
- type BlobInventoryPolicyRule
- type BlobInventoryPolicySchema
- type BlobRestoreParameters
- type BlobRestoreProgressStatus
- type BlobRestoreRange
- type BlobRestoreStatus
- type BlobServiceItems
- type BlobServiceProperties
- type BlobServicePropertiesProperties
- type BlobServicesClient
- func (client *BlobServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobServicesClientGetServicePropertiesResponse, error)
- func (client *BlobServicesClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[BlobServicesClientListResponse]
- func (client *BlobServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (BlobServicesClientSetServicePropertiesResponse, error)
- type BlobServicesClientGetServicePropertiesOptions
- type BlobServicesClientGetServicePropertiesResponse
- type BlobServicesClientListOptions
- type BlobServicesClientListResponse
- type BlobServicesClientSetServicePropertiesOptions
- type BlobServicesClientSetServicePropertiesResponse
- type Bypass
- type ChangeFeed
- type CheckNameAvailabilityResult
- type ClientFactory
- func (c *ClientFactory) NewAccountsClient() *AccountsClient
- func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient
- func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient
- func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient
- func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient
- func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient
- func (c *ClientFactory) NewFileServicesClient() *FileServicesClient
- func (c *ClientFactory) NewFileSharesClient() *FileSharesClient
- func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient
- func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient
- func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient
- func (c *ClientFactory) NewObjectReplicationPoliciesClient() *ObjectReplicationPoliciesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewQueueClient() *QueueClient
- func (c *ClientFactory) NewQueueServicesClient() *QueueServicesClient
- func (c *ClientFactory) NewSKUsClient() *SKUsClient
- func (c *ClientFactory) NewTableClient() *TableClient
- func (c *ClientFactory) NewTableServicesClient() *TableServicesClient
- func (c *ClientFactory) NewTaskAssignmentInstancesReportClient() *TaskAssignmentInstancesReportClient
- func (c *ClientFactory) NewTaskAssignmentsClient() *TaskAssignmentsClient
- func (c *ClientFactory) NewTaskAssignmentsInstancesReportClient() *TaskAssignmentsInstancesReportClient
- func (c *ClientFactory) NewUsagesClient() *UsagesClient
- type ContainerProperties
- type CorsRule
- type CorsRuleAllowedMethodsItem
- type CorsRules
- type CreatedByType
- type CustomDomain
- type DNSEndpointType
- type DateAfterCreation
- type DateAfterModification
- type DefaultAction
- type DefaultSharePermission
- type DeleteRetentionPolicy
- type DeletedAccount
- type DeletedAccountListResult
- type DeletedAccountProperties
- type DeletedAccountsClient
- type DeletedAccountsClientGetOptions
- type DeletedAccountsClientGetResponse
- type DeletedAccountsClientListOptions
- type DeletedAccountsClientListResponse
- type DeletedShare
- type Dimension
- type DirectoryServiceOptions
- type EnabledProtocols
- type Encryption
- type EncryptionIdentity
- type EncryptionScope
- type EncryptionScopeKeyVaultProperties
- type EncryptionScopeListResult
- type EncryptionScopeProperties
- type EncryptionScopeSource
- type EncryptionScopeState
- type EncryptionScopesClient
- func (client *EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (EncryptionScopesClientGetResponse, error)
- func (client *EncryptionScopesClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[EncryptionScopesClientListResponse]
- func (client *EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, ...) (EncryptionScopesClientPatchResponse, error)
- func (client *EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, ...) (EncryptionScopesClientPutResponse, error)
- type EncryptionScopesClientGetOptions
- type EncryptionScopesClientGetResponse
- type EncryptionScopesClientListOptions
- type EncryptionScopesClientListResponse
- type EncryptionScopesClientPatchOptions
- type EncryptionScopesClientPatchResponse
- type EncryptionScopesClientPutOptions
- type EncryptionScopesClientPutResponse
- type EncryptionService
- type EncryptionServices
- type Endpoints
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type ErrorResponseAutoGenerated
- type ErrorResponseBody
- type ExecutionTarget
- type ExecutionTrigger
- type ExecutionTriggerUpdate
- type ExpirationAction
- type ExtendedLocation
- type ExtendedLocationTypes
- type FileServiceItems
- type FileServiceProperties
- type FileServicePropertiesProperties
- type FileServicesClient
- func (client *FileServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (FileServicesClientGetServicePropertiesResponse, error)
- func (client *FileServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, ...) (FileServicesClientListResponse, error)
- func (client *FileServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (FileServicesClientSetServicePropertiesResponse, error)
- type FileServicesClientGetServicePropertiesOptions
- type FileServicesClientGetServicePropertiesResponse
- type FileServicesClientListOptions
- type FileServicesClientListResponse
- type FileServicesClientSetServicePropertiesOptions
- type FileServicesClientSetServicePropertiesResponse
- type FileShare
- type FileShareItem
- type FileShareItems
- type FileShareProperties
- type FileSharesClient
- func (client *FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientCreateResponse, error)
- func (client *FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientDeleteResponse, error)
- func (client *FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientGetResponse, error)
- func (client *FileSharesClient) Lease(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientLeaseResponse, error)
- func (client *FileSharesClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[FileSharesClientListResponse]
- func (client *FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientRestoreResponse, error)
- func (client *FileSharesClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (FileSharesClientUpdateResponse, error)
- type FileSharesClientCreateOptions
- type FileSharesClientCreateResponse
- type FileSharesClientDeleteOptions
- type FileSharesClientDeleteResponse
- type FileSharesClientGetOptions
- type FileSharesClientGetResponse
- type FileSharesClientLeaseOptions
- type FileSharesClientLeaseResponse
- type FileSharesClientListOptions
- type FileSharesClientListResponse
- type FileSharesClientRestoreOptions
- type FileSharesClientRestoreResponse
- type FileSharesClientUpdateOptions
- type FileSharesClientUpdateResponse
- type Format
- type GeoReplicationStats
- type GeoReplicationStatus
- type HTTPProtocol
- type IPRule
- type Identity
- type IdentityType
- type ImmutabilityPolicy
- type ImmutabilityPolicyProperties
- type ImmutabilityPolicyProperty
- type ImmutabilityPolicyState
- type ImmutabilityPolicyUpdateType
- type ImmutableStorageAccount
- type ImmutableStorageWithVersioning
- type InventoryRuleType
- type IssueType
- type KeyCreationTime
- type KeyPermission
- type KeyPolicy
- type KeySource
- type KeyType
- type KeyVaultProperties
- type Kind
- type LargeFileSharesState
- type LastAccessTimeTrackingPolicy
- type LeaseContainerRequest
- type LeaseContainerRequestAction
- type LeaseContainerResponse
- type LeaseDuration
- type LeaseShareAction
- type LeaseShareRequest
- type LeaseShareResponse
- type LeaseState
- type LeaseStatus
- type LegalHold
- type LegalHoldProperties
- type ListAccountSasResponse
- type ListBlobInventoryPolicy
- type ListContainerItem
- type ListContainerItems
- type ListContainersInclude
- type ListEncryptionScopesInclude
- type ListLocalUserIncludeParam
- type ListQueue
- type ListQueueProperties
- type ListQueueResource
- type ListQueueServices
- type ListServiceSasResponse
- type ListTableResource
- type ListTableServices
- type LocalUser
- type LocalUserKeys
- type LocalUserProperties
- type LocalUserRegeneratePasswordResult
- type LocalUsers
- type LocalUsersClient
- func (client *LocalUsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (LocalUsersClientCreateOrUpdateResponse, error)
- func (client *LocalUsersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (LocalUsersClientDeleteResponse, error)
- func (client *LocalUsersClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (LocalUsersClientGetResponse, error)
- func (client *LocalUsersClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (LocalUsersClientListKeysResponse, error)
- func (client *LocalUsersClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[LocalUsersClientListResponse]
- func (client *LocalUsersClient) RegeneratePassword(ctx context.Context, resourceGroupName string, accountName string, ...) (LocalUsersClientRegeneratePasswordResponse, error)
- type LocalUsersClientCreateOrUpdateOptions
- type LocalUsersClientCreateOrUpdateResponse
- type LocalUsersClientDeleteOptions
- type LocalUsersClientDeleteResponse
- type LocalUsersClientGetOptions
- type LocalUsersClientGetResponse
- type LocalUsersClientListKeysOptions
- type LocalUsersClientListKeysResponse
- type LocalUsersClientListOptions
- type LocalUsersClientListResponse
- type LocalUsersClientRegeneratePasswordOptions
- type LocalUsersClientRegeneratePasswordResponse
- type ManagementPoliciesClient
- func (client *ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (ManagementPoliciesClientCreateOrUpdateResponse, error)
- func (client *ManagementPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (ManagementPoliciesClientDeleteResponse, error)
- func (client *ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (ManagementPoliciesClientGetResponse, error)
- type ManagementPoliciesClientCreateOrUpdateOptions
- type ManagementPoliciesClientCreateOrUpdateResponse
- type ManagementPoliciesClientDeleteOptions
- type ManagementPoliciesClientDeleteResponse
- type ManagementPoliciesClientGetOptions
- type ManagementPoliciesClientGetResponse
- type ManagementPolicy
- type ManagementPolicyAction
- type ManagementPolicyBaseBlob
- type ManagementPolicyDefinition
- type ManagementPolicyFilter
- type ManagementPolicyName
- type ManagementPolicyProperties
- type ManagementPolicyRule
- type ManagementPolicySchema
- type ManagementPolicySnapShot
- type ManagementPolicyVersion
- type MetricSpecification
- type MigrationName
- type MigrationState
- type MigrationStatus
- type MinimumTLSVersion
- type Multichannel
- type Name
- type NetworkRuleSet
- type NetworkSecurityPerimeter
- type NetworkSecurityPerimeterConfiguration
- type NetworkSecurityPerimeterConfigurationList
- type NetworkSecurityPerimeterConfigurationProperties
- type NetworkSecurityPerimeterConfigurationPropertiesProfile
- type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation
- type NetworkSecurityPerimeterConfigurationProvisioningState
- type NetworkSecurityPerimeterConfigurationsClient
- func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], ...)
- func (client *NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error)
- func (client *NetworkSecurityPerimeterConfigurationsClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse]
- type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions
- type NetworkSecurityPerimeterConfigurationsClientGetOptions
- type NetworkSecurityPerimeterConfigurationsClientGetResponse
- type NetworkSecurityPerimeterConfigurationsClientListOptions
- type NetworkSecurityPerimeterConfigurationsClientListResponse
- type NetworkSecurityPerimeterConfigurationsClientReconcileResponse
- type NspAccessRule
- type NspAccessRuleDirection
- type NspAccessRuleProperties
- type NspAccessRulePropertiesSubscriptionsItem
- type ObjectReplicationPolicies
- type ObjectReplicationPoliciesClient
- func (client *ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (ObjectReplicationPoliciesClientCreateOrUpdateResponse, error)
- func (client *ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (ObjectReplicationPoliciesClientDeleteResponse, error)
- func (client *ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (ObjectReplicationPoliciesClientGetResponse, error)
- func (client *ObjectReplicationPoliciesClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[ObjectReplicationPoliciesClientListResponse]
- type ObjectReplicationPoliciesClientCreateOrUpdateOptions
- type ObjectReplicationPoliciesClientCreateOrUpdateResponse
- type ObjectReplicationPoliciesClientDeleteOptions
- type ObjectReplicationPoliciesClientDeleteResponse
- type ObjectReplicationPoliciesClientGetOptions
- type ObjectReplicationPoliciesClientGetResponse
- type ObjectReplicationPoliciesClientListOptions
- type ObjectReplicationPoliciesClientListResponse
- type ObjectReplicationPolicy
- type ObjectReplicationPolicyFilter
- type ObjectReplicationPolicyProperties
- type ObjectReplicationPolicyRule
- type ObjectType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationProperties
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PermissionScope
- type Permissions
- type PostFailoverRedundancy
- type PostPlannedFailoverRedundancy
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (PrivateEndpointConnectionsClientDeleteResponse, error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
- func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, ...) (PrivateEndpointConnectionsClientPutResponse, error)
- type PrivateEndpointConnectionsClientDeleteOptions
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListOptions
- type PrivateEndpointConnectionsClientListResponse
- type PrivateEndpointConnectionsClientPutOptions
- type PrivateEndpointConnectionsClientPutResponse
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- type PrivateLinkResourcesClientListByStorageAccountOptions
- type PrivateLinkResourcesClientListByStorageAccountResponse
- type PrivateLinkServiceConnectionState
- type ProtectedAppendWritesHistory
- type ProtocolSettings
- type ProvisioningIssue
- type ProvisioningIssueProperties
- type ProvisioningState
- type ProxyResource
- type ProxyResourceAutoGenerated
- type PublicAccess
- type PublicNetworkAccess
- type Queue
- type QueueClient
- func (client *QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueClientCreateResponse, error)
- func (client *QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueClientDeleteResponse, error)
- func (client *QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueClientGetResponse, error)
- func (client *QueueClient) NewListPager(resourceGroupName string, accountName string, options *QueueClientListOptions) *runtime.Pager[QueueClientListResponse]
- func (client *QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueClientUpdateResponse, error)
- type QueueClientCreateOptions
- type QueueClientCreateResponse
- type QueueClientDeleteOptions
- type QueueClientDeleteResponse
- type QueueClientGetOptions
- type QueueClientGetResponse
- type QueueClientListOptions
- type QueueClientListResponse
- type QueueClientUpdateOptions
- type QueueClientUpdateResponse
- type QueueProperties
- type QueueServiceProperties
- type QueueServicePropertiesProperties
- type QueueServicesClient
- func (client *QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueServicesClientGetServicePropertiesResponse, error)
- func (client *QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueServicesClientListResponse, error)
- func (client *QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (QueueServicesClientSetServicePropertiesResponse, error)
- type QueueServicesClientGetServicePropertiesOptions
- type QueueServicesClientGetServicePropertiesResponse
- type QueueServicesClientListOptions
- type QueueServicesClientListResponse
- type QueueServicesClientSetServicePropertiesOptions
- type QueueServicesClientSetServicePropertiesResponse
- type Reason
- type ReasonCode
- type Resource
- type ResourceAccessRule
- type ResourceAssociationAccessMode
- type ResourceAutoGenerated
- type RestorePolicyProperties
- type Restriction
- type RootSquashType
- type RoutingChoice
- type RoutingPreference
- type RuleType
- type RunResult
- type RunStatusEnum
- type SKU
- type SKUCapability
- type SKUConversionStatus
- type SKUInformation
- type SKUListResult
- type SKUName
- type SKUTier
- type SKUsClient
- type SKUsClientListOptions
- type SKUsClientListResponse
- type SSHPublicKey
- type SasPolicy
- type Schedule
- type ServiceSasParameters
- type ServiceSpecification
- type Services
- type Severity
- type ShareAccessTier
- type SignedIdentifier
- type SignedResource
- type SignedResourceTypes
- type SmbSetting
- type State
- type StorageAccountExpand
- type SystemData
- type Table
- type TableAccessPolicy
- type TableClient
- func (client *TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, ...) (TableClientCreateResponse, error)
- func (client *TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, ...) (TableClientDeleteResponse, error)
- func (client *TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (TableClientGetResponse, error)
- func (client *TableClient) NewListPager(resourceGroupName string, accountName string, options *TableClientListOptions) *runtime.Pager[TableClientListResponse]
- func (client *TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, ...) (TableClientUpdateResponse, error)
- type TableClientCreateOptions
- type TableClientCreateResponse
- type TableClientDeleteOptions
- type TableClientDeleteResponse
- type TableClientGetOptions
- type TableClientGetResponse
- type TableClientListOptions
- type TableClientListResponse
- type TableClientUpdateOptions
- type TableClientUpdateResponse
- type TableProperties
- type TableServiceProperties
- type TableServicePropertiesProperties
- type TableServicesClient
- func (client *TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (TableServicesClientGetServicePropertiesResponse, error)
- func (client *TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, ...) (TableServicesClientListResponse, error)
- func (client *TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, ...) (TableServicesClientSetServicePropertiesResponse, error)
- type TableServicesClientGetServicePropertiesOptions
- type TableServicesClientGetServicePropertiesResponse
- type TableServicesClientListOptions
- type TableServicesClientListResponse
- type TableServicesClientSetServicePropertiesOptions
- type TableServicesClientSetServicePropertiesResponse
- type TableSignedIdentifier
- type TagFilter
- type TagProperty
- type TaskAssignment
- type TaskAssignmentExecutionContext
- type TaskAssignmentInstancesReportClient
- type TaskAssignmentInstancesReportClientListOptions
- type TaskAssignmentInstancesReportClientListResponse
- type TaskAssignmentProperties
- type TaskAssignmentReport
- type TaskAssignmentUpdateExecutionContext
- type TaskAssignmentUpdateParameters
- type TaskAssignmentUpdateProperties
- type TaskAssignmentUpdateReport
- type TaskAssignmentsClient
- func (client *TaskAssignmentsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TaskAssignmentsClientCreateResponse], error)
- func (client *TaskAssignmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TaskAssignmentsClientDeleteResponse], error)
- func (client *TaskAssignmentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TaskAssignmentsClientUpdateResponse], error)
- func (client *TaskAssignmentsClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (TaskAssignmentsClientGetResponse, error)
- func (client *TaskAssignmentsClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[TaskAssignmentsClientListResponse]
- type TaskAssignmentsClientBeginCreateOptions
- type TaskAssignmentsClientBeginDeleteOptions
- type TaskAssignmentsClientBeginUpdateOptions
- type TaskAssignmentsClientCreateResponse
- type TaskAssignmentsClientDeleteResponse
- type TaskAssignmentsClientGetOptions
- type TaskAssignmentsClientGetResponse
- type TaskAssignmentsClientListOptions
- type TaskAssignmentsClientListResponse
- type TaskAssignmentsClientUpdateResponse
- type TaskAssignmentsInstancesReportClient
- type TaskAssignmentsInstancesReportClientListOptions
- type TaskAssignmentsInstancesReportClientListResponse
- type TaskAssignmentsList
- type TaskReportInstance
- type TaskReportProperties
- type TaskReportSummary
- type TrackedResource
- type TriggerParameters
- type TriggerParametersUpdate
- type TriggerType
- type UpdateHistoryProperty
- type Usage
- type UsageListResult
- type UsageName
- type UsageUnit
- type UsagesClient
- type UsagesClientListByLocationOptions
- type UsagesClientListByLocationResponse
- type UserAssignedIdentity
- type VirtualNetworkRule
Examples ¶
- AccountsClient.BeginAbortHierarchicalNamespaceMigration
- AccountsClient.BeginCreate (NfsV3AccountCreate)
- AccountsClient.BeginCreate (StorageAccountCreate)
- AccountsClient.BeginCreate (StorageAccountCreateAllowedCopyScopeToAad)
- AccountsClient.BeginCreate (StorageAccountCreateAllowedCopyScopeToPrivateLink)
- AccountsClient.BeginCreate (StorageAccountCreateDisallowPublicNetworkAccess)
- AccountsClient.BeginCreate (StorageAccountCreateDnsEndpointTypeToAzureDnsZone)
- AccountsClient.BeginCreate (StorageAccountCreateDnsEndpointTypeToStandard)
- AccountsClient.BeginCreate (StorageAccountCreateEnablePublicNetworkAccess)
- AccountsClient.BeginCreate (StorageAccountCreatePremiumBlockBlobStorage)
- AccountsClient.BeginCreate (StorageAccountCreateUserAssignedEncryptionIdentityWithCmk)
- AccountsClient.BeginCreate (StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId)
- AccountsClient.BeginCreate (StorageAccountCreateWithImmutabilityPolicy)
- AccountsClient.BeginCustomerInitiatedMigration
- AccountsClient.BeginFailover (StorageAccountFailover)
- AccountsClient.BeginFailover (StorageAccountFailoverPlanned)
- AccountsClient.BeginHierarchicalNamespaceMigration
- AccountsClient.BeginRestoreBlobRanges
- AccountsClient.CheckNameAvailability
- AccountsClient.Delete
- AccountsClient.GetCustomerInitiatedMigration (StorageAccountGetMigrationFailed)
- AccountsClient.GetCustomerInitiatedMigration (StorageAccountGetMigrationInProgress)
- AccountsClient.GetProperties (StorageAccountGetAsyncSkuConversionStatus)
- AccountsClient.GetProperties (StorageAccountGetProperties)
- AccountsClient.GetProperties (StorageAccountGetPropertiesCmkEnabled)
- AccountsClient.GetProperties (StorageAccountGetPropertiesCmkVersionExpirationTime)
- AccountsClient.GetProperties (StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse)
- AccountsClient.GetProperties (StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue)
- AccountsClient.ListAccountSAS
- AccountsClient.ListKeys
- AccountsClient.ListServiceSAS
- AccountsClient.NewListByResourceGroupPager
- AccountsClient.NewListPager
- AccountsClient.RegenerateKey (StorageAccountRegenerateKerbKey)
- AccountsClient.RegenerateKey (StorageAccountRegenerateKey)
- AccountsClient.RevokeUserDelegationKeys
- AccountsClient.Update (StorageAccountEnableAd)
- AccountsClient.Update (StorageAccountEnableCmk)
- AccountsClient.Update (StorageAccountUpdate)
- AccountsClient.Update (StorageAccountUpdateAllowedCopyScopeToAad)
- AccountsClient.Update (StorageAccountUpdateDisablePublicNetworkAccess)
- AccountsClient.Update (StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk)
- AccountsClient.Update (StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId)
- AccountsClient.Update (StorageAccountUpdateWithImmutabilityPolicy)
- BlobContainersClient.BeginObjectLevelWorm
- BlobContainersClient.ClearLegalHold
- BlobContainersClient.Create (PutContainerWithDefaultEncryptionScope)
- BlobContainersClient.Create (PutContainerWithObjectLevelWorm)
- BlobContainersClient.Create (PutContainers)
- BlobContainersClient.CreateOrUpdateImmutabilityPolicy (CreateOrUpdateImmutabilityPolicy)
- BlobContainersClient.CreateOrUpdateImmutabilityPolicy (CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll)
- BlobContainersClient.Delete
- BlobContainersClient.DeleteImmutabilityPolicy
- BlobContainersClient.ExtendImmutabilityPolicy
- BlobContainersClient.Get (GetBlobContainersGetWithAllowProtectedAppendWritesAll)
- BlobContainersClient.Get (GetContainers)
- BlobContainersClient.GetImmutabilityPolicy
- BlobContainersClient.Lease (AcquireALeaseOnAContainer)
- BlobContainersClient.Lease (BreakALeaseOnAContainer)
- BlobContainersClient.LockImmutabilityPolicy
- BlobContainersClient.NewListPager (ListContainers)
- BlobContainersClient.NewListPager (ListDeletedContainers)
- BlobContainersClient.SetLegalHold (SetLegalHoldContainers)
- BlobContainersClient.SetLegalHold (SetLegalHoldContainersWithAllowProtectedAppendWritesAll)
- BlobContainersClient.Update
- BlobInventoryPoliciesClient.CreateOrUpdate (StorageAccountSetBlobInventoryPolicy)
- BlobInventoryPoliciesClient.CreateOrUpdate (StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount)
- BlobInventoryPoliciesClient.CreateOrUpdate (StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount)
- BlobInventoryPoliciesClient.Delete
- BlobInventoryPoliciesClient.Get
- BlobInventoryPoliciesClient.NewListPager
- BlobServicesClient.GetServiceProperties
- BlobServicesClient.NewListPager
- BlobServicesClient.SetServiceProperties (BlobServicesPutAllowPermanentDelete)
- BlobServicesClient.SetServiceProperties (BlobServicesPutLastAccessTimeBasedTracking)
- BlobServicesClient.SetServiceProperties (PutBlobServices)
- DeletedAccountsClient.Get
- DeletedAccountsClient.NewListPager
- EncryptionScopesClient.Get
- EncryptionScopesClient.NewListPager
- EncryptionScopesClient.Patch
- EncryptionScopesClient.Put (StorageAccountPutEncryptionScope)
- EncryptionScopesClient.Put (StorageAccountPutEncryptionScopeWithInfrastructureEncryption)
- FileServicesClient.GetServiceProperties
- FileServicesClient.List
- FileServicesClient.SetServiceProperties (PutFileServices)
- FileServicesClient.SetServiceProperties (PutFileServicesEnableSecureSmbFeatures)
- FileServicesClient.SetServiceProperties (PutFileServicesEnableSmbMultichannel)
- FileSharesClient.Create (CreateNfsShares)
- FileSharesClient.Create (PutShares)
- FileSharesClient.Create (PutSharesWithAccessTier)
- FileSharesClient.Delete
- FileSharesClient.Get (GetShareStats)
- FileSharesClient.Get (GetShares)
- FileSharesClient.Lease (AcquireALeaseOnAShare)
- FileSharesClient.Lease (BreakALeaseOnAShare)
- FileSharesClient.NewListPager (ListDeletedShares)
- FileSharesClient.NewListPager (ListShareSnapshots)
- FileSharesClient.NewListPager (ListShares)
- FileSharesClient.Restore
- FileSharesClient.Update (UpdateShareAcls)
- FileSharesClient.Update (UpdateShares)
- LocalUsersClient.CreateOrUpdate (CreateLocalUser)
- LocalUsersClient.CreateOrUpdate (CreateNfSv3EnabledLocalUser)
- LocalUsersClient.CreateOrUpdate (UpdateLocalUser)
- LocalUsersClient.Delete
- LocalUsersClient.Get
- LocalUsersClient.ListKeys
- LocalUsersClient.NewListPager (ListLocalUsers)
- LocalUsersClient.NewListPager (ListNfSv3EnabledLocalUsers)
- LocalUsersClient.RegeneratePassword
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicies)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyColdTierActions)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyForBlockAndAppendBlobs)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyHotTierActions)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyLastTierChangeTimeActions)
- ManagementPoliciesClient.CreateOrUpdate (StorageAccountSetManagementPolicyWithSnapshotAndVersion)
- ManagementPoliciesClient.Delete
- ManagementPoliciesClient.Get
- NetworkSecurityPerimeterConfigurationsClient.BeginReconcile
- NetworkSecurityPerimeterConfigurationsClient.Get
- NetworkSecurityPerimeterConfigurationsClient.NewListPager
- ObjectReplicationPoliciesClient.CreateOrUpdate (StorageAccountCreateObjectReplicationPolicyOnDestination)
- ObjectReplicationPoliciesClient.CreateOrUpdate (StorageAccountCreateObjectReplicationPolicyOnSource)
- ObjectReplicationPoliciesClient.CreateOrUpdate (StorageAccountUpdateObjectReplicationPolicyOnDestination)
- ObjectReplicationPoliciesClient.CreateOrUpdate (StorageAccountUpdateObjectReplicationPolicyOnSource)
- ObjectReplicationPoliciesClient.Delete
- ObjectReplicationPoliciesClient.Get
- ObjectReplicationPoliciesClient.NewListPager
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.Delete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListPager
- PrivateEndpointConnectionsClient.Put
- PrivateLinkResourcesClient.ListByStorageAccount
- QueueClient.Create (QueueOperationPut)
- QueueClient.Create (QueueOperationPutWithMetadata)
- QueueClient.Delete
- QueueClient.Get
- QueueClient.NewListPager
- QueueClient.Update
- QueueServicesClient.GetServiceProperties
- QueueServicesClient.List
- QueueServicesClient.SetServiceProperties
- SKUsClient.NewListPager
- TableClient.Create (TableOperationPut)
- TableClient.Create (TableOperationPutOrPatchAcls)
- TableClient.Delete
- TableClient.Get
- TableClient.NewListPager
- TableClient.Update (TableOperationPatch)
- TableServicesClient.GetServiceProperties
- TableServicesClient.List
- TableServicesClient.SetServiceProperties
- TaskAssignmentInstancesReportClient.NewListPager
- TaskAssignmentsClient.BeginCreate (PutStorageTaskAssignment)
- TaskAssignmentsClient.BeginCreate (PutStorageTaskAssignmentRequiredProperties)
- TaskAssignmentsClient.BeginDelete
- TaskAssignmentsClient.BeginUpdate
- TaskAssignmentsClient.Get
- TaskAssignmentsClient.NewListPager
- TaskAssignmentsInstancesReportClient.NewListPager
- UsagesClient.NewListByLocationPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPolicy ¶
type AccessPolicy struct { // Expiry time of the access policy ExpiryTime *time.Time // List of abbreviated permissions. Permission *string // Start time of the access policy StartTime *time.Time }
func (AccessPolicy) MarshalJSON ¶
func (a AccessPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessPolicy.
func (*AccessPolicy) UnmarshalJSON ¶
func (a *AccessPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessPolicy.
type AccessTier ¶
type AccessTier string
AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.
const ( AccessTierCold AccessTier = "Cold" AccessTierCool AccessTier = "Cool" AccessTierHot AccessTier = "Hot" AccessTierPremium AccessTier = "Premium" )
func PossibleAccessTierValues ¶
func PossibleAccessTierValues() []AccessTier
PossibleAccessTierValues returns the possible values for the AccessTier const type.
type Account ¶ added in v0.3.0
type Account struct { // REQUIRED; The geo-location where the resource lives Location *string // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // The identity of the resource. Identity *Identity // Properties of the storage account. Properties *AccountProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; Gets the Kind. Kind *Kind // READ-ONLY; The name of the resource Name *string // READ-ONLY; Gets the SKU. SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Account - The storage account.
func (Account) MarshalJSON ¶ added in v0.3.0
MarshalJSON implements the json.Marshaller interface for type Account.
func (*Account) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Account.
type AccountCheckNameAvailabilityParameters ¶ added in v0.3.0
type AccountCheckNameAvailabilityParameters struct { // REQUIRED; The storage account name. Name *string // CONSTANT; The type of resource, Microsoft.Storage/storageAccounts // Field has constant value "Microsoft.Storage/storageAccounts", any specified value is ignored. Type *string }
AccountCheckNameAvailabilityParameters - The parameters used to check the availability of the storage account name.
func (AccountCheckNameAvailabilityParameters) MarshalJSON ¶ added in v1.1.0
func (a AccountCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountCheckNameAvailabilityParameters.
func (*AccountCheckNameAvailabilityParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountCheckNameAvailabilityParameters.
type AccountCreateParameters ¶ added in v0.3.0
type AccountCreateParameters struct { // REQUIRED; Required. Indicates the type of storage account. Kind *Kind // REQUIRED; 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 // REQUIRED; Required. Gets or sets the SKU name. SKU *SKU // Optional. Set the extended location of the resource. If not set, the storage account will be created in Azure main region. // Otherwise it will be created in the specified extended location ExtendedLocation *ExtendedLocation // The identity of the resource. Identity *Identity // The parameters used to create the storage account. Properties *AccountPropertiesCreateParameters // 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 }
AccountCreateParameters - The parameters used when creating a storage account.
func (AccountCreateParameters) MarshalJSON ¶ added in v0.3.0
func (a AccountCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountCreateParameters.
func (*AccountCreateParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountCreateParameters.
type AccountImmutabilityPolicyProperties ¶
type AccountImmutabilityPolicyProperties struct { // This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can // be written to an append blob while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. AllowProtectedAppendWrites *bool // The immutability period for the blobs in the container since the policy creation, in days. ImmutabilityPeriodSinceCreationInDays *int32 // The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows // increase and decrease of immutability retention time and also allows toggling // allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy // can only be created in a Disabled or Unlocked state and can be toggled between // the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. State *AccountImmutabilityPolicyState }
AccountImmutabilityPolicyProperties - This defines account-level immutability policy properties.
func (AccountImmutabilityPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (a AccountImmutabilityPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountImmutabilityPolicyProperties.
func (*AccountImmutabilityPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountImmutabilityPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountImmutabilityPolicyProperties.
type AccountImmutabilityPolicyState ¶
type AccountImmutabilityPolicyState string
AccountImmutabilityPolicyState - The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.
const ( AccountImmutabilityPolicyStateDisabled AccountImmutabilityPolicyState = "Disabled" AccountImmutabilityPolicyStateLocked AccountImmutabilityPolicyState = "Locked" AccountImmutabilityPolicyStateUnlocked AccountImmutabilityPolicyState = "Unlocked" )
func PossibleAccountImmutabilityPolicyStateValues ¶
func PossibleAccountImmutabilityPolicyStateValues() []AccountImmutabilityPolicyState
PossibleAccountImmutabilityPolicyStateValues returns the possible values for the AccountImmutabilityPolicyState const type.
type AccountInternetEndpoints ¶ added in v0.3.0
type AccountInternetEndpoints struct { // READ-ONLY; Gets the blob endpoint. Blob *string // READ-ONLY; Gets the dfs endpoint. Dfs *string // READ-ONLY; Gets the file endpoint. File *string // READ-ONLY; Gets the web endpoint. Web *string }
AccountInternetEndpoints - The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint.
func (AccountInternetEndpoints) MarshalJSON ¶ added in v1.1.0
func (a AccountInternetEndpoints) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountInternetEndpoints.
func (*AccountInternetEndpoints) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountInternetEndpoints) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountInternetEndpoints.
type AccountKey ¶ added in v0.3.0
type AccountKey struct { // READ-ONLY; Creation time of the key, in round trip date format. CreationTime *time.Time // READ-ONLY; Name of the key. KeyName *string // READ-ONLY; Permissions for the key -- read-only or full permissions. Permissions *KeyPermission // READ-ONLY; Base 64-encoded value of the key. Value *string }
AccountKey - An access key for the storage account.
func (AccountKey) MarshalJSON ¶ added in v0.3.0
func (a AccountKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountKey.
func (*AccountKey) UnmarshalJSON ¶ added in v0.3.0
func (a *AccountKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountKey.
type AccountListKeysResult ¶ added in v0.3.0
type AccountListKeysResult struct { // READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account. Keys []*AccountKey }
AccountListKeysResult - The response from the ListKeys operation.
func (AccountListKeysResult) MarshalJSON ¶ added in v0.3.0
func (a AccountListKeysResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountListKeysResult.
func (*AccountListKeysResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountListKeysResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountListKeysResult.
type AccountListResult ¶ added in v0.3.0
type AccountListResult struct { // READ-ONLY; Request URL that can be used to query next page of storage accounts. Returned when total number of requested // storage accounts exceed maximum page size. NextLink *string // READ-ONLY; Gets the list of storage accounts and their properties. Value []*Account }
AccountListResult - The response from the List Storage Accounts operation.
func (AccountListResult) MarshalJSON ¶ added in v0.3.0
func (a AccountListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountListResult.
func (*AccountListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.
type AccountMicrosoftEndpoints ¶ added in v0.3.0
type AccountMicrosoftEndpoints struct { // READ-ONLY; Gets the blob endpoint. Blob *string // READ-ONLY; Gets the dfs endpoint. Dfs *string // READ-ONLY; Gets the file endpoint. File *string // READ-ONLY; Gets the queue endpoint. Queue *string // READ-ONLY; Gets the table endpoint. Table *string // READ-ONLY; Gets the web endpoint. Web *string }
AccountMicrosoftEndpoints - The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing endpoint.
func (AccountMicrosoftEndpoints) MarshalJSON ¶ added in v1.1.0
func (a AccountMicrosoftEndpoints) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountMicrosoftEndpoints.
func (*AccountMicrosoftEndpoints) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountMicrosoftEndpoints) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountMicrosoftEndpoints.
type AccountMigration ¶ added in v1.4.0
type AccountMigration struct { // REQUIRED; The properties of a storage account’s ongoing or enqueued migration. StorageAccountMigrationDetails *AccountMigrationProperties // current value is 'default' for customer initiated migration Name *string // SrpAccountMigrationType in ARM contract which is 'accountMigrations' Type *string // READ-ONLY; Migration Resource Id ID *string }
AccountMigration - The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current SKU or region.
func (AccountMigration) MarshalJSON ¶ added in v1.4.0
func (a AccountMigration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountMigration.
func (*AccountMigration) UnmarshalJSON ¶ added in v1.4.0
func (a *AccountMigration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigration.
type AccountMigrationProperties ¶ added in v1.4.0
type AccountMigrationProperties struct { // REQUIRED; Target sku name for the account TargetSKUName *SKUName // READ-ONLY; Reason for migration failure MigrationFailedDetailedReason *string // READ-ONLY; Error code for migration failure MigrationFailedReason *string // READ-ONLY; Current status of migration MigrationStatus *MigrationStatus }
AccountMigrationProperties - The properties of a storage account’s ongoing or enqueued migration.
func (AccountMigrationProperties) MarshalJSON ¶ added in v1.4.0
func (a AccountMigrationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountMigrationProperties.
func (*AccountMigrationProperties) UnmarshalJSON ¶ added in v1.4.0
func (a *AccountMigrationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountMigrationProperties.
type AccountProperties ¶ added in v0.3.0
type AccountProperties struct { // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false // for this property. AllowBlobPublicAccess *bool // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object // replication policies will involve storage accounts in different AAD // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. DefaultToOAuthAuthentication *bool // Enables extended group support with local users feature, if set to true EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool // NFS 3.0 protocol support enabled if set to true. EnableNfsV3 *bool // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the containers in the account by default. ImmutableStorageWithVersioning *ImmutableStorageAccount // Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool // Enables local users feature, if set to true IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true IsSftpEnabled *bool LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. MinimumTLSVersion *MinimumTLSVersion // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer RoutingPreference *RoutingPreference // This property is readOnly and is set by server during asynchronous storage account sku conversion operations. StorageAccountSKUConversionStatus *AccountSKUConversionStatus // READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access // tier is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. AccessTier *AccessTier // READ-ONLY; If customer initiated account migration is in progress, the value will be true else it will be null. AccountMigrationInProgress *bool // READ-ONLY; Blob restore status BlobRestoreStatus *BlobRestoreStatus // READ-ONLY; Gets the creation date and time of the storage account in UTC. CreationTime *time.Time // READ-ONLY; Gets the custom domain the user assigned to this storage account. CustomDomain *CustomDomain // READ-ONLY; Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption // READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. FailoverInProgress *bool // READ-ONLY; Geo Replication Stats GeoReplicationStats *GeoReplicationStats // READ-ONLY; This property will be set to true or false on an event of ongoing migration. Default value is null. IsSKUConversionBlocked *bool // READ-ONLY; Storage account keys creation time. KeyCreationTime *KeyCreationTime // READ-ONLY; KeyPolicy assigned to the storage account. KeyPolicy *KeyPolicy // 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 StandardGRS or StandardRAGRS. LastGeoFailoverTime *time.Time // READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet // READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that StandardZRS // and PremiumLRS accounts only return the blob endpoint. PrimaryEndpoints *Endpoints // READ-ONLY; Gets the location of the primary data center for the storage account. PrimaryLocation *string // READ-ONLY; List of private endpoint connection associated with the specified storage account PrivateEndpointConnections []*PrivateEndpointConnection // READ-ONLY; Gets the status of the storage account at the time the operation was called. ProvisioningState *ProvisioningState // READ-ONLY; SasPolicy assigned to the storage account. SasPolicy *SasPolicy // 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 // READ-ONLY; Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType // is StandardGRS or StandardRAGRS. SecondaryLocation *string // READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. StatusOfPrimary *AccountStatus // 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 StandardGRS or StandardRAGRS. StatusOfSecondary *AccountStatus }
AccountProperties - Properties of the storage account.
func (AccountProperties) MarshalJSON ¶ added in v0.3.0
func (a AccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountProperties.
func (*AccountProperties) UnmarshalJSON ¶ added in v0.3.0
func (a *AccountProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.
type AccountPropertiesCreateParameters ¶ added in v0.3.0
type AccountPropertiesCreateParameters struct { // Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier // is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. AccessTier *AccessTier // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false // for this property. AllowBlobPublicAccess *bool // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object // replication policies will involve storage accounts in different AAD // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // 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 // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. DefaultToOAuthAuthentication *bool // Enables extended group support with local users feature, if set to true EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. EnableHTTPSTrafficOnly *bool // NFS 3.0 protocol support enabled if set to true. EnableNfsV3 *bool // Encryption settings to be used for server-side encryption for the storage account. Encryption *Encryption // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the new containers in the account by default. ImmutableStorageWithVersioning *ImmutableStorageAccount // Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool // Enables local users feature, if set to true IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true IsSftpEnabled *bool // KeyPolicy assigned to the storage account. KeyPolicy *KeyPolicy LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. MinimumTLSVersion *MinimumTLSVersion // Network rule set NetworkRuleSet *NetworkRuleSet // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. // Value is optional but if passed in, must be 'Enabled', 'Disabled' or // 'SecuredByPerimeter'. PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer RoutingPreference *RoutingPreference // SasPolicy assigned to the storage account. SasPolicy *SasPolicy }
AccountPropertiesCreateParameters - The parameters used to create the storage account.
func (AccountPropertiesCreateParameters) MarshalJSON ¶ added in v1.1.0
func (a AccountPropertiesCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountPropertiesCreateParameters.
func (*AccountPropertiesCreateParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountPropertiesCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountPropertiesCreateParameters.
type AccountPropertiesUpdateParameters ¶ added in v0.3.0
type AccountPropertiesUpdateParameters struct { // Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier // is the default value for premium block blobs storage account type and it cannot // be changed for the premium block blobs storage account type. AccessTier *AccessTier // Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is false // for this property. AllowBlobPublicAccess *bool // Allow or disallow cross AAD tenant object replication. Set this property to true for new or existing accounts only if object // replication policies will involve storage accounts in different AAD // tenants. The default interpretation is false for new accounts to follow best security practices by default. AllowCrossTenantReplication *bool // false, then all requests, including shared access signatures, must be authorized // with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. AllowSharedKeyAccess *bool // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. AllowedCopyScope *AllowedCopyScope // Provides the identity based authentication settings for Azure Files. AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication // 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 // Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, // which creates accounts in an Azure DNS Zone and the endpoint URL // will have an alphanumeric DNS Zone identifier. DNSEndpointType *DNSEndpointType // A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false // for this property. DefaultToOAuthAuthentication *bool // Enables extended group support with local users feature, if set to true EnableExtendedGroups *bool // Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool // Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled. Encryption *Encryption // The property is immutable and can only be set to true at the account creation time. When set to true, it enables object // level immutability for all the containers in the account by default. ImmutableStorageWithVersioning *ImmutableStorageAccount // Enables local users feature, if set to true IsLocalUserEnabled *bool // Enables Secure File Transfer Protocol, if set to true IsSftpEnabled *bool // KeyPolicy assigned to the storage account. KeyPolicy *KeyPolicy LargeFileSharesState *LargeFileSharesState // Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. MinimumTLSVersion *MinimumTLSVersion // Network rule set NetworkRuleSet *NetworkRuleSet // Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. // Value is optional but if passed in, must be 'Enabled', 'Disabled' or // 'SecuredByPerimeter'. PublicNetworkAccess *PublicNetworkAccess // Maintains information about the network routing choice opted by the user for data transfer RoutingPreference *RoutingPreference // SasPolicy assigned to the storage account. SasPolicy *SasPolicy }
AccountPropertiesUpdateParameters - The parameters used when updating a storage account.
func (AccountPropertiesUpdateParameters) MarshalJSON ¶ added in v1.1.0
func (a AccountPropertiesUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountPropertiesUpdateParameters.
func (*AccountPropertiesUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountPropertiesUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountPropertiesUpdateParameters.
type AccountRegenerateKeyParameters ¶ added in v0.3.0
type AccountRegenerateKeyParameters struct { // REQUIRED; The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. KeyName *string }
AccountRegenerateKeyParameters - The parameters used to regenerate the storage account key.
func (AccountRegenerateKeyParameters) MarshalJSON ¶ added in v1.1.0
func (a AccountRegenerateKeyParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountRegenerateKeyParameters.
func (*AccountRegenerateKeyParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountRegenerateKeyParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountRegenerateKeyParameters.
type AccountSKUConversionStatus ¶ added in v0.5.0
type AccountSKUConversionStatus struct { // This property represents the target sku name to which the account sku is being converted asynchronously. TargetSKUName *SKUName // READ-ONLY; This property represents the sku conversion end time. EndTime *string // READ-ONLY; This property indicates the current sku conversion status. SKUConversionStatus *SKUConversionStatus // READ-ONLY; This property represents the sku conversion start time. StartTime *string }
AccountSKUConversionStatus - This defines the sku conversion status object for asynchronous sku conversions.
func (AccountSKUConversionStatus) MarshalJSON ¶ added in v1.1.0
func (a AccountSKUConversionStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountSKUConversionStatus.
func (*AccountSKUConversionStatus) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountSKUConversionStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKUConversionStatus.
type AccountSasParameters ¶
type AccountSasParameters struct { // REQUIRED; 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). Permissions *Permissions // REQUIRED; 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. ResourceTypes *SignedResourceTypes // REQUIRED; The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), // File (f). Services *Services SharedAccessExpiryTime *time.Time // An IP address or a range of IP addresses from which to accept requests. IPAddressOrRange *string // The key to sign the account SAS token with. KeyToSign *string // The protocol permitted for a request made with the account SAS. Protocols *HTTPProtocol SharedAccessStartTime *time.Time }
AccountSasParameters - The parameters to list SAS credentials of a storage account.
func (AccountSasParameters) MarshalJSON ¶
func (a AccountSasParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountSasParameters.
func (*AccountSasParameters) UnmarshalJSON ¶
func (a *AccountSasParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountSasParameters.
type AccountStatus ¶
type AccountStatus string
AccountStatus - Gets the status indicating whether the primary location of the storage account is available or unavailable.
const ( AccountStatusAvailable AccountStatus = "available" )
func PossibleAccountStatusValues ¶
func PossibleAccountStatusValues() []AccountStatus
PossibleAccountStatusValues returns the possible values for the AccountStatus const type.
type AccountUpdateParameters ¶ added in v0.3.0
type AccountUpdateParameters struct { // The identity of the resource. Identity *Identity // Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Kind *Kind // The parameters used when updating a storage account. Properties *AccountPropertiesUpdateParameters // Gets or sets the SKU name. Note that the SKU name cannot be updated to StandardZRS, PremiumLRS or Premium_ZRS, nor can // accounts of those SKU names be updated to any other value. SKU *SKU // 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 }
AccountUpdateParameters - The parameters that can be provided when updating the storage account properties.
func (AccountUpdateParameters) MarshalJSON ¶ added in v0.3.0
func (a AccountUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountUpdateParameters.
func (*AccountUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (a *AccountUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateParameters.
type AccountsClient ¶ added in v0.3.0
type AccountsClient struct {
// contains filtered or unexported fields
}
AccountsClient contains the methods for the StorageAccounts group. Don't use this type directly, use NewAccountsClient() instead.
func NewAccountsClient ¶ added in v0.3.0
func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)
NewAccountsClient creates a new instance of AccountsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccountsClient) BeginAbortHierarchicalNamespaceMigration ¶ added in v0.3.0
func (client *AccountsClient) BeginAbortHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions) (*runtime.Poller[AccountsClientAbortHierarchicalNamespaceMigrationResponse], error)
BeginAbortHierarchicalNamespaceMigration - Abort live Migration of storage account to enable Hns If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginAbortHierarchicalNamespaceMigration(ctx, "res4228", "sto2434", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AccountsClient) BeginCreate ¶ added in v0.3.0
func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountsClientBeginCreateOptions) (*runtime.Poller[AccountsClientCreateResponse], error)
BeginCreate - 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.
Example (NfsV3AccountCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ Kind: to.Ptr(armstorage.KindBlockBlobStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ EnableExtendedGroups: to.Ptr(true), IsHnsEnabled: to.Ptr(true), EnableNfsV3: to.Ptr(true), NetworkRuleSet: &armstorage.NetworkRuleSet{ Bypass: to.Ptr(armstorage.BypassAzureServices), DefaultAction: to.Ptr(armstorage.DefaultActionAllow), IPRules: []*armstorage.IPRule{}, VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ { VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), }}, }, EnableHTTPSTrafficOnly: to.Ptr(false), }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNamePremiumLRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Kind: to.Ptr(armstorage.KindBlockBlobStorage), // Properties: &armstorage.AccountProperties{ // EnableExtendedGroups: to.Ptr(true), // IsHnsEnabled: to.Ptr(true), // EnableNfsV3: to.Ptr(true), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // { // VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"), // }}, // }, // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // } }
Output:
Example (StorageAccountCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), DefaultToOAuthAuthentication: to.Ptr(false), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), IsSftpEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // IsSftpEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateAllowedCopyScopeToAad) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateAllowedCopyScopeToPrivateLink) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateDisallowPublicNetworkAccess) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDisallowPublicNetworkAccess.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateDnsEndpointTypeToAzureDnsZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), DefaultToOAuthAuthentication: to.Ptr(false), DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), IsSftpEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // IsSftpEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.z24.blob.storage.azure.net/"), // Dfs: to.Ptr("https://sto4445.z24.dfs.storage.azure.net/"), // File: to.Ptr("https://sto4445.z24.file.storage.azure.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.z24.blob.storage.azure.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.z24.dfs.storage.azure.net/"), // File: to.Ptr("https://sto4445-internetrouting.z24.file.storage.azure.net/"), // Web: to.Ptr("https://sto4445-internetrouting.z24.web.storage.azure.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.z24.blob.storage.azure.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.z24.file.storage.azure.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.z24.queue.storage.azure.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.z24.table.storage.azure.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.z24.web.storage.azure.net/"), // }, // Queue: to.Ptr("https://sto4445.z24.queue.storage.azure.net/"), // Table: to.Ptr("https://sto4445.z24.table.storage.azure.net/"), // Web: to.Ptr("https://sto4445.z24.web.storage.azure.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateDnsEndpointTypeToStandard) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToStandard.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), DefaultToOAuthAuthentication: to.Ptr(false), DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), IsSftpEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // IsSftpEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateEnablePublicNetworkAccess) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsHnsEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreatePremiumBlockBlobStorage) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ Kind: to.Ptr(armstorage.KindBlockBlobStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ AllowSharedKeyAccess: to.Ptr(true), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), RequireInfrastructureEncryption: to.Ptr(false), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNamePremiumLRS), }, Tags: map[string]*string{ "key1": to.Ptr("value1"), "key2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AccessTier: to.Ptr(armstorage.AccessTierPremium), // AllowBlobPublicAccess: to.Ptr(false), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // RequireInfrastructureEncryption: to.Ptr(false), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // } }
Output:
Example (StorageAccountCreateUserAssignedEncryptionIdentityWithCmk) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ Identity: &armstorage.Identity{ Type: to.Ptr(armstorage.IdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, }, }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ Encryption: &armstorage.Encryption{ EncryptionIdentity: &armstorage.EncryptionIdentity{ EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), }, KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), KeyVaultProperties: &armstorage.KeyVaultProperties{ KeyName: to.Ptr("wrappingKey"), KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), KeyVersion: to.Ptr(""), }, Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardLRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), // }, // }, // }, // Kind: to.Ptr(armstorage.KindStorageV2), // Properties: &armstorage.AccountProperties{ // AccessTier: to.Ptr(armstorage.AccessTierHot), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.083Z"); return t}()), // Encryption: &armstorage.Encryption{ // EncryptionIdentity: &armstorage.EncryptionIdentity{ // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), // }, // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // }, // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res131918", "sto131918", armstorage.AccountCreateParameters{ Identity: &armstorage.Identity{ Type: to.Ptr(armstorage.IdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, }, }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ Encryption: &armstorage.Encryption{ EncryptionIdentity: &armstorage.EncryptionIdentity{ EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), }, KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), KeyVaultProperties: &armstorage.KeyVaultProperties{ KeyName: to.Ptr("wrappingKey"), KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), KeyVersion: to.Ptr(""), }, Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardLRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), // }, // }, // }, // Kind: to.Ptr(armstorage.KindStorageV2), // Properties: &armstorage.AccountProperties{ // AccessTier: to.Ptr(armstorage.AccessTierHot), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.083Z"); return t}()), // Encryption: &armstorage.Encryption{ // EncryptionIdentity: &armstorage.EncryptionIdentity{ // EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"), // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), // }, // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // }, // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountCreateWithImmutabilityPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateWithImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{ ExtendedLocation: &armstorage.ExtendedLocation{ Name: to.Ptr("losangeles001"), Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), }, Kind: to.Ptr(armstorage.KindStorage), Location: to.Ptr("eastus"), Properties: &armstorage.AccountPropertiesCreateParameters{ ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ Enabled: to.Ptr(true), ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ AllowProtectedAppendWrites: to.Ptr(true), ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), }, }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardGRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // ExtendedLocation: &armstorage.ExtendedLocation{ // Name: to.Ptr("losangeles001"), // Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:25:33.486Z"); return t}()), // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ // Enabled: to.Ptr(true), // ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ // AllowProtectedAppendWrites: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), // State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked), // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2euap"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
func (*AccountsClient) BeginCustomerInitiatedMigration ¶ added in v1.4.0
func (client *AccountsClient) BeginCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, parameters AccountMigration, options *AccountsClientBeginCustomerInitiatedMigrationOptions) (*runtime.Poller[AccountsClientCustomerInitiatedMigrationResponse], error)
BeginCustomerInitiatedMigration - Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 request parameters required to perform storage account migration.
- options - AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.AccountMigration{ StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AccountsClient) BeginFailover ¶ added in v0.3.0
func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginFailoverOptions) (*runtime.Poller[AccountsClientFailoverResponse], error)
BeginFailover - A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method.
Example (StorageAccountFailover) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginFailover(ctx, "res4228", "sto2434", &armstorage.AccountsClientBeginFailoverOptions{FailoverType: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
Example (StorageAccountFailoverPlanned) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailoverPlanned.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginFailover(ctx, "res4228", "sto2434", &armstorage.AccountsClientBeginFailoverOptions{FailoverType: to.Ptr("Planned")}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AccountsClient) BeginHierarchicalNamespaceMigration ¶ added in v0.3.0
func (client *AccountsClient) BeginHierarchicalNamespaceMigration(ctx context.Context, resourceGroupName string, accountName string, requestType string, options *AccountsClientBeginHierarchicalNamespaceMigrationOptions) (*runtime.Poller[AccountsClientHierarchicalNamespaceMigrationResponse], error)
BeginHierarchicalNamespaceMigration - Live Migration of storage account to enable Hns If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- requestType - Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.
- options - AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginHierarchicalNamespaceMigration(ctx, "res4228", "sto2434", "HnsOnValidationRequest", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AccountsClient) BeginRestoreBlobRanges ¶ added in v0.3.0
func (client *AccountsClient) BeginRestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters, options *AccountsClientBeginRestoreBlobRangesOptions) (*runtime.Poller[AccountsClientRestoreBlobRangesResponse], error)
BeginRestoreBlobRanges - Restore blobs in the specified blob ranges If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 restore blob ranges.
- options - AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAccountsClient().BeginRestoreBlobRanges(ctx, "res9101", "sto4445", armstorage.BlobRestoreParameters{ BlobRanges: []*armstorage.BlobRestoreRange{ { EndRange: to.Ptr("container/blobpath2"), StartRange: to.Ptr("container/blobpath1"), }, { EndRange: to.Ptr(""), StartRange: to.Ptr("container2/blobpath3"), }}, TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.000Z"); return t }()), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobRestoreStatus = armstorage.BlobRestoreStatus{ // Parameters: &armstorage.BlobRestoreParameters{ // BlobRanges: []*armstorage.BlobRestoreRange{ // { // EndRange: to.Ptr("container/blobpath2"), // StartRange: to.Ptr("container/blobpath1"), // }, // { // EndRange: to.Ptr(""), // StartRange: to.Ptr("container2/blobpath3"), // }}, // TimeToRestore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-20T15:30:00.000Z"); return t}()), // }, // RestoreID: to.Ptr("{restore_id}"), // Status: to.Ptr(armstorage.BlobRestoreProgressStatus("Succeeded")), // } }
Output:
func (*AccountsClient) CheckNameAvailability ¶ added in v0.3.0
func (client *AccountsClient) CheckNameAvailability(ctx context.Context, accountName AccountCheckNameAvailabilityParameters, options *AccountsClientCheckNameAvailabilityOptions) (AccountsClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Checks that the storage account name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().CheckNameAvailability(ctx, armstorage.AccountCheckNameAvailabilityParameters{ Name: to.Ptr("sto3363"), Type: to.Ptr("Microsoft.Storage/storageAccounts"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResult = armstorage.CheckNameAvailabilityResult{ // NameAvailable: to.Ptr(true), // } }
Output:
func (*AccountsClient) Delete ¶ added in v0.3.0
func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientDeleteOptions) (AccountsClientDeleteResponse, error)
Delete - Deletes a storage account in Microsoft Azure. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAccountsClient().Delete(ctx, "res4228", "sto2434", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*AccountsClient) GetCustomerInitiatedMigration ¶ added in v1.4.0
func (client *AccountsClient) GetCustomerInitiatedMigration(ctx context.Context, resourceGroupName string, accountName string, migrationName MigrationName, options *AccountsClientGetCustomerInitiatedMigrationOptions) (AccountsClientGetCustomerInitiatedMigrationResponse, error)
GetCustomerInitiatedMigration - Gets the status of the ongoing migration for the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- migrationName - The name of the Storage Account Migration. It should always be 'default'
- options - AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration method.
Example (StorageAccountGetMigrationFailed) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AccountMigration = armstorage.AccountMigration{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"), // StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ // MigrationFailedDetailedReason: to.Ptr("ZRS is not supported for accounts with archive data."), // MigrationFailedReason: to.Ptr("ZrsNotSupportedForAccountWithArchiveData"), // MigrationStatus: to.Ptr(armstorage.MigrationStatusFailed), // TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), // }, // } }
Output:
Example (StorageAccountGetMigrationInProgress) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationInProgress.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetCustomerInitiatedMigration(ctx, "resource-group-name", "accountname", armstorage.MigrationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AccountMigration = armstorage.AccountMigration{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/accountMigrations"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/accountMigrations/default"), // StorageAccountMigrationDetails: &armstorage.AccountMigrationProperties{ // MigrationStatus: to.Ptr(armstorage.MigrationStatusInProgress), // TargetSKUName: to.Ptr(armstorage.SKUNameStandardZRS), // }, // } }
Output:
func (*AccountsClient) GetProperties ¶ added in v0.3.0
func (client *AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetPropertiesOptions) (AccountsClientGetPropertiesResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method.
Example (StorageAccountGetAsyncSkuConversionStatus) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus"), // Kind: to.Ptr(armstorage.KindStorageV2), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // StorageAccountSKUConversionStatus: &armstorage.AccountSKUConversionStatus{ // EndTime: to.Ptr("2021-09-02T02:53:39.0932539Z"), // SKUConversionStatus: to.Ptr(armstorage.SKUConversionStatusInProgress), // StartTime: to.Ptr("2022-09-01T02:53:39.0932539Z"), // TargetSKUName: to.Ptr(armstorage.SKUNameStandardGRS), // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountGetProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetProperties.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AccountMigrationInProgress: to.Ptr(false), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(true), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // IsSKUConversionBlocked: to.Ptr(false), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountGetPropertiesCmkEnabled) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKEnabled.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(true), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountGetPropertiesCmkVersionExpirationTime) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(true), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: to.Ptr(armstorage.StorageAccountExpandGeoReplicationStats)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AccountMigrationInProgress: to.Ptr(false), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(false), // CanPlannedFailover: to.Ptr(false), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // PostFailoverRedundancy: to.Ptr(armstorage.PostFailoverRedundancyStandardLRS), // PostPlannedFailoverRedundancy: to.Ptr(armstorage.PostPlannedFailoverRedundancyStandardGRS), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // IsSKUConversionBlocked: to.Ptr(false), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().GetProperties(ctx, "res9407", "sto8596", &armstorage.AccountsClientGetPropertiesOptions{Expand: to.Ptr(armstorage.StorageAccountExpandGeoReplicationStats)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AccountMigrationInProgress: to.Ptr(false), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(true), // CanPlannedFailover: to.Ptr(true), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // PostFailoverRedundancy: to.Ptr(armstorage.PostFailoverRedundancyStandardLRS), // PostPlannedFailoverRedundancy: to.Ptr(armstorage.PostPlannedFailoverRedundancyStandardGRS), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // IsSKUConversionBlocked: to.Ptr(false), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
func (*AccountsClient) ListAccountSAS ¶ added in v0.3.0
func (client *AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters, options *AccountsClientListAccountSASOptions) (AccountsClientListAccountSASResponse, error)
ListAccountSAS - List SAS credentials of a storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().ListAccountSAS(ctx, "res7985", "sto8588", armstorage.AccountSasParameters{ KeyToSign: to.Ptr("key1"), SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:42:03.156Z"); return t }()), Permissions: to.Ptr(armstorage.PermissionsR), Protocols: to.Ptr(armstorage.HTTPProtocolHTTPSHTTP), ResourceTypes: to.Ptr(armstorage.SignedResourceTypesS), Services: to.Ptr(armstorage.ServicesB), SharedAccessStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:42:03.156Z"); return t }()), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ListAccountSasResponse = armstorage.ListAccountSasResponse{ // AccountSasToken: to.Ptr("sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D"), // } }
Output:
func (*AccountsClient) ListKeys ¶ added in v0.3.0
func (client *AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientListKeysOptions) (AccountsClientListKeysResponse, error)
ListKeys - Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().ListKeys(ctx, "res418", "sto2220", &armstorage.AccountsClientListKeysOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AccountListKeysResult = armstorage.AccountListKeysResult{ // Keys: []*armstorage.AccountKey{ // { // KeyName: to.Ptr("key1"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }, // { // KeyName: to.Ptr("key2"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }}, // } }
Output:
func (*AccountsClient) ListServiceSAS ¶ added in v0.3.0
func (client *AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters, options *AccountsClientListServiceSASOptions) (AccountsClientListServiceSASResponse, error)
ListServiceSAS - List service SAS credentials of a specific resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().ListServiceSAS(ctx, "res7439", "sto1299", armstorage.ServiceSasParameters{ CanonicalizedResource: to.Ptr("/blob/sto1299/music"), SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:32:48.845Z"); return t }()), Permissions: to.Ptr(armstorage.PermissionsL), Resource: to.Ptr(armstorage.SignedResourceC), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ListServiceSasResponse = armstorage.ListServiceSasResponse{ // ServiceSasToken: to.Ptr("sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D"), // } }
Output:
func (*AccountsClient) NewListByResourceGroupPager ¶ added in v0.6.0
func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
- options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("res6117", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AccountListResult = armstorage.AccountListResult{ // Value: []*armstorage.Account{ // { // Name: to.Ptr("sto4036"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:47.818Z"); return t}()), // IsHnsEnabled: to.Ptr(true), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4036.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4036.dfs.core.windows.net/"), // File: to.Ptr("https://sto4036.file.core.windows.net/"), // Queue: to.Ptr("https://sto4036.queue.core.windows.net/"), // Table: to.Ptr("https://sto4036.table.core.windows.net/"), // Web: to.Ptr("https://sto4036.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto4452"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:24:15.706Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4452.blob.core.windows.net/"), // File: to.Ptr("https://sto4452.file.core.windows.net/"), // Queue: to.Ptr("https://sto4452.queue.core.windows.net/"), // Table: to.Ptr("https://sto4452.table.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }}, // } } }
Output:
func (*AccountsClient) NewListPager ¶ added in v0.6.0
func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]
NewListPager - Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Generated from API version 2023-05-01
- options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAccountsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AccountListResult = armstorage.AccountListResult{ // Value: []*armstorage.Account{ // { // Name: to.Ptr("sto1125"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:53.454Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto1125.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto1125.dfs.core.windows.net/"), // File: to.Ptr("https://sto1125.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto1125-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto1125-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto1125-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto1125-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto1125-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto1125-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto1125-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto1125-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto1125-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto1125-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto1125.queue.core.windows.net/"), // Table: to.Ptr("https://sto1125.table.core.windows.net/"), // Web: to.Ptr("https://sto1125.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto3699"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("356d057d-cba5-44dd-8a30-b2e547bc416b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:06:30.609Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto3699.blob.core.windows.net/"), // File: to.Ptr("https://sto3699.file.core.windows.net/"), // Queue: to.Ptr("https://sto3699.queue.core.windows.net/"), // Table: to.Ptr("https://sto3699.table.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // GeoReplicationStats: &armstorage.GeoReplicationStats{ // CanFailover: to.Ptr(true), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-30T00:25:34.000Z"); return t}()), // Status: to.Ptr(armstorage.GeoReplicationStatusLive), // }, // IsHnsEnabled: to.Ptr(true), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto6637"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:09:39.562Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto6637.blob.core.windows.net/"), // File: to.Ptr("https://sto6637.file.core.windows.net/"), // Queue: to.Ptr("https://sto6637.queue.core.windows.net/"), // Table: to.Ptr("https://sto6637.table.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto834"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T13:28:20.868Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto834.blob.core.windows.net/"), // File: to.Ptr("https://sto834.file.core.windows.net/"), // Queue: to.Ptr("https://sto834.queue.core.windows.net/"), // Table: to.Ptr("https://sto834.table.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }, // { // Name: to.Ptr("sto9174"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("933e3ddf-1802-4a51-9469-18a33b576f88"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T09:46:19.655Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto9174.blob.core.windows.net/"), // File: to.Ptr("https://sto9174.file.core.windows.net/"), // Queue: to.Ptr("https://sto9174.queue.core.windows.net/"), // Table: to.Ptr("https://sto9174.table.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("centraluseuap"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }}, // } } }
Output:
func (*AccountsClient) RegenerateKey ¶ added in v0.3.0
func (client *AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters, options *AccountsClientRegenerateKeyOptions) (AccountsClientRegenerateKeyResponse, error)
RegenerateKey - Regenerates one of the access keys or Kerberos keys for the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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, key2, kerb1, kerb2.
- options - AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method.
Example (StorageAccountRegenerateKerbKey) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().RegenerateKey(ctx, "res4167", "sto3539", armstorage.AccountRegenerateKeyParameters{ KeyName: to.Ptr("kerb1"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AccountListKeysResult = armstorage.AccountListKeysResult{ // Keys: []*armstorage.AccountKey{ // { // KeyName: to.Ptr("key1"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }, // { // KeyName: to.Ptr("key2"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }, // { // KeyName: to.Ptr("kerb1"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }}, // } }
Output:
Example (StorageAccountRegenerateKey) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().RegenerateKey(ctx, "res4167", "sto3539", armstorage.AccountRegenerateKeyParameters{ KeyName: to.Ptr("key2"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AccountListKeysResult = armstorage.AccountListKeysResult{ // Keys: []*armstorage.AccountKey{ // { // KeyName: to.Ptr("key1"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }, // { // KeyName: to.Ptr("key2"), // Permissions: to.Ptr(armstorage.KeyPermissionFull), // Value: to.Ptr("<value>"), // }}, // } }
Output:
func (*AccountsClient) RevokeUserDelegationKeys ¶ added in v0.3.0
func (client *AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientRevokeUserDelegationKeysOptions) (AccountsClientRevokeUserDelegationKeysResponse, error)
RevokeUserDelegationKeys - Revoke user delegation keys. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAccountsClient().RevokeUserDelegationKeys(ctx, "res4167", "sto3539", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*AccountsClient) Update ¶ added in v0.3.0
func (client *AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters, options *AccountsClientUpdateOptions) (AccountsClientUpdateResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method.
Example (StorageAccountEnableAd) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), DomainName: to.Ptr("adtest.com"), DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), ForestName: to.Ptr("adtest.com"), NetBiosDomainName: to.Ptr("adtest.com"), SamAccountName: to.Ptr("sam12498"), }, DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AzureFilesIdentityBasedAuthentication: &armstorage.AzureFilesIdentityBasedAuthentication{ // ActiveDirectoryProperties: &armstorage.ActiveDirectoryProperties{ // AccountType: to.Ptr(armstorage.ActiveDirectoryPropertiesAccountTypeUser), // AzureStorageSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252-0012"), // DomainGUID: to.Ptr("aebfc118-9fa9-4732-a21f-d98e41a77ae1"), // DomainName: to.Ptr("adtest.com"), // DomainSid: to.Ptr("S-1-5-21-2400535526-2334094090-2402026252"), // ForestName: to.Ptr("adtest.com"), // NetBiosDomainName: to.Ptr("adtest.com"), // SamAccountName: to.Ptr("sam12498"), // }, // DirectoryServiceOptions: to.Ptr(armstorage.DirectoryServiceOptionsAD), // }, // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountEnableCmk) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableCMK.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), KeyVaultProperties: &armstorage.KeyVaultProperties{ KeyName: to.Ptr("wrappingKey"), KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), KeyVersion: to.Ptr(""), }, Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeSystemAssigned), // PrincipalID: to.Ptr("911871cc-ffd1-4fc4-ac11-7a316433ea66"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), DefaultToOAuthAuthentication: to.Ptr(false), EnableExtendedGroups: to.Ptr(true), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, IsLocalUserEnabled: to.Ptr(true), IsSftpEnabled: to.Ptr(true), KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), NetworkRuleSet: &armstorage.NetworkRuleSet{ DefaultAction: to.Ptr(armstorage.DefaultActionAllow), ResourceAccessRules: []*armstorage.ResourceAccessRule{ { ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), }}, }, RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // EnableExtendedGroups: to.Ptr(true), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // IsLocalUserEnabled: to.Ptr(true), // IsSftpEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdateAllowedCopyScopeToAad) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), NetworkRuleSet: &armstorage.NetworkRuleSet{ DefaultAction: to.Ptr(armstorage.DefaultActionAllow), ResourceAccessRules: []*armstorage.ResourceAccessRule{ { ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), }}, }, RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdateDisablePublicNetworkAccess) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ AllowBlobPublicAccess: to.Ptr(false), AllowSharedKeyAccess: to.Ptr(true), Encryption: &armstorage.Encryption{ KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, KeyPolicy: &armstorage.KeyPolicy{ KeyExpirationPeriodInDays: to.Ptr[int32](20), }, MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), NetworkRuleSet: &armstorage.NetworkRuleSet{ DefaultAction: to.Ptr(armstorage.DefaultActionAllow), ResourceAccessRules: []*armstorage.ResourceAccessRule{ { ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), }}, }, PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), RoutingPreference: &armstorage.RoutingPreference{ PublishInternetEndpoints: to.Ptr(true), PublishMicrosoftEndpoints: to.Ptr(true), RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), }, SasPolicy: &armstorage.SasPolicy{ ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), SasExpirationPeriod: to.Ptr("1.15:59:59"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // AllowBlobPublicAccess: to.Ptr(false), // AllowSharedKeyAccess: to.Ptr(true), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T02:42:41.763Z"); return t}()), // Encryption: &armstorage.Encryption{ // KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage), // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-11T20:49:31.703Z"); return t}()), // }, // }, // }, // IsHnsEnabled: to.Ptr(true), // KeyCreationTime: &armstorage.KeyCreationTime{ // Key1: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // Key2: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-18T04:42:22.432Z"); return t}()), // }, // KeyPolicy: &armstorage.KeyPolicy{ // KeyExpirationPeriodInDays: to.Ptr[int32](20), // }, // MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12), // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // ResourceAccessRules: []*armstorage.ResourceAccessRule{ // { // ResourceID: to.Ptr("/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // }}, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto8596.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596.file.core.windows.net/"), // InternetEndpoints: &armstorage.AccountInternetEndpoints{ // Blob: to.Ptr("https://sto8596-internetrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-internetrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-internetrouting.file.core.windows.net/"), // Web: to.Ptr("https://sto8596-internetrouting.web.core.windows.net/"), // }, // MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{ // Blob: to.Ptr("https://sto8596-microsoftrouting.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto8596-microsoftrouting.dfs.core.windows.net/"), // File: to.Ptr("https://sto8596-microsoftrouting.file.core.windows.net/"), // Queue: to.Ptr("https://sto8596-microsoftrouting.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596-microsoftrouting.table.core.windows.net/"), // Web: to.Ptr("https://sto8596-microsoftrouting.web.core.windows.net/"), // }, // Queue: to.Ptr("https://sto8596.queue.core.windows.net/"), // Table: to.Ptr("https://sto8596.table.core.windows.net/"), // Web: to.Ptr("https://sto8596.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus2(stage)"), // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled), // RoutingPreference: &armstorage.RoutingPreference{ // PublishInternetEndpoints: to.Ptr(true), // PublishMicrosoftEndpoints: to.Ptr(true), // RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting), // }, // SasPolicy: &armstorage.SasPolicy{ // ExpirationAction: to.Ptr(armstorage.ExpirationActionLog), // SasExpirationPeriod: to.Ptr("1.15:59:59"), // }, // SecondaryLocation: to.Ptr("northcentralus(stage)"), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(false), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9101", "sto4445", armstorage.AccountUpdateParameters{ Identity: &armstorage.Identity{ Type: to.Ptr(armstorage.IdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, }, }, Kind: to.Ptr(armstorage.KindStorage), Properties: &armstorage.AccountPropertiesUpdateParameters{ Encryption: &armstorage.Encryption{ EncryptionIdentity: &armstorage.EncryptionIdentity{ EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), }, KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), KeyVaultProperties: &armstorage.KeyVaultProperties{ KeyName: to.Ptr("wrappingKey"), KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), KeyVersion: to.Ptr(""), }, Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardLRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), // }, // }, // }, // Kind: to.Ptr(armstorage.KindStorageV2), // Properties: &armstorage.AccountProperties{ // AccessTier: to.Ptr(armstorage.AccessTierHot), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.083Z"); return t}()), // Encryption: &armstorage.Encryption{ // EncryptionIdentity: &armstorage.EncryptionIdentity{ // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), // }, // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // }, // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res131918", "sto131918", armstorage.AccountUpdateParameters{ Identity: &armstorage.Identity{ Type: to.Ptr(armstorage.IdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}, }, }, Kind: to.Ptr(armstorage.KindStorage), Properties: &armstorage.AccountPropertiesUpdateParameters{ Encryption: &armstorage.Encryption{ EncryptionIdentity: &armstorage.EncryptionIdentity{ EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), }, KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), KeyVaultProperties: &armstorage.KeyVaultProperties{ KeyName: to.Ptr("wrappingKey"), KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), KeyVersion: to.Ptr(""), }, Services: &armstorage.EncryptionServices{ Blob: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, File: &armstorage.EncryptionService{ Enabled: to.Ptr(true), KeyType: to.Ptr(armstorage.KeyTypeAccount), }, }, }, }, SKU: &armstorage.SKU{ Name: to.Ptr(armstorage.SKUNameStandardLRS), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto4445"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Identity: &armstorage.Identity{ // Type: to.Ptr(armstorage.IdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{ // "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{ // ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"), // PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"), // }, // }, // }, // Kind: to.Ptr(armstorage.KindStorageV2), // Properties: &armstorage.AccountProperties{ // AccessTier: to.Ptr(armstorage.AccessTierHot), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.083Z"); return t}()), // Encryption: &armstorage.Encryption{ // EncryptionIdentity: &armstorage.EncryptionIdentity{ // EncryptionFederatedIdentityClientID: to.Ptr("3109d1c4-a5de-4d84-8832-feabb916a4b6"), // EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"), // }, // KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault), // KeyVaultProperties: &armstorage.KeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"), // KeyName: to.Ptr("wrappingKey"), // KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"), // KeyVersion: to.Ptr(""), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // Services: &armstorage.EncryptionServices{ // Blob: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // File: &armstorage.EncryptionService{ // Enabled: to.Ptr(true), // KeyType: to.Ptr(armstorage.KeyTypeAccount), // LastEnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-15T00:43:14.173Z"); return t}()), // }, // }, // }, // NetworkRuleSet: &armstorage.NetworkRuleSet{ // Bypass: to.Ptr(armstorage.BypassAzureServices), // DefaultAction: to.Ptr(armstorage.DefaultActionAllow), // IPRules: []*armstorage.IPRule{ // }, // VirtualNetworkRules: []*armstorage.VirtualNetworkRule{ // }, // }, // PrimaryEndpoints: &armstorage.Endpoints{ // Blob: to.Ptr("https://sto4445.blob.core.windows.net/"), // Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"), // File: to.Ptr("https://sto4445.file.core.windows.net/"), // Queue: to.Ptr("https://sto4445.queue.core.windows.net/"), // Table: to.Ptr("https://sto4445.table.core.windows.net/"), // Web: to.Ptr("https://sto4445.web.core.windows.net/"), // }, // PrimaryLocation: to.Ptr("eastus"), // PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{ // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable), // EnableHTTPSTrafficOnly: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (StorageAccountUpdateWithImmutabilityPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAccountsClient().Update(ctx, "res9407", "sto8596", armstorage.AccountUpdateParameters{ Properties: &armstorage.AccountPropertiesUpdateParameters{ ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ Enabled: to.Ptr(true), ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ AllowProtectedAppendWrites: to.Ptr(true), ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), State: to.Ptr(armstorage.AccountImmutabilityPolicyStateLocked), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Account = armstorage.Account{ // Name: to.Ptr("sto8596"), // Type: to.Ptr("Microsoft.Storage/storageAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596"), // Location: to.Ptr("eastus2(stage)"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Kind: to.Ptr(armstorage.KindStorage), // Properties: &armstorage.AccountProperties{ // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{ // Enabled: to.Ptr(true), // ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{ // AllowProtectedAppendWrites: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15), // State: to.Ptr(armstorage.AccountImmutabilityPolicyStateLocked), // }, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
type AccountsClientAbortHierarchicalNamespaceMigrationResponse ¶ added in v0.3.0
type AccountsClientAbortHierarchicalNamespaceMigrationResponse struct { }
AccountsClientAbortHierarchicalNamespaceMigrationResponse contains the response from method AccountsClient.BeginAbortHierarchicalNamespaceMigration.
type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions ¶ added in v0.3.0
type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration method.
type AccountsClientBeginCreateOptions ¶ added in v0.3.0
type AccountsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.
type AccountsClientBeginCustomerInitiatedMigrationOptions ¶ added in v1.4.0
type AccountsClientBeginCustomerInitiatedMigrationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.BeginCustomerInitiatedMigration method.
type AccountsClientBeginFailoverOptions ¶ added in v0.3.0
type AccountsClientBeginFailoverOptions struct { // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the // value to Planned. FailoverType *string // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method.
type AccountsClientBeginHierarchicalNamespaceMigrationOptions ¶ added in v0.3.0
type AccountsClientBeginHierarchicalNamespaceMigrationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration method.
type AccountsClientBeginRestoreBlobRangesOptions ¶ added in v0.3.0
type AccountsClientBeginRestoreBlobRangesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges method.
type AccountsClientCheckNameAvailabilityOptions ¶ added in v0.3.0
type AccountsClientCheckNameAvailabilityOptions struct { }
AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability method.
type AccountsClientCheckNameAvailabilityResponse ¶ added in v0.3.0
type AccountsClientCheckNameAvailabilityResponse struct { // The CheckNameAvailability operation response. CheckNameAvailabilityResult }
AccountsClientCheckNameAvailabilityResponse contains the response from method AccountsClient.CheckNameAvailability.
type AccountsClientCreateResponse ¶ added in v0.3.0
type AccountsClientCreateResponse struct { // The storage account. Account }
AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate.
type AccountsClientCustomerInitiatedMigrationResponse ¶ added in v1.4.0
type AccountsClientCustomerInitiatedMigrationResponse struct { }
AccountsClientCustomerInitiatedMigrationResponse contains the response from method AccountsClient.BeginCustomerInitiatedMigration.
type AccountsClientDeleteOptions ¶ added in v0.3.0
type AccountsClientDeleteOptions struct { }
AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method.
type AccountsClientDeleteResponse ¶ added in v0.3.0
type AccountsClientDeleteResponse struct { }
AccountsClientDeleteResponse contains the response from method AccountsClient.Delete.
type AccountsClientFailoverResponse ¶ added in v0.3.0
type AccountsClientFailoverResponse struct { }
AccountsClientFailoverResponse contains the response from method AccountsClient.BeginFailover.
type AccountsClientGetCustomerInitiatedMigrationOptions ¶ added in v1.4.0
type AccountsClientGetCustomerInitiatedMigrationOptions struct { }
AccountsClientGetCustomerInitiatedMigrationOptions contains the optional parameters for the AccountsClient.GetCustomerInitiatedMigration method.
type AccountsClientGetCustomerInitiatedMigrationResponse ¶ added in v1.4.0
type AccountsClientGetCustomerInitiatedMigrationResponse struct { // The parameters or status associated with an ongoing or enqueued storage account migration in order to update its current // SKU or region. AccountMigration }
AccountsClientGetCustomerInitiatedMigrationResponse contains the response from method AccountsClient.GetCustomerInitiatedMigration.
type AccountsClientGetPropertiesOptions ¶ added in v0.3.0
type AccountsClientGetPropertiesOptions struct { // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. // Currently we only support geoReplicationStats and blobRestoreStatus. Expand *StorageAccountExpand }
AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method.
type AccountsClientGetPropertiesResponse ¶ added in v0.3.0
type AccountsClientGetPropertiesResponse struct { // The storage account. Account }
AccountsClientGetPropertiesResponse contains the response from method AccountsClient.GetProperties.
type AccountsClientHierarchicalNamespaceMigrationResponse ¶ added in v0.3.0
type AccountsClientHierarchicalNamespaceMigrationResponse struct { }
AccountsClientHierarchicalNamespaceMigrationResponse contains the response from method AccountsClient.BeginHierarchicalNamespaceMigration.
type AccountsClientListAccountSASOptions ¶ added in v0.3.0
type AccountsClientListAccountSASOptions struct { }
AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method.
type AccountsClientListAccountSASResponse ¶ added in v0.3.0
type AccountsClientListAccountSASResponse struct { // The List SAS credentials operation response. ListAccountSasResponse }
AccountsClientListAccountSASResponse contains the response from method AccountsClient.ListAccountSAS.
type AccountsClientListByResourceGroupOptions ¶ added in v0.3.0
type AccountsClientListByResourceGroupOptions struct { }
AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
type AccountsClientListByResourceGroupResponse ¶ added in v0.3.0
type AccountsClientListByResourceGroupResponse struct { // The response from the List Storage Accounts operation. AccountListResult }
AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager.
type AccountsClientListKeysOptions ¶ added in v0.3.0
type AccountsClientListKeysOptions struct { // Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb. Expand *string }
AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method.
type AccountsClientListKeysResponse ¶ added in v0.3.0
type AccountsClientListKeysResponse struct { // The response from the ListKeys operation. AccountListKeysResult }
AccountsClientListKeysResponse contains the response from method AccountsClient.ListKeys.
type AccountsClientListOptions ¶ added in v0.3.0
type AccountsClientListOptions struct { }
AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.
type AccountsClientListResponse ¶ added in v0.3.0
type AccountsClientListResponse struct { // The response from the List Storage Accounts operation. AccountListResult }
AccountsClientListResponse contains the response from method AccountsClient.NewListPager.
type AccountsClientListServiceSASOptions ¶ added in v0.3.0
type AccountsClientListServiceSASOptions struct { }
AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method.
type AccountsClientListServiceSASResponse ¶ added in v0.3.0
type AccountsClientListServiceSASResponse struct { // The List service SAS credentials operation response. ListServiceSasResponse }
AccountsClientListServiceSASResponse contains the response from method AccountsClient.ListServiceSAS.
type AccountsClientRegenerateKeyOptions ¶ added in v0.3.0
type AccountsClientRegenerateKeyOptions struct { }
AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method.
type AccountsClientRegenerateKeyResponse ¶ added in v0.3.0
type AccountsClientRegenerateKeyResponse struct { // The response from the ListKeys operation. AccountListKeysResult }
AccountsClientRegenerateKeyResponse contains the response from method AccountsClient.RegenerateKey.
type AccountsClientRestoreBlobRangesResponse ¶ added in v0.3.0
type AccountsClientRestoreBlobRangesResponse struct { // Blob restore status. BlobRestoreStatus }
AccountsClientRestoreBlobRangesResponse contains the response from method AccountsClient.BeginRestoreBlobRanges.
type AccountsClientRevokeUserDelegationKeysOptions ¶ added in v0.3.0
type AccountsClientRevokeUserDelegationKeysOptions struct { }
AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys method.
type AccountsClientRevokeUserDelegationKeysResponse ¶ added in v0.3.0
type AccountsClientRevokeUserDelegationKeysResponse struct { }
AccountsClientRevokeUserDelegationKeysResponse contains the response from method AccountsClient.RevokeUserDelegationKeys.
type AccountsClientUpdateOptions ¶ added in v0.3.0
type AccountsClientUpdateOptions struct { }
AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method.
type AccountsClientUpdateResponse ¶ added in v0.3.0
type AccountsClientUpdateResponse struct { // The storage account. Account }
AccountsClientUpdateResponse contains the response from method AccountsClient.Update.
type ActiveDirectoryProperties ¶
type ActiveDirectoryProperties struct { // REQUIRED; Specifies the domain GUID. DomainGUID *string // REQUIRED; Specifies the primary domain that the AD DNS server is authoritative for. DomainName *string // Specifies the Active Directory account type for Azure Storage. AccountType *ActiveDirectoryPropertiesAccountType // Specifies the security identifier (SID) for Azure Storage. AzureStorageSid *string // Specifies the security identifier (SID). DomainSid *string // Specifies the Active Directory forest to get. ForestName *string // Specifies the NetBIOS domain name. NetBiosDomainName *string // Specifies the Active Directory SAMAccountName for Azure Storage. SamAccountName *string }
ActiveDirectoryProperties - Settings properties for Active Directory (AD).
func (ActiveDirectoryProperties) MarshalJSON ¶ added in v1.1.0
func (a ActiveDirectoryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryProperties.
func (*ActiveDirectoryProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ActiveDirectoryProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryProperties.
type ActiveDirectoryPropertiesAccountType ¶ added in v0.3.0
type ActiveDirectoryPropertiesAccountType string
ActiveDirectoryPropertiesAccountType - Specifies the Active Directory account type for Azure Storage.
const ( ActiveDirectoryPropertiesAccountTypeComputer ActiveDirectoryPropertiesAccountType = "Computer" ActiveDirectoryPropertiesAccountTypeUser ActiveDirectoryPropertiesAccountType = "User" )
func PossibleActiveDirectoryPropertiesAccountTypeValues ¶ added in v0.3.0
func PossibleActiveDirectoryPropertiesAccountTypeValues() []ActiveDirectoryPropertiesAccountType
PossibleActiveDirectoryPropertiesAccountTypeValues returns the possible values for the ActiveDirectoryPropertiesAccountType const type.
type AllowedCopyScope ¶ added in v0.3.0
type AllowedCopyScope string
AllowedCopyScope - Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.
const ( AllowedCopyScopeAAD AllowedCopyScope = "AAD" AllowedCopyScopePrivateLink AllowedCopyScope = "PrivateLink" )
func PossibleAllowedCopyScopeValues ¶ added in v0.3.0
func PossibleAllowedCopyScopeValues() []AllowedCopyScope
PossibleAllowedCopyScopeValues returns the possible values for the AllowedCopyScope const type.
type AzureEntityResource ¶
type AzureEntityResource struct { // READ-ONLY; Resource Etag. Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AzureEntityResource - The resource model definition for an Azure Resource Manager resource with an etag.
func (AzureEntityResource) MarshalJSON ¶
func (a AzureEntityResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureEntityResource.
func (*AzureEntityResource) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureEntityResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureEntityResource.
type AzureFilesIdentityBasedAuthentication ¶
type AzureFilesIdentityBasedAuthentication struct { // REQUIRED; Indicates the directory service used. Note that this enum may be extended in the future. DirectoryServiceOptions *DirectoryServiceOptions // Required if directoryServiceOptions are AD, optional if they are AADKERB. ActiveDirectoryProperties *ActiveDirectoryProperties DefaultSharePermission *DefaultSharePermission }
AzureFilesIdentityBasedAuthentication - Settings for Azure Files identity based authentication.
func (AzureFilesIdentityBasedAuthentication) MarshalJSON ¶ added in v1.1.0
func (a AzureFilesIdentityBasedAuthentication) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureFilesIdentityBasedAuthentication.
func (*AzureFilesIdentityBasedAuthentication) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureFilesIdentityBasedAuthentication) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureFilesIdentityBasedAuthentication.
type BlobContainer ¶
type BlobContainer struct { // Properties of the blob container. ContainerProperties *ContainerProperties // READ-ONLY; Resource Etag. Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BlobContainer - Properties of the blob container, including Id, resource name, resource type, Etag.
func (BlobContainer) MarshalJSON ¶
func (b BlobContainer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobContainer.
func (*BlobContainer) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobContainer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobContainer.
type BlobContainersClient ¶
type BlobContainersClient struct {
// contains filtered or unexported fields
}
BlobContainersClient contains the methods for the BlobContainers group. Don't use this type directly, use NewBlobContainersClient() instead.
func NewBlobContainersClient ¶
func NewBlobContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobContainersClient, error)
NewBlobContainersClient creates a new instance of BlobContainersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BlobContainersClient) BeginObjectLevelWorm ¶
func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientBeginObjectLevelWormOptions) (*runtime.Poller[BlobContainersClientObjectLevelWormResponse], error)
BeginObjectLevelWorm - This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBlobContainersClient().BeginObjectLevelWorm(ctx, "res1782", "sto7069", "container6397", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*BlobContainersClient) ClearLegalHold ¶
func (client *BlobContainersClient) ClearLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientClearLegalHoldOptions) (BlobContainersClientClearLegalHoldResponse, error)
ClearLegalHold - Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- legalHold - The LegalHold property that will be clear from a blob container.
- options - BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().ClearLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ Tags: []*string{ to.Ptr("tag1"), to.Ptr("tag2"), to.Ptr("tag3")}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LegalHold = armstorage.LegalHold{ // HasLegalHold: to.Ptr(false), // Tags: []*string{ // }, // } }
Output:
func (*BlobContainersClient) Create ¶
func (client *BlobContainersClient) Create(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientCreateOptions) (BlobContainersClientCreateResponse, error)
Create - Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- blobContainer - Properties of the blob container to create.
- options - BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method.
Example (PutContainerWithDefaultEncryptionScope) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ ContainerProperties: &armstorage.ContainerProperties{ DefaultEncryptionScope: to.Ptr("encryptionscope185"), DenyEncryptionScopeOverride: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), // ContainerProperties: &armstorage.ContainerProperties{ // DefaultEncryptionScope: to.Ptr("encryptionscope185"), // DenyEncryptionScopeOverride: to.Ptr(true), // }, // } }
Output:
Example (PutContainerWithObjectLevelWorm) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutObjectLevelWorm.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ ContainerProperties: &armstorage.ContainerProperties{ ImmutableStorageWithVersioning: &armstorage.ImmutableStorageWithVersioning{ Enabled: to.Ptr(true), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), // ContainerProperties: &armstorage.ContainerProperties{ // ImmutableStorageWithVersioning: &armstorage.ImmutableStorageWithVersioning{ // Enabled: to.Ptr(true), // }, // }, // } }
Output:
Example (PutContainers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Create(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), // } }
Output:
func (*BlobContainersClient) CreateOrUpdateImmutabilityPolicy ¶
func (client *BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions) (BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse, error)
CreateOrUpdateImmutabilityPolicy - Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy method.
Example (CreateOrUpdateImmutabilityPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().CreateOrUpdateImmutabilityPolicy(ctx, "res1782", "sto7069", "container6397", &armstorage.BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions{IfMatch: nil, Parameters: &armstorage.ImmutabilityPolicy{ Properties: &armstorage.ImmutabilityPolicyProperty{ AllowProtectedAppendWrites: to.Ptr(true), ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d59f830cb130e5\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // AllowProtectedAppendWrites: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), // }, // } }
Output:
Example (CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().CreateOrUpdateImmutabilityPolicy(ctx, "res1782", "sto7069", "container6397", &armstorage.BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions{IfMatch: nil, Parameters: &armstorage.ImmutabilityPolicy{ Properties: &armstorage.ImmutabilityPolicyProperty{ AllowProtectedAppendWritesAll: to.Ptr(true), ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d59f830cb130e5\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // AllowProtectedAppendWritesAll: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), // }, // } }
Output:
func (*BlobContainersClient) Delete ¶
func (client *BlobContainersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientDeleteOptions) (BlobContainersClientDeleteResponse, error)
Delete - Deletes specified container under its account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewBlobContainersClient().Delete(ctx, "res4079", "sto4506", "container9689", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*BlobContainersClient) DeleteImmutabilityPolicy ¶
func (client *BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientDeleteImmutabilityPolicyOptions) (BlobContainersClientDeleteImmutabilityPolicyResponse, error)
DeleteImmutabilityPolicy - Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- options - BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().DeleteImmutabilityPolicy(ctx, "res1581", "sto9621", "container4910", "8d59f81a7fa7be0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d59f81a87b40c0\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](0), // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), // }, // } }
Output:
func (*BlobContainersClient) ExtendImmutabilityPolicy ¶
func (client *BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientExtendImmutabilityPolicyOptions) (BlobContainersClientExtendImmutabilityPolicyResponse, error)
ExtendImmutabilityPolicy - Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- options - BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().ExtendImmutabilityPolicy(ctx, "res6238", "sto232", "container5023", "8d59f830d0c3bf9", &armstorage.BlobContainersClientExtendImmutabilityPolicyOptions{Parameters: &armstorage.ImmutabilityPolicy{ Properties: &armstorage.ImmutabilityPolicyProperty{ ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d57a8b2ff50332\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), // }, // } }
Output:
func (*BlobContainersClient) Get ¶
func (client *BlobContainersClient) Get(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientGetOptions) (BlobContainersClientGetResponse, error)
Get - Gets properties of a specified container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method.
Example (GetBlobContainersGetWithAllowProtectedAppendWritesAll) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container1634"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), // ContainerProperties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(true), // HasLegalHold: to.Ptr(true), // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ // Etag: to.Ptr("\"8d592d74cb3011a\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // AllowProtectedAppendWritesAll: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), // }, // UpdateHistory: []*armstorage.UpdateHistoryProperty{ // { // AllowProtectedAppendWritesAll: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), // }, // { // AllowProtectedAppendWritesAll: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.090Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), // }, // { // AllowProtectedAppendWritesAll: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.709Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), // }}, // }, // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // LegalHold: &armstorage.LegalHoldProperties{ // HasLegalHold: to.Ptr(true), // ProtectedAppendWritesHistory: &armstorage.ProtectedAppendWritesHistory{ // AllowProtectedAppendWritesAll: to.Ptr(true), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T01:58:44.504Z"); return t}()), // }, // Tags: []*armstorage.TagProperty{ // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag1"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }, // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag2"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }, // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag3"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }}, // }, // PublicAccess: to.Ptr(armstorage.PublicAccessNone), // }, // } }
Output:
Example (GetContainers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Get(ctx, "res9871", "sto6217", "container1634", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container1634"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634"), // Etag: to.Ptr("\"0x8D592D74CC20EBA\""), // ContainerProperties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(true), // HasLegalHold: to.Ptr(true), // ImmutabilityPolicy: &armstorage.ImmutabilityPolicyProperties{ // Etag: to.Ptr("\"8d592d74cb3011a\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), // }, // UpdateHistory: []*armstorage.UpdateHistoryProperty{ // { // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:11.431Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypePut), // }, // { // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:13.090Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeLock), // }, // { // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](100), // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.709Z"); return t}()), // Update: to.Ptr(armstorage.ImmutabilityPolicyUpdateTypeExtend), // }}, // }, // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:14.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // LegalHold: &armstorage.LegalHoldProperties{ // HasLegalHold: to.Ptr(true), // Tags: []*armstorage.TagProperty{ // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag1"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }, // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag2"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }, // { // ObjectIdentifier: to.Ptr("ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b"), // Tag: to.Ptr("tag3"), // TenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-26T05:06:09.696Z"); return t}()), // }}, // }, // PublicAccess: to.Ptr(armstorage.PublicAccessNone), // }, // } }
Output:
func (*BlobContainersClient) GetImmutabilityPolicy ¶
func (client *BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientGetImmutabilityPolicyOptions) (BlobContainersClientGetImmutabilityPolicyResponse, error)
GetImmutabilityPolicy - Gets the existing immutability policy along with the corresponding ETag in response headers and body. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().GetImmutabilityPolicy(ctx, "res5221", "sto9177", "container3489", &armstorage.BlobContainersClientGetImmutabilityPolicyOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d59f828e64b75c\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // AllowProtectedAppendWrites: to.Ptr(true), // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](5), // State: to.Ptr(armstorage.ImmutabilityPolicyStateUnlocked), // }, // } }
Output:
func (*BlobContainersClient) Lease ¶
func (client *BlobContainersClient) Lease(ctx context.Context, resourceGroupName string, accountName string, containerName string, options *BlobContainersClientLeaseOptions) (BlobContainersClientLeaseResponse, error)
Lease - The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method.
Example (AcquireALeaseOnAContainer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Lease(ctx, "res3376", "sto328", "container6185", &armstorage.BlobContainersClientLeaseOptions{Parameters: &armstorage.LeaseContainerRequest{ Action: to.Ptr(armstorage.LeaseContainerRequestActionAcquire), LeaseDuration: to.Ptr[int32](-1), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LeaseContainerResponse = armstorage.LeaseContainerResponse{ // LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), // } }
Output:
Example (BreakALeaseOnAContainer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Break.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Lease(ctx, "res3376", "sto328", "container6185", &armstorage.BlobContainersClientLeaseOptions{Parameters: &armstorage.LeaseContainerRequest{ Action: to.Ptr(armstorage.LeaseContainerRequestActionBreak), LeaseID: to.Ptr("8698f513-fa75-44a1-b8eb-30ba336af27d"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LeaseContainerResponse = armstorage.LeaseContainerResponse{ // LeaseTimeSeconds: to.Ptr("0"), // } }
Output:
func (*BlobContainersClient) LockImmutabilityPolicy ¶
func (client *BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, options *BlobContainersClientLockImmutabilityPolicyOptions) (BlobContainersClientLockImmutabilityPolicyResponse, error)
LockImmutabilityPolicy - Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- ifMatch - The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- options - BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().LockImmutabilityPolicy(ctx, "res2702", "sto5009", "container1631", "8d59f825b721dd3", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImmutabilityPolicy = armstorage.ImmutabilityPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res2702/providers/Microsoft.Storage/storageAccounts/sto5009/blobServices/default/containers/container1631/immutabilityPolicies/default"), // Etag: to.Ptr("\"8d57a8a5edb084a\""), // Properties: &armstorage.ImmutabilityPolicyProperty{ // ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](3), // State: to.Ptr(armstorage.ImmutabilityPolicyStateLocked), // }, // } }
Output:
func (*BlobContainersClient) NewListPager ¶ added in v0.6.0
func (client *BlobContainersClient) NewListPager(resourceGroupName string, accountName string, options *BlobContainersClientListOptions) *runtime.Pager[BlobContainersClientListResponse]
NewListPager - Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
Generated from API version 2023-05-01
- 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.
- options - BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method.
Example (ListContainers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, Filter: nil, Include: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListContainerItems = armstorage.ListContainerItems{ // Value: []*armstorage.ListContainerItem{ // { // Name: to.Ptr("container1644"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), // Etag: to.Ptr("\"0x8D589847D51C7DE\""), // Properties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(false), // HasLegalHold: to.Ptr(false), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), // }, // }, // { // Name: to.Ptr("container4052"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), // Properties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(false), // HasLegalHold: to.Ptr(false), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // PublicAccess: to.Ptr(armstorage.PublicAccessNone), // }, // }}, // } } }
Output:
Example (ListDeletedContainers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedBlobContainersList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBlobContainersClient().NewListPager("res9290", "sto1590", &armstorage.BlobContainersClientListOptions{Maxpagesize: nil, Filter: nil, Include: to.Ptr(armstorage.ListContainersIncludeDeleted), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListContainerItems = armstorage.ListContainerItems{ // Value: []*armstorage.ListContainerItem{ // { // Name: to.Ptr("container1644"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644"), // Etag: to.Ptr("\"0x8D589847D51C7DE\""), // Properties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(false), // HasLegalHold: to.Ptr(false), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateAvailable), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), // }, // }, // { // Name: to.Ptr("container4052"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052"), // Etag: to.Ptr("\"0x8D589847DAB5AF9\""), // Properties: &armstorage.ContainerProperties{ // Deleted: to.Ptr(true), // DeletedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-14T08:20:47.000Z"); return t}()), // HasImmutabilityPolicy: to.Ptr(false), // HasLegalHold: to.Ptr(false), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T08:20:47.000Z"); return t}()), // LeaseState: to.Ptr(armstorage.LeaseStateExpired), // LeaseStatus: to.Ptr(armstorage.LeaseStatusUnlocked), // PublicAccess: to.Ptr(armstorage.PublicAccessNone), // RemainingRetentionDays: to.Ptr[int32](30), // Version: to.Ptr("1234567890"), // }, // }}, // } } }
Output:
func (*BlobContainersClient) SetLegalHold ¶
func (client *BlobContainersClient) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold, options *BlobContainersClientSetLegalHoldOptions) (BlobContainersClientSetLegalHoldResponse, error)
SetLegalHold - Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- legalHold - The LegalHold property that will be set to a blob container.
- options - BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method.
Example (SetLegalHoldContainers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().SetLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ Tags: []*string{ to.Ptr("tag1"), to.Ptr("tag2"), to.Ptr("tag3")}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LegalHold = armstorage.LegalHold{ // HasLegalHold: to.Ptr(true), // Tags: []*string{ // to.Ptr("tag1"), // to.Ptr("tag2"), // to.Ptr("tag3")}, // } }
Output:
Example (SetLegalHoldContainersWithAllowProtectedAppendWritesAll) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().SetLegalHold(ctx, "res4303", "sto7280", "container8723", armstorage.LegalHold{ AllowProtectedAppendWritesAll: to.Ptr(true), Tags: []*string{ to.Ptr("tag1"), to.Ptr("tag2"), to.Ptr("tag3")}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LegalHold = armstorage.LegalHold{ // AllowProtectedAppendWritesAll: to.Ptr(true), // HasLegalHold: to.Ptr(true), // Tags: []*string{ // to.Ptr("tag1"), // to.Ptr("tag2"), // to.Ptr("tag3")}, // } }
Output:
func (*BlobContainersClient) Update ¶
func (client *BlobContainersClient) Update(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer, options *BlobContainersClientUpdateOptions) (BlobContainersClientUpdateResponse, error)
Update - Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- containerName - The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- blobContainer - Properties to update for the blob container.
- options - BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobContainersClient().Update(ctx, "res3376", "sto328", "container6185", armstorage.BlobContainer{ ContainerProperties: &armstorage.ContainerProperties{ Metadata: map[string]*string{ "metadata": to.Ptr("true"), }, PublicAccess: to.Ptr(armstorage.PublicAccessContainer), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobContainer = armstorage.BlobContainer{ // Name: to.Ptr("container6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/containers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185"), // ContainerProperties: &armstorage.ContainerProperties{ // HasImmutabilityPolicy: to.Ptr(false), // HasLegalHold: to.Ptr(false), // Metadata: map[string]*string{ // "metadata": to.Ptr("true"), // }, // PublicAccess: to.Ptr(armstorage.PublicAccessContainer), // }, // } }
Output:
type BlobContainersClientBeginObjectLevelWormOptions ¶ added in v0.3.0
type BlobContainersClientBeginObjectLevelWormOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm method.
type BlobContainersClientClearLegalHoldOptions ¶ added in v0.3.0
type BlobContainersClientClearLegalHoldOptions struct { }
BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold method.
type BlobContainersClientClearLegalHoldResponse ¶ added in v0.3.0
type BlobContainersClientClearLegalHoldResponse struct { // The LegalHold property of a blob container. LegalHold }
BlobContainersClientClearLegalHoldResponse contains the response from method BlobContainersClient.ClearLegalHold.
type BlobContainersClientCreateOptions ¶ added in v0.3.0
type BlobContainersClientCreateOptions struct { }
BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method.
type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions ¶ added in v0.3.0
type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation // only if the immutability policy already exists. If omitted, this operation will // always be applied. IfMatch *string // The ImmutabilityPolicy Properties that will be created or updated to a blob container. Parameters *ImmutabilityPolicy }
BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy method.
type BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse ¶ added in v0.3.0
type BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse struct { // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy // ETag contains the information returned from the ETag header response. ETag *string }
BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse contains the response from method BlobContainersClient.CreateOrUpdateImmutabilityPolicy.
type BlobContainersClientCreateResponse ¶ added in v0.3.0
type BlobContainersClientCreateResponse struct { // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer }
BlobContainersClientCreateResponse contains the response from method BlobContainersClient.Create.
type BlobContainersClientDeleteImmutabilityPolicyOptions ¶ added in v0.3.0
type BlobContainersClientDeleteImmutabilityPolicyOptions struct { }
BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy method.
type BlobContainersClientDeleteImmutabilityPolicyResponse ¶ added in v0.3.0
type BlobContainersClientDeleteImmutabilityPolicyResponse struct { // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy // ETag contains the information returned from the ETag header response. ETag *string }
BlobContainersClientDeleteImmutabilityPolicyResponse contains the response from method BlobContainersClient.DeleteImmutabilityPolicy.
type BlobContainersClientDeleteOptions ¶ added in v0.3.0
type BlobContainersClientDeleteOptions struct { }
BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method.
type BlobContainersClientDeleteResponse ¶ added in v0.3.0
type BlobContainersClientDeleteResponse struct { }
BlobContainersClientDeleteResponse contains the response from method BlobContainersClient.Delete.
type BlobContainersClientExtendImmutabilityPolicyOptions ¶ added in v0.3.0
type BlobContainersClientExtendImmutabilityPolicyOptions struct { // The ImmutabilityPolicy Properties that will be extended for a blob container. Parameters *ImmutabilityPolicy }
BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy method.
type BlobContainersClientExtendImmutabilityPolicyResponse ¶ added in v0.3.0
type BlobContainersClientExtendImmutabilityPolicyResponse struct { // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy // ETag contains the information returned from the ETag header response. ETag *string }
BlobContainersClientExtendImmutabilityPolicyResponse contains the response from method BlobContainersClient.ExtendImmutabilityPolicy.
type BlobContainersClientGetImmutabilityPolicyOptions ¶ added in v0.3.0
type BlobContainersClientGetImmutabilityPolicyOptions struct { // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation // only if the immutability policy already exists. If omitted, this operation will // always be applied. IfMatch *string }
BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy method.
type BlobContainersClientGetImmutabilityPolicyResponse ¶ added in v0.3.0
type BlobContainersClientGetImmutabilityPolicyResponse struct { // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy // ETag contains the information returned from the ETag header response. ETag *string }
BlobContainersClientGetImmutabilityPolicyResponse contains the response from method BlobContainersClient.GetImmutabilityPolicy.
type BlobContainersClientGetOptions ¶ added in v0.3.0
type BlobContainersClientGetOptions struct { }
BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method.
type BlobContainersClientGetResponse ¶ added in v0.3.0
type BlobContainersClientGetResponse struct { // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer }
BlobContainersClientGetResponse contains the response from method BlobContainersClient.Get.
type BlobContainersClientLeaseOptions ¶ added in v0.3.0
type BlobContainersClientLeaseOptions struct { // Lease Container request body. Parameters *LeaseContainerRequest }
BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method.
type BlobContainersClientLeaseResponse ¶ added in v0.3.0
type BlobContainersClientLeaseResponse struct { // Lease Container response schema. LeaseContainerResponse }
BlobContainersClientLeaseResponse contains the response from method BlobContainersClient.Lease.
type BlobContainersClientListOptions ¶ added in v0.3.0
type BlobContainersClientListOptions struct { // Optional. When specified, only container names starting with the filter will be listed. Filter *string // Optional, used to include the properties for soft deleted blob containers. Include *ListContainersInclude // Optional. Specified maximum number of containers that can be included in the list. Maxpagesize *string }
BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method.
type BlobContainersClientListResponse ¶ added in v0.3.0
type BlobContainersClientListResponse struct { // Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers. ListContainerItems }
BlobContainersClientListResponse contains the response from method BlobContainersClient.NewListPager.
type BlobContainersClientLockImmutabilityPolicyOptions ¶ added in v0.3.0
type BlobContainersClientLockImmutabilityPolicyOptions struct { }
BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy method.
type BlobContainersClientLockImmutabilityPolicyResponse ¶ added in v0.3.0
type BlobContainersClientLockImmutabilityPolicyResponse struct { // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy // ETag contains the information returned from the ETag header response. ETag *string }
BlobContainersClientLockImmutabilityPolicyResponse contains the response from method BlobContainersClient.LockImmutabilityPolicy.
type BlobContainersClientObjectLevelWormResponse ¶ added in v0.3.0
type BlobContainersClientObjectLevelWormResponse struct { }
BlobContainersClientObjectLevelWormResponse contains the response from method BlobContainersClient.BeginObjectLevelWorm.
type BlobContainersClientSetLegalHoldOptions ¶ added in v0.3.0
type BlobContainersClientSetLegalHoldOptions struct { }
BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method.
type BlobContainersClientSetLegalHoldResponse ¶ added in v0.3.0
type BlobContainersClientSetLegalHoldResponse struct { // The LegalHold property of a blob container. LegalHold }
BlobContainersClientSetLegalHoldResponse contains the response from method BlobContainersClient.SetLegalHold.
type BlobContainersClientUpdateOptions ¶ added in v0.3.0
type BlobContainersClientUpdateOptions struct { }
BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method.
type BlobContainersClientUpdateResponse ¶ added in v0.3.0
type BlobContainersClientUpdateResponse struct { // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer }
BlobContainersClientUpdateResponse contains the response from method BlobContainersClient.Update.
type BlobInventoryCreationTime ¶ added in v1.4.0
type BlobInventoryCreationTime struct { // When set the policy filters the objects that are created in the last N days. Where N is an integer value between 1 to 36500. LastNDays *int32 }
BlobInventoryCreationTime - This property defines the creation time based filtering condition. Blob Inventory schema parameter 'Creation-Time' is mandatory with this filter.
func (BlobInventoryCreationTime) MarshalJSON ¶ added in v1.4.0
func (b BlobInventoryCreationTime) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryCreationTime.
func (*BlobInventoryCreationTime) UnmarshalJSON ¶ added in v1.4.0
func (b *BlobInventoryCreationTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryCreationTime.
type BlobInventoryPoliciesClient ¶
type BlobInventoryPoliciesClient struct {
// contains filtered or unexported fields
}
BlobInventoryPoliciesClient contains the methods for the BlobInventoryPolicies group. Don't use this type directly, use NewBlobInventoryPoliciesClient() instead.
func NewBlobInventoryPoliciesClient ¶
func NewBlobInventoryPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobInventoryPoliciesClient, error)
NewBlobInventoryPoliciesClient creates a new instance of BlobInventoryPoliciesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BlobInventoryPoliciesClient) CreateOrUpdate ¶
func (client *BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, properties BlobInventoryPolicy, options *BlobInventoryPoliciesClientCreateOrUpdateOptions) (BlobInventoryPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Sets the blob inventory policy to the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- blobInventoryPolicyName - The name of the storage account blob inventory policy. It should always be 'default'
- properties - The blob inventory policy set to a storage account.
- options - BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate method.
Example (StorageAccountSetBlobInventoryPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ Properties: &armstorage.BlobInventoryPolicyProperties{ Policy: &armstorage.BlobInventoryPolicySchema{ Type: to.Ptr(armstorage.InventoryRuleTypeInventory), Enabled: to.Ptr(true), Rules: []*armstorage.BlobInventoryPolicyRule{ { Name: to.Ptr("inventoryPolicyRule1"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatCSV), Filters: &armstorage.BlobInventoryPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob"), to.Ptr("appendBlob"), to.Ptr("pageBlob")}, CreationTime: &armstorage.BlobInventoryCreationTime{ LastNDays: to.Ptr[int32](1000), }, IncludeBlobVersions: to.Ptr(true), IncludeSnapshots: to.Ptr(true), PrefixMatch: []*string{ to.Ptr("inventoryprefix1"), to.Ptr("inventoryprefix2")}, }, ObjectType: to.Ptr(armstorage.ObjectTypeBlob), Schedule: to.Ptr(armstorage.ScheduleDaily), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Creation-Time"), to.Ptr("Last-Modified"), to.Ptr("Content-Length"), to.Ptr("Content-MD5"), to.Ptr("BlobType"), to.Ptr("AccessTier"), to.Ptr("AccessTierChangeTime"), to.Ptr("Snapshot"), to.Ptr("VersionId"), to.Ptr("IsCurrentVersion"), to.Ptr("Metadata")}, }, Destination: to.Ptr("container1"), Enabled: to.Ptr(true), }, { Name: to.Ptr("inventoryPolicyRule2"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatParquet), ObjectType: to.Ptr(armstorage.ObjectTypeContainer), Schedule: to.Ptr(armstorage.ScheduleWeekly), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Last-Modified"), to.Ptr("Metadata"), to.Ptr("LeaseStatus"), to.Ptr("LeaseState"), to.Ptr("LeaseDuration"), to.Ptr("PublicAccess"), to.Ptr("HasImmutabilityPolicy"), to.Ptr("HasLegalHold")}, }, Destination: to.Ptr("container2"), Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ // Name: to.Ptr("DefaultInventoryPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), // Properties: &armstorage.BlobInventoryPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.093Z"); return t}()), // Policy: &armstorage.BlobInventoryPolicySchema{ // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), // Enabled: to.Ptr(true), // Rules: []*armstorage.BlobInventoryPolicyRule{ // { // Name: to.Ptr("inventoryPolicyRule1"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatCSV), // Filters: &armstorage.BlobInventoryPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob"), // to.Ptr("pageBlob")}, // CreationTime: &armstorage.BlobInventoryCreationTime{ // LastNDays: to.Ptr[int32](1000), // }, // IncludeBlobVersions: to.Ptr(true), // IncludeSnapshots: to.Ptr(true), // PrefixMatch: []*string{ // to.Ptr("inventoryprefix1"), // to.Ptr("inventoryprefix2")}, // }, // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), // Schedule: to.Ptr(armstorage.ScheduleDaily), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Creation-Time"), // to.Ptr("Last-Modified"), // to.Ptr("Content-Length"), // to.Ptr("Content-MD5"), // to.Ptr("BlobType"), // to.Ptr("AccessTier"), // to.Ptr("AccessTierChangeTime"), // to.Ptr("Snapshot"), // to.Ptr("VersionId"), // to.Ptr("IsCurrentVersion"), // to.Ptr("Metadata")}, // }, // Destination: to.Ptr("container1"), // Enabled: to.Ptr(true), // }, // { // Name: to.Ptr("inventoryPolicyRule2"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatParquet), // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), // Schedule: to.Ptr(armstorage.ScheduleWeekly), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Last-Modified"), // to.Ptr("Metadata"), // to.Ptr("LeaseStatus"), // to.Ptr("LeaseState"), // to.Ptr("LeaseDuration"), // to.Ptr("PublicAccess"), // to.Ptr("HasImmutabilityPolicy"), // to.Ptr("HasLegalHold")}, // }, // Destination: to.Ptr("container2"), // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ Properties: &armstorage.BlobInventoryPolicyProperties{ Policy: &armstorage.BlobInventoryPolicySchema{ Type: to.Ptr(armstorage.InventoryRuleTypeInventory), Enabled: to.Ptr(true), Rules: []*armstorage.BlobInventoryPolicyRule{ { Name: to.Ptr("inventoryPolicyRule1"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatCSV), Filters: &armstorage.BlobInventoryPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob"), to.Ptr("appendBlob"), to.Ptr("pageBlob")}, ExcludePrefix: []*string{ to.Ptr("excludeprefix1"), to.Ptr("excludeprefix2")}, IncludeBlobVersions: to.Ptr(true), IncludeDeleted: to.Ptr(true), IncludeSnapshots: to.Ptr(true), PrefixMatch: []*string{ to.Ptr("inventoryprefix1"), to.Ptr("inventoryprefix2")}, }, ObjectType: to.Ptr(armstorage.ObjectTypeBlob), Schedule: to.Ptr(armstorage.ScheduleDaily), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Creation-Time"), to.Ptr("Last-Modified"), to.Ptr("Content-Length"), to.Ptr("Content-MD5"), to.Ptr("BlobType"), to.Ptr("AccessTier"), to.Ptr("AccessTierChangeTime"), to.Ptr("Snapshot"), to.Ptr("VersionId"), to.Ptr("IsCurrentVersion"), to.Ptr("ContentType"), to.Ptr("ContentEncoding"), to.Ptr("ContentLanguage"), to.Ptr("ContentCRC64"), to.Ptr("CacheControl"), to.Ptr("Metadata"), to.Ptr("DeletionId"), to.Ptr("Deleted"), to.Ptr("DeletedTime"), to.Ptr("RemainingRetentionDays")}, }, Destination: to.Ptr("container1"), Enabled: to.Ptr(true), }, { Name: to.Ptr("inventoryPolicyRule2"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatParquet), ObjectType: to.Ptr(armstorage.ObjectTypeContainer), Schedule: to.Ptr(armstorage.ScheduleWeekly), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Last-Modified"), to.Ptr("Metadata"), to.Ptr("LeaseStatus"), to.Ptr("LeaseState"), to.Ptr("LeaseDuration"), to.Ptr("PublicAccess"), to.Ptr("HasImmutabilityPolicy"), to.Ptr("HasLegalHold"), to.Ptr("Etag"), to.Ptr("DefaultEncryptionScope"), to.Ptr("DenyEncryptionScopeOverride"), to.Ptr("ImmutableStorageWithVersioningEnabled"), to.Ptr("Deleted"), to.Ptr("Version"), to.Ptr("DeletedTime"), to.Ptr("RemainingRetentionDays")}, }, Destination: to.Ptr("container2"), Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ // Name: to.Ptr("DefaultInventoryPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), // Properties: &armstorage.BlobInventoryPolicyProperties{ // Policy: &armstorage.BlobInventoryPolicySchema{ // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), // Enabled: to.Ptr(true), // Rules: []*armstorage.BlobInventoryPolicyRule{ // { // Name: to.Ptr("inventoryPolicyRule1"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatCSV), // Filters: &armstorage.BlobInventoryPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob"), // to.Ptr("pageBlob")}, // ExcludePrefix: []*string{ // to.Ptr("excludeprefix1"), // to.Ptr("excludeprefix2")}, // IncludeBlobVersions: to.Ptr(true), // IncludeDeleted: to.Ptr(true), // IncludeSnapshots: to.Ptr(true), // PrefixMatch: []*string{ // to.Ptr("inventoryprefix1"), // to.Ptr("inventoryprefix2")}, // }, // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), // Schedule: to.Ptr(armstorage.ScheduleDaily), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Creation-Time"), // to.Ptr("Last-Modified"), // to.Ptr("Content-Length"), // to.Ptr("Content-MD5"), // to.Ptr("BlobType"), // to.Ptr("AccessTier"), // to.Ptr("AccessTierChangeTime"), // to.Ptr("Snapshot"), // to.Ptr("VersionId"), // to.Ptr("IsCurrentVersion"), // to.Ptr("ContentType"), // to.Ptr("ContentEncoding"), // to.Ptr("ContentLanguage"), // to.Ptr("ContentCRC64"), // to.Ptr("CacheControl"), // to.Ptr("Metadata"), // to.Ptr("DeletionId"), // to.Ptr("Deleted"), // to.Ptr("DeletedTime"), // to.Ptr("RemainingRetentionDays")}, // }, // Destination: to.Ptr("container1"), // Enabled: to.Ptr(true), // }, // { // Name: to.Ptr("inventoryPolicyRule2"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatParquet), // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), // Schedule: to.Ptr(armstorage.ScheduleWeekly), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Last-Modified"), // to.Ptr("Metadata"), // to.Ptr("LeaseStatus"), // to.Ptr("LeaseState"), // to.Ptr("LeaseDuration"), // to.Ptr("PublicAccess"), // to.Ptr("HasImmutabilityPolicy"), // to.Ptr("HasLegalHold"), // to.Ptr("Etag"), // to.Ptr("DefaultEncryptionScope"), // to.Ptr("DenyEncryptionScopeOverride"), // to.Ptr("ImmutableStorageWithVersioningEnabled"), // to.Ptr("Deleted"), // to.Ptr("Version"), // to.Ptr("DeletedTime"), // to.Ptr("RemainingRetentionDays")}, // }, // Destination: to.Ptr("container2"), // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobInventoryPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, armstorage.BlobInventoryPolicy{ Properties: &armstorage.BlobInventoryPolicyProperties{ Policy: &armstorage.BlobInventoryPolicySchema{ Type: to.Ptr(armstorage.InventoryRuleTypeInventory), Enabled: to.Ptr(true), Rules: []*armstorage.BlobInventoryPolicyRule{ { Name: to.Ptr("inventoryPolicyRule1"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatCSV), Filters: &armstorage.BlobInventoryPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob"), to.Ptr("appendBlob"), to.Ptr("pageBlob")}, ExcludePrefix: []*string{ to.Ptr("excludeprefix1"), to.Ptr("excludeprefix2")}, IncludeBlobVersions: to.Ptr(true), IncludeDeleted: to.Ptr(true), IncludeSnapshots: to.Ptr(true), PrefixMatch: []*string{ to.Ptr("inventoryprefix1"), to.Ptr("inventoryprefix2")}, }, ObjectType: to.Ptr(armstorage.ObjectTypeBlob), Schedule: to.Ptr(armstorage.ScheduleDaily), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Creation-Time"), to.Ptr("Last-Modified"), to.Ptr("Content-Length"), to.Ptr("Content-MD5"), to.Ptr("BlobType"), to.Ptr("AccessTier"), to.Ptr("AccessTierChangeTime"), to.Ptr("Snapshot"), to.Ptr("VersionId"), to.Ptr("IsCurrentVersion"), to.Ptr("Tags"), to.Ptr("ContentType"), to.Ptr("ContentEncoding"), to.Ptr("ContentLanguage"), to.Ptr("ContentCRC64"), to.Ptr("CacheControl"), to.Ptr("Metadata"), to.Ptr("Deleted"), to.Ptr("RemainingRetentionDays")}, }, Destination: to.Ptr("container1"), Enabled: to.Ptr(true), }, { Name: to.Ptr("inventoryPolicyRule2"), Definition: &armstorage.BlobInventoryPolicyDefinition{ Format: to.Ptr(armstorage.FormatParquet), ObjectType: to.Ptr(armstorage.ObjectTypeContainer), Schedule: to.Ptr(armstorage.ScheduleWeekly), SchemaFields: []*string{ to.Ptr("Name"), to.Ptr("Last-Modified"), to.Ptr("Metadata"), to.Ptr("LeaseStatus"), to.Ptr("LeaseState"), to.Ptr("LeaseDuration"), to.Ptr("PublicAccess"), to.Ptr("HasImmutabilityPolicy"), to.Ptr("HasLegalHold"), to.Ptr("Etag"), to.Ptr("DefaultEncryptionScope"), to.Ptr("DenyEncryptionScopeOverride"), to.Ptr("ImmutableStorageWithVersioningEnabled"), to.Ptr("Deleted"), to.Ptr("Version"), to.Ptr("DeletedTime"), to.Ptr("RemainingRetentionDays")}, }, Destination: to.Ptr("container2"), Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ // Name: to.Ptr("DefaultInventoryPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), // Properties: &armstorage.BlobInventoryPolicyProperties{ // Policy: &armstorage.BlobInventoryPolicySchema{ // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), // Enabled: to.Ptr(true), // Rules: []*armstorage.BlobInventoryPolicyRule{ // { // Name: to.Ptr("inventoryPolicyRule1"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatCSV), // Filters: &armstorage.BlobInventoryPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob"), // to.Ptr("pageBlob")}, // ExcludePrefix: []*string{ // to.Ptr("excludeprefix1"), // to.Ptr("excludeprefix2")}, // IncludeBlobVersions: to.Ptr(true), // IncludeDeleted: to.Ptr(true), // IncludeSnapshots: to.Ptr(true), // PrefixMatch: []*string{ // to.Ptr("inventoryprefix1"), // to.Ptr("inventoryprefix2")}, // }, // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), // Schedule: to.Ptr(armstorage.ScheduleDaily), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Creation-Time"), // to.Ptr("Last-Modified"), // to.Ptr("Content-Length"), // to.Ptr("Content-MD5"), // to.Ptr("BlobType"), // to.Ptr("AccessTier"), // to.Ptr("AccessTierChangeTime"), // to.Ptr("Snapshot"), // to.Ptr("VersionId"), // to.Ptr("IsCurrentVersion"), // to.Ptr("Tags"), // to.Ptr("ContentType"), // to.Ptr("ContentEncoding"), // to.Ptr("ContentLanguage"), // to.Ptr("ContentCRC64"), // to.Ptr("CacheControl"), // to.Ptr("Metadata"), // to.Ptr("Deleted"), // to.Ptr("RemainingRetentionDays")}, // }, // Destination: to.Ptr("container1"), // Enabled: to.Ptr(true), // }, // { // Name: to.Ptr("inventoryPolicyRule2"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatParquet), // ObjectType: to.Ptr(armstorage.ObjectTypeContainer), // Schedule: to.Ptr(armstorage.ScheduleWeekly), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Last-Modified"), // to.Ptr("Metadata"), // to.Ptr("LeaseStatus"), // to.Ptr("LeaseState"), // to.Ptr("LeaseDuration"), // to.Ptr("PublicAccess"), // to.Ptr("HasImmutabilityPolicy"), // to.Ptr("HasLegalHold"), // to.Ptr("Etag"), // to.Ptr("DefaultEncryptionScope"), // to.Ptr("DenyEncryptionScopeOverride"), // to.Ptr("ImmutableStorageWithVersioningEnabled"), // to.Ptr("Deleted"), // to.Ptr("Version"), // to.Ptr("DeletedTime"), // to.Ptr("RemainingRetentionDays")}, // }, // Destination: to.Ptr("container2"), // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
func (*BlobInventoryPoliciesClient) Delete ¶
func (client *BlobInventoryPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientDeleteOptions) (BlobInventoryPoliciesClientDeleteResponse, error)
Delete - Deletes the blob inventory policy associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- blobInventoryPolicyName - The name of the storage account blob inventory policy. It should always be 'default'
- options - BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewBlobInventoryPoliciesClient().Delete(ctx, "res6977", "sto2527", armstorage.BlobInventoryPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*BlobInventoryPoliciesClient) Get ¶
func (client *BlobInventoryPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, blobInventoryPolicyName BlobInventoryPolicyName, options *BlobInventoryPoliciesClientGetOptions) (BlobInventoryPoliciesClientGetResponse, error)
Get - Gets the blob inventory policy associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- blobInventoryPolicyName - The name of the storage account blob inventory policy. It should always be 'default'
- options - BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobInventoryPoliciesClient().Get(ctx, "res7687", "sto9699", armstorage.BlobInventoryPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobInventoryPolicy = armstorage.BlobInventoryPolicy{ // Name: to.Ptr("DefaultInventoryPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), // Properties: &armstorage.BlobInventoryPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.093Z"); return t}()), // Policy: &armstorage.BlobInventoryPolicySchema{ // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), // Enabled: to.Ptr(true), // Rules: []*armstorage.BlobInventoryPolicyRule{ // { // Name: to.Ptr("inventoryPolicyRule1"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatCSV), // Filters: &armstorage.BlobInventoryPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob"), // to.Ptr("pageBlob")}, // IncludeBlobVersions: to.Ptr(true), // IncludeSnapshots: to.Ptr(true), // PrefixMatch: []*string{ // to.Ptr("inventoryprefix1"), // to.Ptr("inventoryprefix2")}, // }, // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), // Schedule: to.Ptr(armstorage.ScheduleDaily), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Creation-Time"), // to.Ptr("Last-Modified"), // to.Ptr("Content-Length"), // to.Ptr("Content-MD5"), // to.Ptr("BlobType"), // to.Ptr("AccessTier"), // to.Ptr("AccessTierChangeTime"), // to.Ptr("Snapshot"), // to.Ptr("VersionId"), // to.Ptr("IsCurrentVersion"), // to.Ptr("Metadata")}, // }, // Destination: to.Ptr("container1"), // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
func (*BlobInventoryPoliciesClient) NewListPager ¶ added in v0.6.0
func (client *BlobInventoryPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *BlobInventoryPoliciesClientListOptions) *runtime.Pager[BlobInventoryPoliciesClientListResponse]
NewListPager - Gets the blob inventory policy associated with the specified storage account.
Generated from API version 2023-05-01
- 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.
- options - BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBlobInventoryPoliciesClient().NewListPager("res7687", "sto9699", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListBlobInventoryPolicy = armstorage.ListBlobInventoryPolicy{ // Value: []*armstorage.BlobInventoryPolicy{ // { // Name: to.Ptr("DefaultInventoryPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/inventoryPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default"), // Properties: &armstorage.BlobInventoryPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-05T02:53:39.093Z"); return t}()), // Policy: &armstorage.BlobInventoryPolicySchema{ // Type: to.Ptr(armstorage.InventoryRuleTypeInventory), // Enabled: to.Ptr(true), // Rules: []*armstorage.BlobInventoryPolicyRule{ // { // Name: to.Ptr("inventoryPolicyRule1"), // Definition: &armstorage.BlobInventoryPolicyDefinition{ // Format: to.Ptr(armstorage.FormatCSV), // Filters: &armstorage.BlobInventoryPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob"), // to.Ptr("pageBlob")}, // IncludeBlobVersions: to.Ptr(true), // IncludeSnapshots: to.Ptr(true), // PrefixMatch: []*string{ // to.Ptr("inventoryprefix1"), // to.Ptr("inventoryprefix2")}, // }, // ObjectType: to.Ptr(armstorage.ObjectTypeBlob), // Schedule: to.Ptr(armstorage.ScheduleDaily), // SchemaFields: []*string{ // to.Ptr("Name"), // to.Ptr("Creation-Time"), // to.Ptr("Last-Modified"), // to.Ptr("Content-Length"), // to.Ptr("Content-MD5"), // to.Ptr("BlobType"), // to.Ptr("AccessTier"), // to.Ptr("AccessTierChangeTime"), // to.Ptr("Snapshot"), // to.Ptr("VersionId"), // to.Ptr("IsCurrentVersion"), // to.Ptr("Metadata")}, // }, // Destination: to.Ptr("container1"), // Enabled: to.Ptr(true), // }}, // }, // }, // }}, // } } }
Output:
type BlobInventoryPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { }
BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate method.
type BlobInventoryPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type BlobInventoryPoliciesClientCreateOrUpdateResponse struct { // The storage account blob inventory policy. BlobInventoryPolicy }
BlobInventoryPoliciesClientCreateOrUpdateResponse contains the response from method BlobInventoryPoliciesClient.CreateOrUpdate.
type BlobInventoryPoliciesClientDeleteOptions ¶ added in v0.3.0
type BlobInventoryPoliciesClientDeleteOptions struct { }
BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method.
type BlobInventoryPoliciesClientDeleteResponse ¶ added in v0.3.0
type BlobInventoryPoliciesClientDeleteResponse struct { }
BlobInventoryPoliciesClientDeleteResponse contains the response from method BlobInventoryPoliciesClient.Delete.
type BlobInventoryPoliciesClientGetOptions ¶ added in v0.3.0
type BlobInventoryPoliciesClientGetOptions struct { }
BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method.
type BlobInventoryPoliciesClientGetResponse ¶ added in v0.3.0
type BlobInventoryPoliciesClientGetResponse struct { // The storage account blob inventory policy. BlobInventoryPolicy }
BlobInventoryPoliciesClientGetResponse contains the response from method BlobInventoryPoliciesClient.Get.
type BlobInventoryPoliciesClientListOptions ¶ added in v0.3.0
type BlobInventoryPoliciesClientListOptions struct { }
BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager method.
type BlobInventoryPoliciesClientListResponse ¶ added in v0.3.0
type BlobInventoryPoliciesClientListResponse struct { // List of blob inventory policies returned. ListBlobInventoryPolicy }
BlobInventoryPoliciesClientListResponse contains the response from method BlobInventoryPoliciesClient.NewListPager.
type BlobInventoryPolicy ¶
type BlobInventoryPolicy struct { // Returns the storage account blob inventory policy rules. Properties *BlobInventoryPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BlobInventoryPolicy - The storage account blob inventory policy.
func (BlobInventoryPolicy) MarshalJSON ¶
func (b BlobInventoryPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicy.
func (*BlobInventoryPolicy) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobInventoryPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicy.
type BlobInventoryPolicyDefinition ¶
type BlobInventoryPolicyDefinition struct { // REQUIRED; This is a required field, it specifies the format for the inventory files. Format *Format // REQUIRED; This is a required field. This field specifies the scope of the inventory created either at the blob or container // level. ObjectType *ObjectType // REQUIRED; This is a required field. This field is used to schedule an inventory formation. Schedule *Schedule // REQUIRED; This is a required field. This field specifies the fields and properties of the object to be included in the // inventory. The Schema field value 'Name' is always required. The valid values for this // field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, // AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, // hdiisfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, // ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, // ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, // ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, // CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, // ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, // IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. // The valid values for 'Container' definition.objectType include 'Name, // Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, // DefaultEncryptionScope, DenyEncryptionScopeOverride, // ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, // hdiisfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only // for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts. SchemaFields []*string // An object that defines the filter set. Filters *BlobInventoryPolicyFilter }
BlobInventoryPolicyDefinition - An object that defines the blob inventory rule.
func (BlobInventoryPolicyDefinition) MarshalJSON ¶
func (b BlobInventoryPolicyDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicyDefinition.
func (*BlobInventoryPolicyDefinition) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobInventoryPolicyDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicyDefinition.
type BlobInventoryPolicyFilter ¶
type BlobInventoryPolicyFilter struct { // An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support // pageBlobs. This field is required when definition.objectType property is set to // 'Blob'. BlobTypes []*string // This property is used to filter objects based on the object creation time CreationTime *BlobInventoryCreationTime // An array of strings with maximum 10 blob prefixes to be excluded from the inventory. ExcludePrefix []*string // Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' // are required if this property is set to true, else they must be // excluded. IncludeBlobVersions *bool // For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. // For 'Blob' definition.objectType and HNS enabled storage // accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for // Hns disabled accounts the definition.schemaFields must include 'Deleted and // RemainingRetentionDays', else it must be excluded. IncludeDeleted *bool // Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required // if this property is set to true, else it must be excluded. IncludeSnapshots *bool // An array of strings with maximum 10 blob prefixes to be included in the inventory. PrefixMatch []*string }
BlobInventoryPolicyFilter - An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional.
func (BlobInventoryPolicyFilter) MarshalJSON ¶
func (b BlobInventoryPolicyFilter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicyFilter.
func (*BlobInventoryPolicyFilter) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobInventoryPolicyFilter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicyFilter.
type BlobInventoryPolicyName ¶
type BlobInventoryPolicyName string
const (
BlobInventoryPolicyNameDefault BlobInventoryPolicyName = "default"
)
func PossibleBlobInventoryPolicyNameValues ¶
func PossibleBlobInventoryPolicyNameValues() []BlobInventoryPolicyName
PossibleBlobInventoryPolicyNameValues returns the possible values for the BlobInventoryPolicyName const type.
type BlobInventoryPolicyProperties ¶
type BlobInventoryPolicyProperties struct { // REQUIRED; The storage account blob inventory policy object. It is composed of policy rules. Policy *BlobInventoryPolicySchema // READ-ONLY; Returns the last modified date and time of the blob inventory policy. LastModifiedTime *time.Time }
BlobInventoryPolicyProperties - The storage account blob inventory policy properties.
func (BlobInventoryPolicyProperties) MarshalJSON ¶
func (b BlobInventoryPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicyProperties.
func (*BlobInventoryPolicyProperties) UnmarshalJSON ¶
func (b *BlobInventoryPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicyProperties.
type BlobInventoryPolicyRule ¶
type BlobInventoryPolicyRule struct { // REQUIRED; An object that defines the blob inventory policy rule. Definition *BlobInventoryPolicyDefinition // REQUIRED; Container name where blob inventory files are stored. Must be pre-created. Destination *string // REQUIRED; Rule is enabled when set to true. Enabled *bool // REQUIRED; A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be // unique within a policy. Name *string }
BlobInventoryPolicyRule - An object that wraps the blob inventory rule. Each rule is uniquely defined by name.
func (BlobInventoryPolicyRule) MarshalJSON ¶ added in v1.1.0
func (b BlobInventoryPolicyRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicyRule.
func (*BlobInventoryPolicyRule) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobInventoryPolicyRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicyRule.
type BlobInventoryPolicySchema ¶
type BlobInventoryPolicySchema struct { // REQUIRED; Policy is enabled if set to true. Enabled *bool // REQUIRED; The storage account blob inventory policy rules. The rule is applied when it is enabled. Rules []*BlobInventoryPolicyRule // REQUIRED; The valid value is Inventory Type *InventoryRuleType // READ-ONLY; Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified // at the rule level 'policy.rule.destination' Destination *string }
BlobInventoryPolicySchema - The storage account blob inventory policy rules.
func (BlobInventoryPolicySchema) MarshalJSON ¶
func (b BlobInventoryPolicySchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobInventoryPolicySchema.
func (*BlobInventoryPolicySchema) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobInventoryPolicySchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobInventoryPolicySchema.
type BlobRestoreParameters ¶
type BlobRestoreParameters struct { // REQUIRED; Blob ranges to restore. BlobRanges []*BlobRestoreRange // REQUIRED; Restore blob to the specified time. TimeToRestore *time.Time }
BlobRestoreParameters - Blob restore parameters
func (BlobRestoreParameters) MarshalJSON ¶
func (b BlobRestoreParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobRestoreParameters.
func (*BlobRestoreParameters) UnmarshalJSON ¶
func (b *BlobRestoreParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobRestoreParameters.
type BlobRestoreProgressStatus ¶
type BlobRestoreProgressStatus string
BlobRestoreProgressStatus - The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.
const ( BlobRestoreProgressStatusComplete BlobRestoreProgressStatus = "Complete" BlobRestoreProgressStatusFailed BlobRestoreProgressStatus = "Failed" BlobRestoreProgressStatusInProgress BlobRestoreProgressStatus = "InProgress" )
func PossibleBlobRestoreProgressStatusValues ¶
func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus
PossibleBlobRestoreProgressStatusValues returns the possible values for the BlobRestoreProgressStatus const type.
type BlobRestoreRange ¶
type BlobRestoreRange struct { // REQUIRED; Blob end range. This is exclusive. Empty means account end. EndRange *string // REQUIRED; Blob start range. This is inclusive. Empty means account start. StartRange *string }
BlobRestoreRange - Blob range
func (BlobRestoreRange) MarshalJSON ¶ added in v1.1.0
func (b BlobRestoreRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobRestoreRange.
func (*BlobRestoreRange) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobRestoreRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobRestoreRange.
type BlobRestoreStatus ¶
type BlobRestoreStatus struct { // READ-ONLY; Failure reason when blob restore is failed. FailureReason *string // READ-ONLY; Blob restore request parameters. Parameters *BlobRestoreParameters // READ-ONLY; Id for tracking blob restore request. RestoreID *string // READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. // - Complete: Indicates that blob restore has been completed successfully. - Failed: // Indicates that blob restore is failed. Status *BlobRestoreProgressStatus }
BlobRestoreStatus - Blob restore status.
func (BlobRestoreStatus) MarshalJSON ¶ added in v1.1.0
func (b BlobRestoreStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobRestoreStatus.
func (*BlobRestoreStatus) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobRestoreStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobRestoreStatus.
type BlobServiceItems ¶
type BlobServiceItems struct { // READ-ONLY; List of blob services returned. Value []*BlobServiceProperties }
func (BlobServiceItems) MarshalJSON ¶
func (b BlobServiceItems) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobServiceItems.
func (*BlobServiceItems) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobServiceItems) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobServiceItems.
type BlobServiceProperties ¶
type BlobServiceProperties struct { // The properties of a storage account’s Blob service. BlobServiceProperties *BlobServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Sku name and tier. SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
BlobServiceProperties - The properties of a storage account’s Blob service.
func (BlobServiceProperties) MarshalJSON ¶
func (b BlobServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobServiceProperties.
func (*BlobServiceProperties) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobServiceProperties.
type BlobServicePropertiesProperties ¶
type BlobServicePropertiesProperties struct { // Deprecated in favor of isVersioningEnabled property. AutomaticSnapshotPolicyEnabled *bool // The blob service properties for change feed events. ChangeFeed *ChangeFeed // The blob service properties for container soft delete. ContainerDeleteRetentionPolicy *DeleteRetentionPolicy // Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Blob service. Cors *CorsRules // DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version // is not specified. Possible values include version 2008-10-27 and all more // recent versions. DefaultServiceVersion *string // The blob service properties for blob soft delete. DeleteRetentionPolicy *DeleteRetentionPolicy // Versioning is enabled if set to true. IsVersioningEnabled *bool // The blob service property to configure last access time based tracking policy. LastAccessTimeTrackingPolicy *LastAccessTimeTrackingPolicy // The blob service properties for blob restore policy. RestorePolicy *RestorePolicyProperties }
BlobServicePropertiesProperties - The properties of a storage account’s Blob service.
func (BlobServicePropertiesProperties) MarshalJSON ¶ added in v1.1.0
func (b BlobServicePropertiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobServicePropertiesProperties.
func (*BlobServicePropertiesProperties) UnmarshalJSON ¶ added in v1.1.0
func (b *BlobServicePropertiesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobServicePropertiesProperties.
type BlobServicesClient ¶
type BlobServicesClient struct {
// contains filtered or unexported fields
}
BlobServicesClient contains the methods for the BlobServices group. Don't use this type directly, use NewBlobServicesClient() instead.
func NewBlobServicesClient ¶
func NewBlobServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BlobServicesClient, error)
NewBlobServicesClient creates a new instance of BlobServicesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BlobServicesClient) GetServiceProperties ¶
func (client *BlobServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *BlobServicesClientGetServicePropertiesOptions) (BlobServicesClientGetServicePropertiesResponse, error)
GetServiceProperties - Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobServiceProperties = armstorage.BlobServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ // ChangeFeed: &armstorage.ChangeFeed{ // Enabled: to.Ptr(true), // RetentionInDays: to.Ptr[int32](7), // }, // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x -ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // DefaultServiceVersion: to.Ptr("2017-07-29"), // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ // Days: to.Ptr[int32](300), // Enabled: to.Ptr(true), // }, // IsVersioningEnabled: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
func (*BlobServicesClient) NewListPager ¶ added in v0.6.0
func (client *BlobServicesClient) NewListPager(resourceGroupName string, accountName string, options *BlobServicesClientListOptions) *runtime.Pager[BlobServicesClientListResponse]
NewListPager - List blob services of storage account. It returns a collection of one object named default.
Generated from API version 2023-05-01
- 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.
- options - BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBlobServicesClient().NewListPager("res4410", "sto8607", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BlobServiceItems = armstorage.BlobServiceItems{ // Value: []*armstorage.BlobServiceProperties{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ // ChangeFeed: &armstorage.ChangeFeed{ // Enabled: to.Ptr(true), // RetentionInDays: to.Ptr[int32](7), // }, // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x -ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // DefaultServiceVersion: to.Ptr("2017-07-29"), // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ // Days: to.Ptr[int32](300), // Enabled: to.Ptr(true), // }, // IsVersioningEnabled: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }}, // } } }
Output:
func (*BlobServicesClient) SetServiceProperties ¶
func (client *BlobServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties, options *BlobServicesClientSetServicePropertiesOptions) (BlobServicesClientSetServicePropertiesResponse, error)
SetServiceProperties - Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
- options - BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties method.
Example (BlobServicesPutAllowPermanentDelete) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ AllowPermanentDelete: to.Ptr(true), Days: to.Ptr[int32](300), Enabled: to.Ptr(true), }, IsVersioningEnabled: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobServiceProperties = armstorage.BlobServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ // AllowPermanentDelete: to.Ptr(true), // Days: to.Ptr[int32](300), // Enabled: to.Ptr(true), // }, // IsVersioningEnabled: to.Ptr(true), // }, // } }
Output:
Example (BlobServicesPutLastAccessTimeBasedTracking) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ LastAccessTimeTrackingPolicy: &armstorage.LastAccessTimeTrackingPolicy{ Name: to.Ptr(armstorage.NameAccessTimeTracking), BlobType: []*string{ to.Ptr("blockBlob")}, Enable: to.Ptr(true), TrackingGranularityInDays: to.Ptr[int32](1), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobServiceProperties = armstorage.BlobServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ // LastAccessTimeTrackingPolicy: &armstorage.LastAccessTimeTrackingPolicy{ // Name: to.Ptr(armstorage.NameAccessTimeTracking), // BlobType: []*string{ // to.Ptr("blockBlob")}, // Enable: to.Ptr(true), // TrackingGranularityInDays: to.Ptr[int32](1), // }, // }, // } }
Output:
Example (PutBlobServices) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBlobServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.BlobServiceProperties{ BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ ChangeFeed: &armstorage.ChangeFeed{ Enabled: to.Ptr(true), RetentionInDays: to.Ptr[int32](7), }, Cors: &armstorage.CorsRules{ CorsRules: []*armstorage.CorsRule{ { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.contoso.com"), to.Ptr("http://www.fabrikam.com")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-*")}, MaxAgeInSeconds: to.Ptr[int32](100), }, { AllowedHeaders: []*string{ to.Ptr("*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, AllowedOrigins: []*string{ to.Ptr("*")}, ExposedHeaders: []*string{ to.Ptr("*")}, MaxAgeInSeconds: to.Ptr[int32](2), }, { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-12345675754564*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.abc23.com"), to.Ptr("https://www.fabrikam.com/*")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x -ms-meta-target*")}, MaxAgeInSeconds: to.Ptr[int32](2000), }}, }, DefaultServiceVersion: to.Ptr("2017-07-29"), DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ Days: to.Ptr[int32](300), Enabled: to.Ptr(true), }, IsVersioningEnabled: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BlobServiceProperties = armstorage.BlobServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/blobServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default"), // BlobServiceProperties: &armstorage.BlobServicePropertiesProperties{ // ChangeFeed: &armstorage.ChangeFeed{ // Enabled: to.Ptr(true), // RetentionInDays: to.Ptr[int32](7), // }, // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x -ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // DefaultServiceVersion: to.Ptr("2017-07-29"), // DeleteRetentionPolicy: &armstorage.DeleteRetentionPolicy{ // Days: to.Ptr[int32](300), // Enabled: to.Ptr(true), // }, // IsVersioningEnabled: to.Ptr(true), // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
type BlobServicesClientGetServicePropertiesOptions ¶ added in v0.3.0
type BlobServicesClientGetServicePropertiesOptions struct { }
BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties method.
type BlobServicesClientGetServicePropertiesResponse ¶ added in v0.3.0
type BlobServicesClientGetServicePropertiesResponse struct { // The properties of a storage account’s Blob service. BlobServiceProperties }
BlobServicesClientGetServicePropertiesResponse contains the response from method BlobServicesClient.GetServiceProperties.
type BlobServicesClientListOptions ¶ added in v0.3.0
type BlobServicesClientListOptions struct { }
BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method.
type BlobServicesClientListResponse ¶ added in v0.3.0
type BlobServicesClientListResponse struct {
BlobServiceItems
}
BlobServicesClientListResponse contains the response from method BlobServicesClient.NewListPager.
type BlobServicesClientSetServicePropertiesOptions ¶ added in v0.3.0
type BlobServicesClientSetServicePropertiesOptions struct { }
BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties method.
type BlobServicesClientSetServicePropertiesResponse ¶ added in v0.3.0
type BlobServicesClientSetServicePropertiesResponse struct { // The properties of a storage account’s Blob service. BlobServiceProperties }
BlobServicesClientSetServicePropertiesResponse contains the response from method BlobServicesClient.SetServiceProperties.
type Bypass ¶
type Bypass string
Bypass - Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics.
func PossibleBypassValues ¶
func PossibleBypassValues() []Bypass
PossibleBypassValues returns the possible values for the Bypass const type.
type ChangeFeed ¶
type ChangeFeed struct { // Indicates whether change feed event logging is enabled for the Blob service. Enabled *bool // Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). // A null value indicates an infinite retention of the change feed. RetentionInDays *int32 }
ChangeFeed - The blob service properties for change feed events.
func (ChangeFeed) MarshalJSON ¶ added in v1.1.0
func (c ChangeFeed) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ChangeFeed.
func (*ChangeFeed) UnmarshalJSON ¶ added in v1.1.0
func (c *ChangeFeed) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ChangeFeed.
type CheckNameAvailabilityResult ¶
type CheckNameAvailabilityResult struct { // READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string // 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 // READ-ONLY; Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable // is false. Reason *Reason }
CheckNameAvailabilityResult - The CheckNameAvailability operation response.
func (CheckNameAvailabilityResult) MarshalJSON ¶ added in v1.1.0
func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.
func (*CheckNameAvailabilityResult) UnmarshalJSON ¶ added in v1.1.0
func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.
type ClientFactory ¶ added in v1.3.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.3.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAccountsClient ¶ added in v1.3.0
func (c *ClientFactory) NewAccountsClient() *AccountsClient
NewAccountsClient creates a new instance of AccountsClient.
func (*ClientFactory) NewBlobContainersClient ¶ added in v1.3.0
func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient
NewBlobContainersClient creates a new instance of BlobContainersClient.
func (*ClientFactory) NewBlobInventoryPoliciesClient ¶ added in v1.3.0
func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient
NewBlobInventoryPoliciesClient creates a new instance of BlobInventoryPoliciesClient.
func (*ClientFactory) NewBlobServicesClient ¶ added in v1.3.0
func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient
NewBlobServicesClient creates a new instance of BlobServicesClient.
func (*ClientFactory) NewDeletedAccountsClient ¶ added in v1.3.0
func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient
NewDeletedAccountsClient creates a new instance of DeletedAccountsClient.
func (*ClientFactory) NewEncryptionScopesClient ¶ added in v1.3.0
func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient
NewEncryptionScopesClient creates a new instance of EncryptionScopesClient.
func (*ClientFactory) NewFileServicesClient ¶ added in v1.3.0
func (c *ClientFactory) NewFileServicesClient() *FileServicesClient
NewFileServicesClient creates a new instance of FileServicesClient.
func (*ClientFactory) NewFileSharesClient ¶ added in v1.3.0
func (c *ClientFactory) NewFileSharesClient() *FileSharesClient
NewFileSharesClient creates a new instance of FileSharesClient.
func (*ClientFactory) NewLocalUsersClient ¶ added in v1.3.0
func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient
NewLocalUsersClient creates a new instance of LocalUsersClient.
func (*ClientFactory) NewManagementPoliciesClient ¶ added in v1.3.0
func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient
NewManagementPoliciesClient creates a new instance of ManagementPoliciesClient.
func (*ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient ¶ added in v1.6.0
func (c *ClientFactory) NewNetworkSecurityPerimeterConfigurationsClient() *NetworkSecurityPerimeterConfigurationsClient
NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient.
func (*ClientFactory) NewObjectReplicationPoliciesClient ¶ added in v1.3.0
func (c *ClientFactory) NewObjectReplicationPoliciesClient() *ObjectReplicationPoliciesClient
NewObjectReplicationPoliciesClient creates a new instance of ObjectReplicationPoliciesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.3.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v1.3.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v1.3.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewQueueClient ¶ added in v1.3.0
func (c *ClientFactory) NewQueueClient() *QueueClient
NewQueueClient creates a new instance of QueueClient.
func (*ClientFactory) NewQueueServicesClient ¶ added in v1.3.0
func (c *ClientFactory) NewQueueServicesClient() *QueueServicesClient
NewQueueServicesClient creates a new instance of QueueServicesClient.
func (*ClientFactory) NewSKUsClient ¶ added in v1.3.0
func (c *ClientFactory) NewSKUsClient() *SKUsClient
NewSKUsClient creates a new instance of SKUsClient.
func (*ClientFactory) NewTableClient ¶ added in v1.3.0
func (c *ClientFactory) NewTableClient() *TableClient
NewTableClient creates a new instance of TableClient.
func (*ClientFactory) NewTableServicesClient ¶ added in v1.3.0
func (c *ClientFactory) NewTableServicesClient() *TableServicesClient
NewTableServicesClient creates a new instance of TableServicesClient.
func (*ClientFactory) NewTaskAssignmentInstancesReportClient ¶ added in v1.6.0
func (c *ClientFactory) NewTaskAssignmentInstancesReportClient() *TaskAssignmentInstancesReportClient
NewTaskAssignmentInstancesReportClient creates a new instance of TaskAssignmentInstancesReportClient.
func (*ClientFactory) NewTaskAssignmentsClient ¶ added in v1.6.0
func (c *ClientFactory) NewTaskAssignmentsClient() *TaskAssignmentsClient
NewTaskAssignmentsClient creates a new instance of TaskAssignmentsClient.
func (*ClientFactory) NewTaskAssignmentsInstancesReportClient ¶ added in v1.6.0
func (c *ClientFactory) NewTaskAssignmentsInstancesReportClient() *TaskAssignmentsInstancesReportClient
NewTaskAssignmentsInstancesReportClient creates a new instance of TaskAssignmentsInstancesReportClient.
func (*ClientFactory) NewUsagesClient ¶ added in v1.3.0
func (c *ClientFactory) NewUsagesClient() *UsagesClient
NewUsagesClient creates a new instance of UsagesClient.
type ContainerProperties ¶
type ContainerProperties struct { // Default the container to use specified encryption scope for all writes. DefaultEncryptionScope *string // Block override of encryption scope from the container default. DenyEncryptionScopeOverride *bool // Enable NFSv3 all squash on blob container. EnableNfsV3AllSquash *bool // Enable NFSv3 root squash on blob container. EnableNfsV3RootSquash *bool // The object level immutability property of the container. The property is immutable and can only be set to true at the container // creation time. Existing containers must undergo a migration process. ImmutableStorageWithVersioning *ImmutableStorageWithVersioning // A name-value pair to associate with the container as metadata. Metadata map[string]*string // Specifies whether data in the container may be accessed publicly and the level of access. PublicAccess *PublicAccess // READ-ONLY; Indicates whether the blob container was deleted. Deleted *bool // READ-ONLY; Blob container deletion time. DeletedTime *time.Time // READ-ONLY; The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this // container. The hasImmutabilityPolicy public property is set to false by SRP if // ImmutabilityPolicy has not been created for this container. HasImmutabilityPolicy *bool // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. HasLegalHold *bool // READ-ONLY; The ImmutabilityPolicy property of the container. ImmutabilityPolicy *ImmutabilityPolicyProperties // READ-ONLY; Returns the date and time the container was last modified. LastModifiedTime *time.Time // READ-ONLY; Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. LeaseDuration *LeaseDuration // READ-ONLY; Lease state of the container. LeaseState *LeaseState // READ-ONLY; The lease status of the container. LeaseStatus *LeaseStatus // READ-ONLY; The LegalHold property of the container. LegalHold *LegalHoldProperties // READ-ONLY; Remaining retention days for soft deleted blob container. RemainingRetentionDays *int32 // READ-ONLY; The version of the deleted blob container. Version *string }
ContainerProperties - The properties of a container.
func (ContainerProperties) MarshalJSON ¶
func (c ContainerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerProperties.
func (*ContainerProperties) UnmarshalJSON ¶
func (c *ContainerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerProperties.
type CorsRule ¶
type CorsRule struct { // REQUIRED; Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. AllowedHeaders []*string // REQUIRED; Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. AllowedMethods []*CorsRuleAllowedMethodsItem // REQUIRED; Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow // all domains AllowedOrigins []*string // REQUIRED; Required if CorsRule element is present. A list of response headers to expose to CORS clients. ExposedHeaders []*string // REQUIRED; Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight // response. MaxAgeInSeconds *int32 }
CorsRule - Specifies a CORS rule for the Blob service.
func (CorsRule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CorsRule.
func (*CorsRule) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type CorsRule.
type CorsRuleAllowedMethodsItem ¶
type CorsRuleAllowedMethodsItem string
const ( CorsRuleAllowedMethodsItemCONNECT CorsRuleAllowedMethodsItem = "CONNECT" CorsRuleAllowedMethodsItemDELETE CorsRuleAllowedMethodsItem = "DELETE" CorsRuleAllowedMethodsItemGET CorsRuleAllowedMethodsItem = "GET" CorsRuleAllowedMethodsItemHEAD CorsRuleAllowedMethodsItem = "HEAD" CorsRuleAllowedMethodsItemMERGE CorsRuleAllowedMethodsItem = "MERGE" CorsRuleAllowedMethodsItemOPTIONS CorsRuleAllowedMethodsItem = "OPTIONS" CorsRuleAllowedMethodsItemPATCH CorsRuleAllowedMethodsItem = "PATCH" CorsRuleAllowedMethodsItemPOST CorsRuleAllowedMethodsItem = "POST" CorsRuleAllowedMethodsItemPUT CorsRuleAllowedMethodsItem = "PUT" CorsRuleAllowedMethodsItemTRACE CorsRuleAllowedMethodsItem = "TRACE" )
func PossibleCorsRuleAllowedMethodsItemValues ¶
func PossibleCorsRuleAllowedMethodsItemValues() []CorsRuleAllowedMethodsItem
PossibleCorsRuleAllowedMethodsItemValues returns the possible values for the CorsRuleAllowedMethodsItem const type.
type CorsRules ¶
type CorsRules struct { // The List of CORS rules. You can include up to five CorsRule elements in the request. CorsRules []*CorsRule }
CorsRules - Sets the CORS rules. You can include up to five CorsRule elements in the request.
func (CorsRules) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CorsRules.
func (*CorsRules) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type CorsRules.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type CustomDomain ¶
type CustomDomain struct { // REQUIRED; Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. Name *string // Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. UseSubDomainName *bool }
CustomDomain - The custom domain assigned to this storage account. This can be set via Update.
func (CustomDomain) MarshalJSON ¶ added in v1.1.0
func (c CustomDomain) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomDomain.
func (*CustomDomain) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomDomain) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain.
type DNSEndpointType ¶ added in v0.5.0
type DNSEndpointType string
DNSEndpointType - Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.
const ( DNSEndpointTypeAzureDNSZone DNSEndpointType = "AzureDnsZone" DNSEndpointTypeStandard DNSEndpointType = "Standard" )
func PossibleDNSEndpointTypeValues ¶ added in v0.5.0
func PossibleDNSEndpointTypeValues() []DNSEndpointType
PossibleDNSEndpointTypeValues returns the possible values for the DNSEndpointType const type.
type DateAfterCreation ¶
type DateAfterCreation struct { // REQUIRED; Value indicating the age in days after creation DaysAfterCreationGreaterThan *float32 // Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions // and requires daysAfterCreationGreaterThan to be set for snapshots and blob // version based actions. The blob will be archived if both the conditions are satisfied. DaysAfterLastTierChangeGreaterThan *float32 }
DateAfterCreation - Object to define snapshot and version action conditions.
func (DateAfterCreation) MarshalJSON ¶ added in v1.1.0
func (d DateAfterCreation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DateAfterCreation.
func (*DateAfterCreation) UnmarshalJSON ¶ added in v1.1.0
func (d *DateAfterCreation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DateAfterCreation.
type DateAfterModification ¶
type DateAfterModification struct { // Value indicating the age in days after blob creation. DaysAfterCreationGreaterThan *float32 // Value indicating the age in days after last blob access. This property can only be used in conjunction with last access // time tracking policy DaysAfterLastAccessTimeGreaterThan *float32 // Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions // and requires daysAfterModificationGreaterThan to be set for baseBlobs // based actions. The blob will be archived if both the conditions are satisfied. DaysAfterLastTierChangeGreaterThan *float32 // Value indicating the age in days after last modification DaysAfterModificationGreaterThan *float32 }
DateAfterModification - Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.
func (DateAfterModification) MarshalJSON ¶ added in v1.1.0
func (d DateAfterModification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DateAfterModification.
func (*DateAfterModification) UnmarshalJSON ¶ added in v1.1.0
func (d *DateAfterModification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DateAfterModification.
type DefaultAction ¶
type DefaultAction string
DefaultAction - Specifies the default action of allow or deny when no other rules match.
const ( DefaultActionAllow DefaultAction = "Allow" DefaultActionDeny DefaultAction = "Deny" )
func PossibleDefaultActionValues ¶
func PossibleDefaultActionValues() []DefaultAction
PossibleDefaultActionValues returns the possible values for the DefaultAction const type.
type DefaultSharePermission ¶
type DefaultSharePermission string
DefaultSharePermission - Default share permission for users using Kerberos authentication if RBAC role is not assigned.
const ()
func PossibleDefaultSharePermissionValues ¶
func PossibleDefaultSharePermissionValues() []DefaultSharePermission
PossibleDefaultSharePermissionValues returns the possible values for the DefaultSharePermission const type.
type DeleteRetentionPolicy ¶
type DeleteRetentionPolicy struct { // This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be // used blob restore policy. This property only applies to blob service and does // not apply to containers or file share. AllowPermanentDelete *bool // Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum // value can be 365. Days *int32 // Indicates whether DeleteRetentionPolicy is enabled. Enabled *bool }
DeleteRetentionPolicy - The service properties for soft delete.
func (DeleteRetentionPolicy) MarshalJSON ¶ added in v1.1.0
func (d DeleteRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeleteRetentionPolicy.
func (*DeleteRetentionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (d *DeleteRetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeleteRetentionPolicy.
type DeletedAccount ¶
type DeletedAccount struct { // Properties of the deleted account. Properties *DeletedAccountProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
DeletedAccount - Deleted storage account
func (DeletedAccount) MarshalJSON ¶
func (d DeletedAccount) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedAccount.
func (*DeletedAccount) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAccount.
type DeletedAccountListResult ¶
type DeletedAccountListResult struct { // READ-ONLY; Request URL that can be used to query next page of deleted accounts. Returned when total number of requested // deleted accounts exceed maximum page size. NextLink *string // READ-ONLY; Gets the list of deleted accounts and their properties. Value []*DeletedAccount }
DeletedAccountListResult - The response from the List Deleted Accounts operation.
func (DeletedAccountListResult) MarshalJSON ¶
func (d DeletedAccountListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedAccountListResult.
func (*DeletedAccountListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedAccountListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAccountListResult.
type DeletedAccountProperties ¶
type DeletedAccountProperties struct { // READ-ONLY; Creation time of the deleted account. CreationTime *string // READ-ONLY; Deletion time of the deleted account. DeletionTime *string // READ-ONLY; Location of the deleted account. Location *string // READ-ONLY; Can be used to attempt recovering this deleted account via PutStorageAccount API. RestoreReference *string // READ-ONLY; Full resource id of the original storage account. StorageAccountResourceID *string }
DeletedAccountProperties - Attributes of a deleted storage account.
func (DeletedAccountProperties) MarshalJSON ¶ added in v1.1.0
func (d DeletedAccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedAccountProperties.
func (*DeletedAccountProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedAccountProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAccountProperties.
type DeletedAccountsClient ¶
type DeletedAccountsClient struct {
// contains filtered or unexported fields
}
DeletedAccountsClient contains the methods for the DeletedAccounts group. Don't use this type directly, use NewDeletedAccountsClient() instead.
func NewDeletedAccountsClient ¶
func NewDeletedAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedAccountsClient, error)
NewDeletedAccountsClient creates a new instance of DeletedAccountsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DeletedAccountsClient) Get ¶
func (client *DeletedAccountsClient) Get(ctx context.Context, deletedAccountName string, location string, options *DeletedAccountsClientGetOptions) (DeletedAccountsClientGetResponse, error)
Get - Get properties of specified deleted account resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- deletedAccountName - Name of the deleted storage account.
- location - The location of the deleted storage account.
- options - DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDeletedAccountsClient().Get(ctx, "sto1125", "eastus", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DeletedAccount = armstorage.DeletedAccount{ // Name: to.Ptr("sto1125"), // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125"), // Properties: &armstorage.DeletedAccountProperties{ // CreationTime: to.Ptr("2020-08-17T03:35:37.4588848Z"), // DeletionTime: to.Ptr("2020-08-17T04:41:37.3442475Z"), // Location: to.Ptr("eastus"), // RestoreReference: to.Ptr("sto1125|2020-08-17T03:35:37.4588848Z"), // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125"), // }, // } }
Output:
func (*DeletedAccountsClient) NewListPager ¶ added in v0.6.0
func (client *DeletedAccountsClient) NewListPager(options *DeletedAccountsClientListOptions) *runtime.Pager[DeletedAccountsClientListResponse]
NewListPager - Lists deleted accounts under the subscription.
Generated from API version 2023-05-01
- options - DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDeletedAccountsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DeletedAccountListResult = armstorage.DeletedAccountListResult{ // Value: []*armstorage.DeletedAccount{ // { // Name: to.Ptr("sto1125"), // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125"), // Properties: &armstorage.DeletedAccountProperties{ // CreationTime: to.Ptr("2020-08-17T03:35:37.4588848Z"), // DeletionTime: to.Ptr("2020-08-17T04:41:37.3442475Z"), // Location: to.Ptr("eastus"), // RestoreReference: to.Ptr("sto1125|2020-08-17T03:35:37.4588848Z"), // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125"), // }, // }, // { // Name: to.Ptr("sto1126"), // Type: to.Ptr("Microsoft.Storage/deletedAccounts"), // ID: to.Ptr("/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126"), // Properties: &armstorage.DeletedAccountProperties{ // CreationTime: to.Ptr("2020-08-19T15:10:21.5902165Z"), // DeletionTime: to.Ptr("2020-08-20T06:11:55.1957302Z"), // Location: to.Ptr("eastus"), // RestoreReference: to.Ptr("sto1126|2020-08-17T03:35:37.4588848Z"), // StorageAccountResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126"), // }, // }}, // } } }
Output:
type DeletedAccountsClientGetOptions ¶ added in v0.3.0
type DeletedAccountsClientGetOptions struct { }
DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method.
type DeletedAccountsClientGetResponse ¶ added in v0.3.0
type DeletedAccountsClientGetResponse struct { // Deleted storage account DeletedAccount }
DeletedAccountsClientGetResponse contains the response from method DeletedAccountsClient.Get.
type DeletedAccountsClientListOptions ¶ added in v0.3.0
type DeletedAccountsClientListOptions struct { }
DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method.
type DeletedAccountsClientListResponse ¶ added in v0.3.0
type DeletedAccountsClientListResponse struct { // The response from the List Deleted Accounts operation. DeletedAccountListResult }
DeletedAccountsClientListResponse contains the response from method DeletedAccountsClient.NewListPager.
type DeletedShare ¶
DeletedShare - The deleted share to be restored.
func (DeletedShare) MarshalJSON ¶ added in v1.1.0
func (d DeletedShare) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedShare.
func (*DeletedShare) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedShare) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedShare.
type Dimension ¶
type Dimension struct { // Display name of dimension. DisplayName *string // Display name of dimension. Name *string }
Dimension of blobs, possibly be blob type or access tier.
func (Dimension) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Dimension.
func (*Dimension) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Dimension.
type DirectoryServiceOptions ¶
type DirectoryServiceOptions string
DirectoryServiceOptions - Indicates the directory service used. Note that this enum may be extended in the future.
const ( DirectoryServiceOptionsAADDS DirectoryServiceOptions = "AADDS" DirectoryServiceOptionsAADKERB DirectoryServiceOptions = "AADKERB" DirectoryServiceOptionsAD DirectoryServiceOptions = "AD" DirectoryServiceOptionsNone DirectoryServiceOptions = "None" )
func PossibleDirectoryServiceOptionsValues ¶
func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions
PossibleDirectoryServiceOptionsValues returns the possible values for the DirectoryServiceOptions const type.
type EnabledProtocols ¶
type EnabledProtocols string
EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share.
const ( EnabledProtocolsNFS EnabledProtocols = "NFS" EnabledProtocolsSMB EnabledProtocols = "SMB" )
func PossibleEnabledProtocolsValues ¶
func PossibleEnabledProtocolsValues() []EnabledProtocols
PossibleEnabledProtocolsValues returns the possible values for the EnabledProtocols const type.
type Encryption ¶
type Encryption struct { // The identity to be used with service-side encryption at rest. EncryptionIdentity *EncryptionIdentity // The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault KeySource *KeySource // Properties provided by key vault. KeyVaultProperties *KeyVaultProperties // A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for // data at rest. RequireInfrastructureEncryption *bool // List of services which support encryption. Services *EncryptionServices }
Encryption - The encryption settings on the storage account.
func (Encryption) MarshalJSON ¶ added in v1.1.0
func (e Encryption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Encryption.
func (*Encryption) UnmarshalJSON ¶ added in v1.1.0
func (e *Encryption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.
type EncryptionIdentity ¶
type EncryptionIdentity struct { // ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys // server-side encryption on the storage account. EncryptionFederatedIdentityClientID *string // Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. EncryptionUserAssignedIdentity *string }
EncryptionIdentity - Encryption identity for the storage account.
func (EncryptionIdentity) MarshalJSON ¶ added in v1.1.0
func (e EncryptionIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionIdentity.
func (*EncryptionIdentity) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionIdentity.
type EncryptionScope ¶
type EncryptionScope struct { // Properties of the encryption scope. EncryptionScopeProperties *EncryptionScopeProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
EncryptionScope - The Encryption Scope resource.
func (EncryptionScope) MarshalJSON ¶
func (e EncryptionScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionScope.
func (*EncryptionScope) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScope.
type EncryptionScopeKeyVaultProperties ¶
type EncryptionScopeKeyVaultProperties struct { // The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the // identifier to enable customer-managed key support on this encryption scope. KeyURI *string // READ-ONLY; The object identifier of the current versioned Key Vault Key in use. CurrentVersionedKeyIdentifier *string // READ-ONLY; Timestamp of last rotation of the Key Vault Key. LastKeyRotationTimestamp *time.Time }
EncryptionScopeKeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
func (EncryptionScopeKeyVaultProperties) MarshalJSON ¶
func (e EncryptionScopeKeyVaultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionScopeKeyVaultProperties.
func (*EncryptionScopeKeyVaultProperties) UnmarshalJSON ¶
func (e *EncryptionScopeKeyVaultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScopeKeyVaultProperties.
type EncryptionScopeListResult ¶
type EncryptionScopeListResult struct { // READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested // encryption scopes exceeds the maximum page size. NextLink *string // READ-ONLY; List of encryption scopes requested. Value []*EncryptionScope }
EncryptionScopeListResult - List of encryption scopes requested, and if paging is required, a URL to the next page of encryption scopes.
func (EncryptionScopeListResult) MarshalJSON ¶
func (e EncryptionScopeListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionScopeListResult.
func (*EncryptionScopeListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionScopeListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScopeListResult.
type EncryptionScopeProperties ¶
type EncryptionScopeProperties struct { // The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set // to 'Microsoft.KeyVault'. KeyVaultProperties *EncryptionScopeKeyVaultProperties // A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for // data at rest. RequireInfrastructureEncryption *bool // The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Source *EncryptionScopeSource // The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. State *EncryptionScopeState // READ-ONLY; Gets the creation date and time of the encryption scope in UTC. CreationTime *time.Time // READ-ONLY; Gets the last modification date and time of the encryption scope in UTC. LastModifiedTime *time.Time }
EncryptionScopeProperties - Properties of the encryption scope.
func (EncryptionScopeProperties) MarshalJSON ¶
func (e EncryptionScopeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionScopeProperties.
func (*EncryptionScopeProperties) UnmarshalJSON ¶
func (e *EncryptionScopeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionScopeProperties.
type EncryptionScopeSource ¶
type EncryptionScopeSource string
EncryptionScopeSource - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.
const ( EncryptionScopeSourceMicrosoftKeyVault EncryptionScopeSource = "Microsoft.KeyVault" EncryptionScopeSourceMicrosoftStorage EncryptionScopeSource = "Microsoft.Storage" )
func PossibleEncryptionScopeSourceValues ¶
func PossibleEncryptionScopeSourceValues() []EncryptionScopeSource
PossibleEncryptionScopeSourceValues returns the possible values for the EncryptionScopeSource const type.
type EncryptionScopeState ¶
type EncryptionScopeState string
EncryptionScopeState - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.
const ( EncryptionScopeStateDisabled EncryptionScopeState = "Disabled" EncryptionScopeStateEnabled EncryptionScopeState = "Enabled" )
func PossibleEncryptionScopeStateValues ¶
func PossibleEncryptionScopeStateValues() []EncryptionScopeState
PossibleEncryptionScopeStateValues returns the possible values for the EncryptionScopeState const type.
type EncryptionScopesClient ¶
type EncryptionScopesClient struct {
// contains filtered or unexported fields
}
EncryptionScopesClient contains the methods for the EncryptionScopes group. Don't use this type directly, use NewEncryptionScopesClient() instead.
func NewEncryptionScopesClient ¶
func NewEncryptionScopesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EncryptionScopesClient, error)
NewEncryptionScopesClient creates a new instance of EncryptionScopesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*EncryptionScopesClient) Get ¶
func (client *EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, options *EncryptionScopesClientGetOptions) (EncryptionScopesClientGetResponse, error)
Get - Returns the properties for the specified encryption scope. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- encryptionScopeName - The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEncryptionScopesClient().Get(ctx, "resource-group-name", "accountname", "{encryption-scope-name}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionScope = armstorage.EncryptionScope{ // Name: to.Ptr("{encyrption-scope-name}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/{encryption-scope-name}"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // } }
Output:
func (*EncryptionScopesClient) NewListPager ¶ added in v0.6.0
func (client *EncryptionScopesClient) NewListPager(resourceGroupName string, accountName string, options *EncryptionScopesClientListOptions) *runtime.Pager[EncryptionScopesClientListResponse]
NewListPager - Lists all the encryption scopes available under the specified storage account.
Generated from API version 2023-05-01
- 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.
- options - EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewEncryptionScopesClient().NewListPager("resource-group-name", "accountname", &armstorage.EncryptionScopesClientListOptions{Maxpagesize: nil, Filter: nil, Include: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.EncryptionScopeListResult = armstorage.EncryptionScopeListResult{ // Value: []*armstorage.EncryptionScope{ // { // Name: to.Ptr("scope-1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/scope-1"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // }, // { // Name: to.Ptr("scope-2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/scope-2"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T04:32:14.335Z"); return t}()), // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), // }, // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.451Z"); return t}()), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // }}, // } } }
Output:
func (*EncryptionScopesClient) Patch ¶
func (client *EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPatchOptions) (EncryptionScopesClientPatchResponse, error)
Patch - Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- encryptionScopeName - The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- encryptionScope - Encryption scope properties to be used for the update.
- options - EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEncryptionScopesClient().Patch(ctx, "resource-group-name", "accountname", "{encryption-scope-name}", armstorage.EncryptionScope{ EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), }, Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionScope = armstorage.EncryptionScope{ // Name: to.Ptr("{encryption-scope-name}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/{encryption-scope-name}"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // KeyVaultProperties: &armstorage.EncryptionScopeKeyVaultProperties{ // CurrentVersionedKeyIdentifier: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), // KeyURI: to.Ptr("https://testvault.vault.core.windows.net/keys/key1/863425f1358359c"), // LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-13T20:36:23.702Z"); return t}()), // }, // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-17T06:23:14.451Z"); return t}()), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftKeyVault), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // } }
Output:
func (*EncryptionScopesClient) Put ¶
func (client *EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope, options *EncryptionScopesClientPutOptions) (EncryptionScopesClientPutResponse, error)
Put - Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- encryptionScopeName - The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- encryptionScope - Encryption scope properties to be used for the create or update.
- options - EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method.
Example (StorageAccountPutEncryptionScope) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEncryptionScopesClient().Put(ctx, "resource-group-name", "accountname", "{encryption-scope-name}", armstorage.EncryptionScope{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionScope = armstorage.EncryptionScope{ // Name: to.Ptr("{encryption-scope-name}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/{encryption-scope-name}"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // } }
Output:
Example (StorageAccountPutEncryptionScopeWithInfrastructureEncryption) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEncryptionScopesClient().Put(ctx, "resource-group-name", "accountname", "{encryption-scope-name}", armstorage.EncryptionScope{ EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ RequireInfrastructureEncryption: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionScope = armstorage.EncryptionScope{ // Name: to.Ptr("{encryption-scope-name}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/encryptionScopes"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/accountname/encryptionScopes/{encryption-scope-name}"), // EncryptionScopeProperties: &armstorage.EncryptionScopeProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-16T02:42:41.763Z"); return t}()), // RequireInfrastructureEncryption: to.Ptr(true), // Source: to.Ptr(armstorage.EncryptionScopeSourceMicrosoftStorage), // State: to.Ptr(armstorage.EncryptionScopeStateEnabled), // }, // } }
Output:
type EncryptionScopesClientGetOptions ¶ added in v0.3.0
type EncryptionScopesClientGetOptions struct { }
EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method.
type EncryptionScopesClientGetResponse ¶ added in v0.3.0
type EncryptionScopesClientGetResponse struct { // The Encryption Scope resource. EncryptionScope }
EncryptionScopesClientGetResponse contains the response from method EncryptionScopesClient.Get.
type EncryptionScopesClientListOptions ¶ added in v0.3.0
type EncryptionScopesClientListOptions struct { // Optional. When specified, only encryption scope names starting with the filter will be listed. Filter *string // Optional, when specified, will list encryption scopes with the specific state. Defaults to All Include *ListEncryptionScopesInclude // Optional, specifies the maximum number of encryption scopes that will be included in the list response. Maxpagesize *int32 }
EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager method.
type EncryptionScopesClientListResponse ¶ added in v0.3.0
type EncryptionScopesClientListResponse struct { // List of encryption scopes requested, and if paging is required, a URL to the next page of encryption scopes. EncryptionScopeListResult }
EncryptionScopesClientListResponse contains the response from method EncryptionScopesClient.NewListPager.
type EncryptionScopesClientPatchOptions ¶ added in v0.3.0
type EncryptionScopesClientPatchOptions struct { }
EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method.
type EncryptionScopesClientPatchResponse ¶ added in v0.3.0
type EncryptionScopesClientPatchResponse struct { // The Encryption Scope resource. EncryptionScope }
EncryptionScopesClientPatchResponse contains the response from method EncryptionScopesClient.Patch.
type EncryptionScopesClientPutOptions ¶ added in v0.3.0
type EncryptionScopesClientPutOptions struct { }
EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method.
type EncryptionScopesClientPutResponse ¶ added in v0.3.0
type EncryptionScopesClientPutResponse struct { // The Encryption Scope resource. EncryptionScope }
EncryptionScopesClientPutResponse contains the response from method EncryptionScopesClient.Put.
type EncryptionService ¶
type EncryptionService struct { // A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default // today and cannot be disabled. Enabled *bool // Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption // key will be used. 'Service' key type implies that a default service key is used. KeyType *KeyType // READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at // rest by default today and cannot be disabled. LastEnabledTime *time.Time }
EncryptionService - A service that allows server-side encryption to be used.
func (EncryptionService) MarshalJSON ¶
func (e EncryptionService) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionService.
func (*EncryptionService) UnmarshalJSON ¶
func (e *EncryptionService) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionService.
type EncryptionServices ¶
type EncryptionServices struct { // The encryption function of the blob storage service. Blob *EncryptionService // The encryption function of the file storage service. File *EncryptionService // The encryption function of the queue storage service. Queue *EncryptionService // The encryption function of the table storage service. Table *EncryptionService }
EncryptionServices - A list of services that support encryption.
func (EncryptionServices) MarshalJSON ¶ added in v1.1.0
func (e EncryptionServices) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionServices.
func (*EncryptionServices) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionServices) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionServices.
type Endpoints ¶
type Endpoints struct { // Gets the internet routing storage endpoints InternetEndpoints *AccountInternetEndpoints // Gets the microsoft routing storage endpoints. MicrosoftEndpoints *AccountMicrosoftEndpoints // READ-ONLY; Gets the blob endpoint. Blob *string // READ-ONLY; Gets the dfs endpoint. Dfs *string // READ-ONLY; Gets the file endpoint. File *string // READ-ONLY; Gets the queue endpoint. Queue *string // READ-ONLY; Gets the table endpoint. Table *string // READ-ONLY; Gets the web endpoint. Web *string }
Endpoints - The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.
func (Endpoints) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Endpoints.
func (*Endpoints) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Endpoints.
type ErrorAdditionalInfo ¶ added in v1.4.0
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v1.4.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.4.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶ added in v1.4.0
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶ added in v1.4.0
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v1.4.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct { // Azure Storage Resource Provider error response body. Error *ErrorResponseBody }
ErrorResponse - An error response from the storage resource provider.
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ErrorResponseAutoGenerated ¶ added in v1.4.0
type ErrorResponseAutoGenerated struct { // The error object. Error *ErrorDetail }
ErrorResponseAutoGenerated - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
func (ErrorResponseAutoGenerated) MarshalJSON ¶ added in v1.4.0
func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated.
func (*ErrorResponseAutoGenerated) UnmarshalJSON ¶ added in v1.4.0
func (e *ErrorResponseAutoGenerated) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseAutoGenerated.
type ErrorResponseBody ¶
type ErrorResponseBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string // A message describing the error, intended to be suitable for display in a user interface. Message *string }
ErrorResponseBody - Error response body contract.
func (ErrorResponseBody) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponseBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody.
func (*ErrorResponseBody) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody.
type ExecutionTarget ¶ added in v1.6.0
type ExecutionTarget struct { // List of object prefixes to be excluded from task execution. If there is a conflict between include and exclude prefixes, // the exclude prefix will be the determining factor ExcludePrefix []*string // Required list of object prefixes to be included for task execution Prefix []*string }
ExecutionTarget - Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task
func (ExecutionTarget) MarshalJSON ¶ added in v1.6.0
func (e ExecutionTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExecutionTarget.
func (*ExecutionTarget) UnmarshalJSON ¶ added in v1.6.0
func (e *ExecutionTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTarget.
type ExecutionTrigger ¶ added in v1.6.0
type ExecutionTrigger struct { // REQUIRED; The trigger parameters of the storage task assignment execution Parameters *TriggerParameters // REQUIRED; The trigger type of the storage task assignment execution Type *TriggerType }
ExecutionTrigger - Execution trigger for storage task assignment
func (ExecutionTrigger) MarshalJSON ¶ added in v1.6.0
func (e ExecutionTrigger) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExecutionTrigger.
func (*ExecutionTrigger) UnmarshalJSON ¶ added in v1.6.0
func (e *ExecutionTrigger) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTrigger.
type ExecutionTriggerUpdate ¶ added in v1.6.0
type ExecutionTriggerUpdate struct { // The trigger parameters of the storage task assignment execution Parameters *TriggerParametersUpdate // The trigger type of the storage task assignment execution Type *TriggerType }
ExecutionTriggerUpdate - Execution trigger update for storage task assignment
func (ExecutionTriggerUpdate) MarshalJSON ¶ added in v1.6.0
func (e ExecutionTriggerUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExecutionTriggerUpdate.
func (*ExecutionTriggerUpdate) UnmarshalJSON ¶ added in v1.6.0
func (e *ExecutionTriggerUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionTriggerUpdate.
type ExpirationAction ¶
type ExpirationAction string
ExpirationAction - The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.
const ( ExpirationActionBlock ExpirationAction = "Block" ExpirationActionLog ExpirationAction = "Log" )
func PossibleExpirationActionValues ¶
func PossibleExpirationActionValues() []ExpirationAction
PossibleExpirationActionValues returns the possible values for the ExpirationAction const type.
type ExtendedLocation ¶
type ExtendedLocation struct { // The name of the extended location. Name *string // The type of the extended location. Type *ExtendedLocationTypes }
ExtendedLocation - The complex type of the extended location.
func (ExtendedLocation) MarshalJSON ¶ added in v1.1.0
func (e ExtendedLocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.
func (*ExtendedLocation) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.
type ExtendedLocationTypes ¶
type ExtendedLocationTypes string
ExtendedLocationTypes - The type of extendedLocation.
const (
ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
)
func PossibleExtendedLocationTypesValues ¶
func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes
PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.
type FileServiceItems ¶
type FileServiceItems struct { // READ-ONLY; List of file services returned. Value []*FileServiceProperties }
func (FileServiceItems) MarshalJSON ¶
func (f FileServiceItems) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileServiceItems.
func (*FileServiceItems) UnmarshalJSON ¶ added in v1.1.0
func (f *FileServiceItems) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceItems.
type FileServiceProperties ¶
type FileServiceProperties struct { // The properties of File services in storage account. FileServiceProperties *FileServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Sku name and tier. SKU *SKU // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
FileServiceProperties - The properties of File services in storage account.
func (FileServiceProperties) MarshalJSON ¶
func (f FileServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileServiceProperties.
func (*FileServiceProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FileServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileServiceProperties.
type FileServicePropertiesProperties ¶
type FileServicePropertiesProperties struct { // Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the File service. Cors *CorsRules // Protocol settings for file service ProtocolSettings *ProtocolSettings ShareDeleteRetentionPolicy *DeleteRetentionPolicy }
FileServicePropertiesProperties - The properties of File services in storage account.
func (FileServicePropertiesProperties) MarshalJSON ¶ added in v1.1.0
func (f FileServicePropertiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileServicePropertiesProperties.
func (*FileServicePropertiesProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FileServicePropertiesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileServicePropertiesProperties.
type FileServicesClient ¶
type FileServicesClient struct {
// contains filtered or unexported fields
}
FileServicesClient contains the methods for the FileServices group. Don't use this type directly, use NewFileServicesClient() instead.
func NewFileServicesClient ¶
func NewFileServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileServicesClient, error)
NewFileServicesClient creates a new instance of FileServicesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FileServicesClient) GetServiceProperties ¶
func (client *FileServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientGetServicePropertiesOptions) (FileServicesClientGetServicePropertiesResponse, error)
GetServiceProperties - Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFileServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FileServiceProperties = armstorage.FileServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
func (*FileServicesClient) List ¶
func (client *FileServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *FileServicesClientListOptions) (FileServicesClientListResponse, error)
List - List all file services in storage accounts If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFileServicesClient().List(ctx, "res9290", "sto1590", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FileServiceItems = armstorage.FileServiceItems{ // Value: []*armstorage.FileServiceProperties{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // }}, // } }
Output:
func (*FileServicesClient) SetServiceProperties ¶
func (client *FileServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties, options *FileServicesClientSetServicePropertiesOptions) (FileServicesClientSetServicePropertiesResponse, error)
SetServiceProperties - Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.
- options - FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties method.
Example (PutFileServices) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ FileServiceProperties: &armstorage.FileServicePropertiesProperties{ Cors: &armstorage.CorsRules{ CorsRules: []*armstorage.CorsRule{ { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.contoso.com"), to.Ptr("http://www.fabrikam.com")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-*")}, MaxAgeInSeconds: to.Ptr[int32](100), }, { AllowedHeaders: []*string{ to.Ptr("*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, AllowedOrigins: []*string{ to.Ptr("*")}, ExposedHeaders: []*string{ to.Ptr("*")}, MaxAgeInSeconds: to.Ptr[int32](2), }, { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-12345675754564*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.abc23.com"), to.Ptr("https://www.fabrikam.com/*")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, MaxAgeInSeconds: to.Ptr[int32](2000), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FileServiceProperties = armstorage.FileServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // } }
Output:
Example (PutFileServicesEnableSecureSmbFeatures) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSecureSmbFeatures.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ FileServiceProperties: &armstorage.FileServicePropertiesProperties{ ProtocolSettings: &armstorage.ProtocolSettings{ Smb: &armstorage.SmbSetting{ AuthenticationMethods: to.Ptr("NTLMv2;Kerberos"), ChannelEncryption: to.Ptr("AES-128-CCM;AES-128-GCM;AES-256-GCM"), KerberosTicketEncryption: to.Ptr("RC4-HMAC;AES-256"), Versions: to.Ptr("SMB2.1;SMB3.0;SMB3.1.1"), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FileServiceProperties = armstorage.FileServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ // ProtocolSettings: &armstorage.ProtocolSettings{ // Smb: &armstorage.SmbSetting{ // AuthenticationMethods: to.Ptr("NTLMv2;Kerberos"), // ChannelEncryption: to.Ptr("AES-128-CCM;AES-128-GCM;AES-256-GCM"), // KerberosTicketEncryption: to.Ptr("RC4-HMAC;AES-256"), // Versions: to.Ptr("SMB2.1;SMB3.0;SMB3.1.1"), // }, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // } }
Output:
Example (PutFileServicesEnableSmbMultichannel) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSMBMultichannel.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFileServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.FileServiceProperties{ FileServiceProperties: &armstorage.FileServicePropertiesProperties{ ProtocolSettings: &armstorage.ProtocolSettings{ Smb: &armstorage.SmbSetting{ Multichannel: &armstorage.Multichannel{ Enabled: to.Ptr(true), }, }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FileServiceProperties = armstorage.FileServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default"), // FileServiceProperties: &armstorage.FileServicePropertiesProperties{ // ProtocolSettings: &armstorage.ProtocolSettings{ // Smb: &armstorage.SmbSetting{ // Multichannel: &armstorage.Multichannel{ // Enabled: to.Ptr(true), // }, // }, // }, // }, // SKU: &armstorage.SKU{ // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // } }
Output:
type FileServicesClientGetServicePropertiesOptions ¶ added in v0.3.0
type FileServicesClientGetServicePropertiesOptions struct { }
FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties method.
type FileServicesClientGetServicePropertiesResponse ¶ added in v0.3.0
type FileServicesClientGetServicePropertiesResponse struct { // The properties of File services in storage account. FileServiceProperties }
FileServicesClientGetServicePropertiesResponse contains the response from method FileServicesClient.GetServiceProperties.
type FileServicesClientListOptions ¶ added in v0.3.0
type FileServicesClientListOptions struct { }
FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method.
type FileServicesClientListResponse ¶ added in v0.3.0
type FileServicesClientListResponse struct {
FileServiceItems
}
FileServicesClientListResponse contains the response from method FileServicesClient.List.
type FileServicesClientSetServicePropertiesOptions ¶ added in v0.3.0
type FileServicesClientSetServicePropertiesOptions struct { }
FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties method.
type FileServicesClientSetServicePropertiesResponse ¶ added in v0.3.0
type FileServicesClientSetServicePropertiesResponse struct { // The properties of File services in storage account. FileServiceProperties }
FileServicesClientSetServicePropertiesResponse contains the response from method FileServicesClient.SetServiceProperties.
type FileShare ¶
type FileShare struct { FileShareProperties Etag *string ID *string Name *string Type *string }FileShareProperties *
FileShare - Properties of the file share, including Id, resource name, resource type, Etag.
func (FileShare) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type FileShare.
func (*FileShare) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type FileShare.
type FileShareItem ¶
type FileShareItem struct { FileShareProperties Etag *string ID *string Name *string Type *string }Properties *
FileShareItem - The file share properties be listed out.
func (FileShareItem) MarshalJSON ¶
func (f FileShareItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileShareItem.
func (*FileShareItem) UnmarshalJSON ¶ added in v1.1.0
func (f *FileShareItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileShareItem.
type FileShareItems ¶
type FileShareItems struct { // maximum page size. NextLink *string Value []*FileShareItem }
FileShareItems - Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares.
func (FileShareItems) MarshalJSON ¶
func (f FileShareItems) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileShareItems.
func (*FileShareItems) UnmarshalJSON ¶ added in v1.1.0
func (f *FileShareItems) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileShareItems.
type FileShareProperties ¶
type FileShareProperties struct { // account can choose Premium. AccessTier *ShareAccessTier EnabledProtocols *EnabledProtocols Metadata map[string]*string RootSquash *RootSquashType // Shares, the maximum size is 102400. ShareQuota *int32 SignedIdentifiers []*SignedIdentifier AccessTierChangeTime *time.Time AccessTierStatus *string Deleted *bool DeletedTime *time.Time LastModifiedTime *time.Time LeaseDuration *LeaseDuration LeaseState *LeaseState LeaseStatus *LeaseStatus RemainingRetentionDays *int32 // or recently resized files. ShareUsageBytes *int64 SnapshotTime *time.Time Version *string }
FileShareProperties - The properties of the file share.
func (FileShareProperties) MarshalJSON ¶
func (f FileShareProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileShareProperties.
func (*FileShareProperties) UnmarshalJSON ¶
func (f *FileShareProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileShareProperties.
type FileSharesClient ¶
type FileSharesClient struct {
// contains filtered or unexported fields
}
FileSharesClient contains the methods for the FileShares group. Don't use this type directly, use NewFileSharesClient() instead.
func NewFileSharesClient ¶
func NewFileSharesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileSharesClient, error)
NewFileSharesClient creates a new instance of FileSharesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FileSharesClient) Create ¶
func (client *FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, options *FileSharesClientCreateOptions) (FileSharesClientCreateResponse, error)
Create - Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- fileShare - Properties of the file share to create.
- options - FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method.
func (*FileSharesClient) Delete ¶
func (client *FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientDeleteOptions) (FileSharesClientDeleteResponse, error)
Delete - Deletes specified share under its account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method.
func (*FileSharesClient) Get ¶
func (client *FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientGetOptions) (FileSharesClientGetResponse, error)
Get - Gets properties of a specified share. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method.
func (*FileSharesClient) Lease ¶
func (client *FileSharesClient) Lease(ctx context.Context, resourceGroupName string, accountName string, shareName string, options *FileSharesClientLeaseOptions) (FileSharesClientLeaseResponse, error)
Lease - The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method.
func (*FileSharesClient) NewListPager ¶ added in v0.6.0
func (client *FileSharesClient) NewListPager(resourceGroupName string, accountName string, options *FileSharesClientListOptions) *runtime.Pager[FileSharesClientListResponse]
NewListPager - Lists all shares.
Generated from API version 2023-05-01
- 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.
- options - FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method.
func (*FileSharesClient) Restore ¶
func (client *FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare, options *FileSharesClientRestoreOptions) (FileSharesClientRestoreResponse, error)
Restore - Restore a file share within a valid retention days if share soft delete is enabled If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options - FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method.
func (*FileSharesClient) Update ¶
func (client *FileSharesClient) Update(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare, options *FileSharesClientUpdateOptions) (FileSharesClientUpdateResponse, error)
Update - Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- shareName - The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- fileShare - Properties to update for the file share.
- options - FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method.
type FileSharesClientCreateOptions ¶ added in v0.3.0
type FileSharesClientCreateOptions struct { // with delimiter ',' Expand *string }
FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method.
type FileSharesClientCreateResponse ¶ added in v0.3.0
type FileSharesClientCreateResponse struct { FileShare }
FileSharesClientCreateResponse contains the response from method FileSharesClient.Create.
type FileSharesClientDeleteOptions ¶ added in v0.3.0
type FileSharesClientDeleteOptions struct { // share is deleted including all of its file share snapshots. If the file share // contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file // share snapshots (leased/unleased). For 'none', the file share is deleted if it // has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. Include *string XMSSnapshot *string }
FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method.
type FileSharesClientDeleteResponse ¶ added in v0.3.0
type FileSharesClientDeleteResponse struct { }
FileSharesClientDeleteResponse contains the response from method FileSharesClient.Delete.
type FileSharesClientGetOptions ¶ added in v0.3.0
type FileSharesClientGetOptions struct { // with delimiter ','. Expand *string XMSSnapshot *string }
FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method.
type FileSharesClientGetResponse ¶ added in v0.3.0
type FileSharesClientGetResponse struct { FileShare }
FileSharesClientGetResponse contains the response from method FileSharesClient.Get.
type FileSharesClientLeaseOptions ¶ added in v0.3.0
type FileSharesClientLeaseOptions struct { LeaseShareRequest XMSSnapshot *string }Parameters *
FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method.
type FileSharesClientLeaseResponse ¶ added in v0.3.0
type FileSharesClientLeaseResponse struct { LeaseShareResponse ETag *string }
FileSharesClientLeaseResponse contains the response from method FileSharesClient.Lease.
type FileSharesClientListOptions ¶ added in v0.3.0
type FileSharesClientListOptions struct { // as a string with delimiter ',' Expand *string Filter *string Maxpagesize *string }
FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method.
type FileSharesClientListResponse ¶ added in v0.3.0
type FileSharesClientListResponse struct { FileShareItems }
FileSharesClientListResponse contains the response from method FileSharesClient.NewListPager.
type FileSharesClientRestoreOptions ¶ added in v0.3.0
type FileSharesClientRestoreOptions struct { }
FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method.
type FileSharesClientRestoreResponse ¶ added in v0.3.0
type FileSharesClientRestoreResponse struct { }
FileSharesClientRestoreResponse contains the response from method FileSharesClient.Restore.
type FileSharesClientUpdateOptions ¶ added in v0.3.0
type FileSharesClientUpdateOptions struct { }
FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method.
type FileSharesClientUpdateResponse ¶ added in v0.3.0
type FileSharesClientUpdateResponse struct { FileShare }
FileSharesClientUpdateResponse contains the response from method FileSharesClient.Update.
type Format ¶
type Format string
Format - This is a required field, it specifies the format for the inventory files.
func PossibleFormatValues ¶
func PossibleFormatValues() []Format
PossibleFormatValues returns the possible values for the Format const type.
type GeoReplicationStats ¶
type GeoReplicationStats struct { // READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. CanFailover *bool // READ-ONLY; A boolean flag which indicates whether or not planned account failover is supported for the account. CanPlannedFailover *bool // READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary // writes following this point in time may or may not be available for reads. Element may // be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. LastSyncTime *time.Time // READ-ONLY; The redundancy type of the account after an account failover is performed. PostFailoverRedundancy *PostFailoverRedundancy // READ-ONLY; The redundancy type of the account after a planned account failover is performed. PostPlannedFailoverRedundancy *PostPlannedFailoverRedundancy // READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is // active and operational. - Bootstrap: Indicates initial synchronization from the primary // location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: // Indicates that the secondary location is temporarily unavailable. Status *GeoReplicationStatus }
GeoReplicationStats - Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when geo-redundant replication is enabled for the storage account.
func (GeoReplicationStats) MarshalJSON ¶
func (g GeoReplicationStats) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GeoReplicationStats.
func (*GeoReplicationStats) UnmarshalJSON ¶
func (g *GeoReplicationStats) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GeoReplicationStats.
type GeoReplicationStatus ¶
type GeoReplicationStatus string
GeoReplicationStatus - The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.
const ( GeoReplicationStatusBootstrap GeoReplicationStatus = "Bootstrap" GeoReplicationStatusLive GeoReplicationStatus = "Live" )
func PossibleGeoReplicationStatusValues ¶
func PossibleGeoReplicationStatusValues() []GeoReplicationStatus
PossibleGeoReplicationStatusValues returns the possible values for the GeoReplicationStatus const type.
type HTTPProtocol ¶
type HTTPProtocol string
HTTPProtocol - The protocol permitted for a request made with the account SAS.
const ( HTTPProtocolHTTPS HTTPProtocol = "https" HTTPProtocolHTTPSHTTP HTTPProtocol = "https,http" )
func PossibleHTTPProtocolValues ¶
func PossibleHTTPProtocolValues() []HTTPProtocol
PossibleHTTPProtocolValues returns the possible values for the HTTPProtocol const type.
type IPRule ¶
type IPRule struct { // REQUIRED; Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. IPAddressOrRange *string // The action of IP ACL rule. Action *string }
IPRule - IP rule with specific IP or IP range in CIDR format.
func (IPRule) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type IPRule.
func (*IPRule) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.
type Identity ¶
type Identity struct { // REQUIRED; The identity type. Type *IdentityType // Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage // account. The key is the ARM resource identifier of the identity. Only 1 // User Assigned identity is permitted here. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The principal ID of resource identity. PrincipalID *string // READ-ONLY; The tenant ID of resource. TenantID *string }
Identity for the resource.
func (Identity) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Identity.
func (*Identity) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Identity.
type IdentityType ¶
type IdentityType string
IdentityType - The identity type.
const ( IdentityTypeNone IdentityType = "None" IdentityTypeSystemAssigned IdentityType = "SystemAssigned" IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned,UserAssigned" IdentityTypeUserAssigned IdentityType = "UserAssigned" )
func PossibleIdentityTypeValues ¶
func PossibleIdentityTypeValues() []IdentityType
PossibleIdentityTypeValues returns the possible values for the IdentityType const type.
type ImmutabilityPolicy ¶
type ImmutabilityPolicy struct { // REQUIRED; The properties of an ImmutabilityPolicy of a blob container. Properties *ImmutabilityPolicyProperty // READ-ONLY; Resource Etag. Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ImmutabilityPolicy - The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
func (ImmutabilityPolicy) MarshalJSON ¶
func (i ImmutabilityPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImmutabilityPolicy.
func (*ImmutabilityPolicy) UnmarshalJSON ¶ added in v1.1.0
func (i *ImmutabilityPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImmutabilityPolicy.
type ImmutabilityPolicyProperties ¶
type ImmutabilityPolicyProperties struct { // The properties of an ImmutabilityPolicy of a blob container. Properties *ImmutabilityPolicyProperty // READ-ONLY; ImmutabilityPolicy Etag. Etag *string // READ-ONLY; The ImmutabilityPolicy update history of the blob container. UpdateHistory []*UpdateHistoryProperty }
ImmutabilityPolicyProperties - The properties of an ImmutabilityPolicy of a blob container.
func (ImmutabilityPolicyProperties) MarshalJSON ¶
func (i ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImmutabilityPolicyProperties.
func (*ImmutabilityPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *ImmutabilityPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImmutabilityPolicyProperties.
type ImmutabilityPolicyProperty ¶
type ImmutabilityPolicyProperty struct { // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // an append blob while maintaining immutability protection and compliance. Only // new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy // API. AllowProtectedAppendWrites *bool // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // both 'Append and Bock Blobs' while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and // 'allowProtectedAppendWritesAll' properties are mutually exclusive. AllowProtectedAppendWritesAll *bool // The immutability period for the blobs in the container since the policy creation, in days. ImmutabilityPeriodSinceCreationInDays *int32 // READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. State *ImmutabilityPolicyState }
ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container.
func (ImmutabilityPolicyProperty) MarshalJSON ¶ added in v1.1.0
func (i ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImmutabilityPolicyProperty.
func (*ImmutabilityPolicyProperty) UnmarshalJSON ¶ added in v1.1.0
func (i *ImmutabilityPolicyProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImmutabilityPolicyProperty.
type ImmutabilityPolicyState ¶
type ImmutabilityPolicyState string
ImmutabilityPolicyState - The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
const ( ImmutabilityPolicyStateLocked ImmutabilityPolicyState = "Locked" ImmutabilityPolicyStateUnlocked ImmutabilityPolicyState = "Unlocked" )
func PossibleImmutabilityPolicyStateValues ¶
func PossibleImmutabilityPolicyStateValues() []ImmutabilityPolicyState
PossibleImmutabilityPolicyStateValues returns the possible values for the ImmutabilityPolicyState const type.
type ImmutabilityPolicyUpdateType ¶
type ImmutabilityPolicyUpdateType string
ImmutabilityPolicyUpdateType - The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.
const ( ImmutabilityPolicyUpdateTypeExtend ImmutabilityPolicyUpdateType = "extend" ImmutabilityPolicyUpdateTypeLock ImmutabilityPolicyUpdateType = "lock" ImmutabilityPolicyUpdateTypePut ImmutabilityPolicyUpdateType = "put" )
func PossibleImmutabilityPolicyUpdateTypeValues ¶
func PossibleImmutabilityPolicyUpdateTypeValues() []ImmutabilityPolicyUpdateType
PossibleImmutabilityPolicyUpdateTypeValues returns the possible values for the ImmutabilityPolicyUpdateType const type.
type ImmutableStorageAccount ¶
type ImmutableStorageAccount struct { // A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability // enabled by default. Enabled *bool // Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an // explicit immutability policy at the object level. The object-level immutability // policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level // immutability policy. ImmutabilityPolicy *AccountImmutabilityPolicyProperties }
ImmutableStorageAccount - This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.
func (ImmutableStorageAccount) MarshalJSON ¶ added in v1.1.0
func (i ImmutableStorageAccount) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImmutableStorageAccount.
func (*ImmutableStorageAccount) UnmarshalJSON ¶ added in v1.1.0
func (i *ImmutableStorageAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImmutableStorageAccount.
type ImmutableStorageWithVersioning ¶
type ImmutableStorageWithVersioning struct { // This is an immutable property, when set to true it enables object level immutability at the container level. Enabled *bool // READ-ONLY; This property denotes the container level immutability to object level immutability migration state. MigrationState *MigrationState // READ-ONLY; Returns the date and time the object level immutability was enabled. TimeStamp *time.Time }
ImmutableStorageWithVersioning - Object level immutability properties of the container.
func (ImmutableStorageWithVersioning) MarshalJSON ¶
func (i ImmutableStorageWithVersioning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImmutableStorageWithVersioning.
func (*ImmutableStorageWithVersioning) UnmarshalJSON ¶
func (i *ImmutableStorageWithVersioning) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImmutableStorageWithVersioning.
type InventoryRuleType ¶
type InventoryRuleType string
InventoryRuleType - The valid value is Inventory
const (
InventoryRuleTypeInventory InventoryRuleType = "Inventory"
)
func PossibleInventoryRuleTypeValues ¶
func PossibleInventoryRuleTypeValues() []InventoryRuleType
PossibleInventoryRuleTypeValues returns the possible values for the InventoryRuleType const type.
type IssueType ¶ added in v1.6.0
type IssueType string
IssueType - Type of issue
func PossibleIssueTypeValues ¶ added in v1.6.0
func PossibleIssueTypeValues() []IssueType
PossibleIssueTypeValues returns the possible values for the IssueType const type.
type KeyCreationTime ¶
KeyCreationTime - Storage account keys creation time.
func (KeyCreationTime) MarshalJSON ¶
func (k KeyCreationTime) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyCreationTime.
func (*KeyCreationTime) UnmarshalJSON ¶
func (k *KeyCreationTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyCreationTime.
type KeyPermission ¶
type KeyPermission string
KeyPermission - Permissions for the key -- read-only or full permissions.
const ( KeyPermissionFull KeyPermission = "Full" KeyPermissionRead KeyPermission = "Read" )
func PossibleKeyPermissionValues ¶
func PossibleKeyPermissionValues() []KeyPermission
PossibleKeyPermissionValues returns the possible values for the KeyPermission const type.
type KeyPolicy ¶
type KeyPolicy struct { // REQUIRED; The key expiration period in days. KeyExpirationPeriodInDays *int32 }
KeyPolicy assigned to the storage account.
func (KeyPolicy) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type KeyPolicy.
func (*KeyPolicy) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type KeyPolicy.
type KeySource ¶
type KeySource string
KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault
func PossibleKeySourceValues ¶
func PossibleKeySourceValues() []KeySource
PossibleKeySourceValues returns the possible values for the KeySource const type.
type KeyType ¶
type KeyType string
KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.
func PossibleKeyTypeValues ¶
func PossibleKeyTypeValues() []KeyType
PossibleKeyTypeValues returns the possible values for the KeyType const type.
type KeyVaultProperties ¶
type KeyVaultProperties struct { // The name of KeyVault key. KeyName *string // The Uri of KeyVault. KeyVaultURI *string // The version of KeyVault key. KeyVersion *string // READ-ONLY; This is a read only property that represents the expiration time of the current version of the customer managed // key used for encryption. CurrentVersionedKeyExpirationTimestamp *time.Time // READ-ONLY; The object identifier of the current versioned Key Vault Key in use. CurrentVersionedKeyIdentifier *string // READ-ONLY; Timestamp of last rotation of the Key Vault Key. LastKeyRotationTimestamp *time.Time }
KeyVaultProperties - Properties of key vault.
func (KeyVaultProperties) MarshalJSON ¶
func (k KeyVaultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.
func (*KeyVaultProperties) UnmarshalJSON ¶
func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.
type Kind ¶
type Kind string
Kind - Indicates the type of storage account.
func PossibleKindValues ¶
func PossibleKindValues() []Kind
PossibleKindValues returns the possible values for the Kind const type.
type LargeFileSharesState ¶
type LargeFileSharesState string
LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.
const ()
func PossibleLargeFileSharesStateValues ¶
func PossibleLargeFileSharesStateValues() []LargeFileSharesState
PossibleLargeFileSharesStateValues returns the possible values for the LargeFileSharesState const type.
type LastAccessTimeTrackingPolicy ¶
type LastAccessTimeTrackingPolicy struct { // REQUIRED; When set to true last access time based tracking is enabled. Enable *bool // An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only BlobType []*string // Name of the policy. The valid value is AccessTimeTracking. This field is currently read only Name *Name // The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This // field is currently read only with value as 1 TrackingGranularityInDays *int32 }
LastAccessTimeTrackingPolicy - The blob service properties for Last access time based tracking policy.
func (LastAccessTimeTrackingPolicy) MarshalJSON ¶
func (l LastAccessTimeTrackingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LastAccessTimeTrackingPolicy.
func (*LastAccessTimeTrackingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (l *LastAccessTimeTrackingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LastAccessTimeTrackingPolicy.
type LeaseContainerRequest ¶
type LeaseContainerRequest struct { // REQUIRED; Specifies the lease action. Can be one of the available actions. Action *LeaseContainerRequestAction // Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and // 60. BreakPeriod *int32 // Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. LeaseDuration *int32 // Identifies the lease. Can be specified in any valid GUID string format. LeaseID *string // Optional for acquire, required for change. Proposed lease ID, in a GUID string format. ProposedLeaseID *string }
LeaseContainerRequest - Lease Container request schema.
func (LeaseContainerRequest) MarshalJSON ¶ added in v1.1.0
func (l LeaseContainerRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LeaseContainerRequest.
func (*LeaseContainerRequest) UnmarshalJSON ¶ added in v1.1.0
func (l *LeaseContainerRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LeaseContainerRequest.
type LeaseContainerRequestAction ¶
type LeaseContainerRequestAction string
LeaseContainerRequestAction - Specifies the lease action. Can be one of the available actions.
const ( LeaseContainerRequestActionAcquire LeaseContainerRequestAction = "Acquire" LeaseContainerRequestActionBreak LeaseContainerRequestAction = "Break" LeaseContainerRequestActionChange LeaseContainerRequestAction = "Change" LeaseContainerRequestActionRelease LeaseContainerRequestAction = "Release" LeaseContainerRequestActionRenew LeaseContainerRequestAction = "Renew" )
func PossibleLeaseContainerRequestActionValues ¶
func PossibleLeaseContainerRequestActionValues() []LeaseContainerRequestAction
PossibleLeaseContainerRequestActionValues returns the possible values for the LeaseContainerRequestAction const type.
type LeaseContainerResponse ¶
type LeaseContainerResponse struct { // Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release // the lease. LeaseID *string // Approximate time remaining in the lease period, in seconds. LeaseTimeSeconds *string }
LeaseContainerResponse - Lease Container response schema.
func (LeaseContainerResponse) MarshalJSON ¶ added in v1.1.0
func (l LeaseContainerResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LeaseContainerResponse.
func (*LeaseContainerResponse) UnmarshalJSON ¶ added in v1.1.0
func (l *LeaseContainerResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LeaseContainerResponse.
type LeaseDuration ¶
type LeaseDuration string
LeaseDuration - Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
const ( LeaseDurationFixed LeaseDuration = "Fixed" LeaseDurationInfinite LeaseDuration = "Infinite" )
func PossibleLeaseDurationValues ¶
func PossibleLeaseDurationValues() []LeaseDuration
PossibleLeaseDurationValues returns the possible values for the LeaseDuration const type.
type LeaseShareAction ¶
type LeaseShareAction string
LeaseShareAction - Specifies the lease action. Can be one of the available actions.
const ()
func PossibleLeaseShareActionValues ¶
func PossibleLeaseShareActionValues() []LeaseShareAction
PossibleLeaseShareActionValues returns the possible values for the LeaseShareAction const type.
type LeaseShareRequest ¶
type LeaseShareRequest struct { LeaseShareAction // 60. BreakPeriod *int32 LeaseDuration *int32 LeaseID *string ProposedLeaseID *string }Action *
LeaseShareRequest - Lease Share request schema.
func (LeaseShareRequest) MarshalJSON ¶ added in v1.1.0
func (l LeaseShareRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LeaseShareRequest.
func (*LeaseShareRequest) UnmarshalJSON ¶ added in v1.1.0
func (l *LeaseShareRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LeaseShareRequest.
type LeaseShareResponse ¶
LeaseShareResponse - Lease Share response schema.
func (LeaseShareResponse) MarshalJSON ¶ added in v1.1.0
func (l LeaseShareResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LeaseShareResponse.
func (*LeaseShareResponse) UnmarshalJSON ¶ added in v1.1.0
func (l *LeaseShareResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LeaseShareResponse.
type LeaseState ¶
type LeaseState string
LeaseState - Lease state of the container.
const ( LeaseStateAvailable LeaseState = "Available" LeaseStateBreaking LeaseState = "Breaking" LeaseStateBroken LeaseState = "Broken" LeaseStateExpired LeaseState = "Expired" LeaseStateLeased LeaseState = "Leased" )
func PossibleLeaseStateValues ¶
func PossibleLeaseStateValues() []LeaseState
PossibleLeaseStateValues returns the possible values for the LeaseState const type.
type LeaseStatus ¶
type LeaseStatus string
LeaseStatus - The lease status of the container.
const ( LeaseStatusLocked LeaseStatus = "Locked" LeaseStatusUnlocked LeaseStatus = "Unlocked" )
func PossibleLeaseStatusValues ¶
func PossibleLeaseStatusValues() []LeaseStatus
PossibleLeaseStatusValues returns the possible values for the LeaseStatus const type.
type LegalHold ¶
type LegalHold struct { // REQUIRED; Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. Tags []*string // When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. // Only new blocks can be added and any existing blocks cannot be modified // or deleted. AllowProtectedAppendWritesAll *bool // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. HasLegalHold *bool }
LegalHold - The LegalHold property of a blob container.
func (LegalHold) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LegalHold.
func (*LegalHold) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type LegalHold.
type LegalHoldProperties ¶
type LegalHoldProperties struct { // Protected append blob writes history. ProtectedAppendWritesHistory *ProtectedAppendWritesHistory // The list of LegalHold tags of a blob container. Tags []*TagProperty // READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold // public property is set to false by SRP if all existing legal hold tags are cleared out. // There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. HasLegalHold *bool }
LegalHoldProperties - The LegalHold property of a blob container.
func (LegalHoldProperties) MarshalJSON ¶
func (l LegalHoldProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LegalHoldProperties.
func (*LegalHoldProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *LegalHoldProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LegalHoldProperties.
type ListAccountSasResponse ¶
type ListAccountSasResponse struct { // READ-ONLY; List SAS credentials of storage account. AccountSasToken *string }
ListAccountSasResponse - The List SAS credentials operation response.
func (ListAccountSasResponse) MarshalJSON ¶ added in v1.1.0
func (l ListAccountSasResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListAccountSasResponse.
func (*ListAccountSasResponse) UnmarshalJSON ¶ added in v1.1.0
func (l *ListAccountSasResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListAccountSasResponse.
type ListBlobInventoryPolicy ¶
type ListBlobInventoryPolicy struct { // READ-ONLY; List of blob inventory policies. Value []*BlobInventoryPolicy }
ListBlobInventoryPolicy - List of blob inventory policies returned.
func (ListBlobInventoryPolicy) MarshalJSON ¶
func (l ListBlobInventoryPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListBlobInventoryPolicy.
func (*ListBlobInventoryPolicy) UnmarshalJSON ¶ added in v1.1.0
func (l *ListBlobInventoryPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListBlobInventoryPolicy.
type ListContainerItem ¶
type ListContainerItem struct { // The blob container properties be listed out. Properties *ContainerProperties // READ-ONLY; Resource Etag. Etag *string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ListContainerItem - The blob container properties be listed out.
func (ListContainerItem) MarshalJSON ¶
func (l ListContainerItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListContainerItem.
func (*ListContainerItem) UnmarshalJSON ¶ added in v1.1.0
func (l *ListContainerItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListContainerItem.
type ListContainerItems ¶
type ListContainerItems struct { // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers // exceed maximum page size. NextLink *string // READ-ONLY; List of blobs containers returned. Value []*ListContainerItem }
ListContainerItems - Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers.
func (ListContainerItems) MarshalJSON ¶
func (l ListContainerItems) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListContainerItems.
func (*ListContainerItems) UnmarshalJSON ¶ added in v1.1.0
func (l *ListContainerItems) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListContainerItems.
type ListContainersInclude ¶
type ListContainersInclude string
const (
ListContainersIncludeDeleted ListContainersInclude = "deleted"
)
func PossibleListContainersIncludeValues ¶
func PossibleListContainersIncludeValues() []ListContainersInclude
PossibleListContainersIncludeValues returns the possible values for the ListContainersInclude const type.
type ListEncryptionScopesInclude ¶ added in v1.2.0
type ListEncryptionScopesInclude string
const ( ListEncryptionScopesIncludeAll ListEncryptionScopesInclude = "All" ListEncryptionScopesIncludeDisabled ListEncryptionScopesInclude = "Disabled" ListEncryptionScopesIncludeEnabled ListEncryptionScopesInclude = "Enabled" )
func PossibleListEncryptionScopesIncludeValues ¶ added in v1.2.0
func PossibleListEncryptionScopesIncludeValues() []ListEncryptionScopesInclude
PossibleListEncryptionScopesIncludeValues returns the possible values for the ListEncryptionScopesInclude const type.
type ListLocalUserIncludeParam ¶ added in v1.6.0
type ListLocalUserIncludeParam string
const (
ListLocalUserIncludeParamNfsv3 ListLocalUserIncludeParam = "nfsv3"
)
func PossibleListLocalUserIncludeParamValues ¶ added in v1.6.0
func PossibleListLocalUserIncludeParamValues() []ListLocalUserIncludeParam
PossibleListLocalUserIncludeParamValues returns the possible values for the ListLocalUserIncludeParam const type.
type ListQueue ¶
type ListQueue struct { // List Queue resource properties. QueueProperties *ListQueueProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
func (ListQueue) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type ListQueue.
func (*ListQueue) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type ListQueue.
type ListQueueProperties ¶
type ListQueueProperties struct { // A name-value pair that represents queue metadata. Metadata map[string]*string }
func (ListQueueProperties) MarshalJSON ¶
func (l ListQueueProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListQueueProperties.
func (*ListQueueProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *ListQueueProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListQueueProperties.
type ListQueueResource ¶
type ListQueueResource struct { // READ-ONLY; Request URL that can be used to list next page of queues NextLink *string // READ-ONLY; List of queues returned. Value []*ListQueue }
ListQueueResource - Response schema. Contains list of queues returned
func (ListQueueResource) MarshalJSON ¶
func (l ListQueueResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListQueueResource.
func (*ListQueueResource) UnmarshalJSON ¶ added in v1.1.0
func (l *ListQueueResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListQueueResource.
type ListQueueServices ¶
type ListQueueServices struct { // READ-ONLY; List of queue services returned. Value []*QueueServiceProperties }
func (ListQueueServices) MarshalJSON ¶
func (l ListQueueServices) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListQueueServices.
func (*ListQueueServices) UnmarshalJSON ¶ added in v1.1.0
func (l *ListQueueServices) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListQueueServices.
type ListServiceSasResponse ¶
type ListServiceSasResponse struct { // READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string }
ListServiceSasResponse - The List service SAS credentials operation response.
func (ListServiceSasResponse) MarshalJSON ¶ added in v1.1.0
func (l ListServiceSasResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListServiceSasResponse.
func (*ListServiceSasResponse) UnmarshalJSON ¶ added in v1.1.0
func (l *ListServiceSasResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListServiceSasResponse.
type ListTableResource ¶
type ListTableResource struct { // READ-ONLY; Request URL that can be used to query next page of tables NextLink *string // READ-ONLY; List of tables returned. Value []*Table }
ListTableResource - Response schema. Contains list of tables returned
func (ListTableResource) MarshalJSON ¶
func (l ListTableResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListTableResource.
func (*ListTableResource) UnmarshalJSON ¶ added in v1.1.0
func (l *ListTableResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListTableResource.
type ListTableServices ¶
type ListTableServices struct { // READ-ONLY; List of table services returned. Value []*TableServiceProperties }
func (ListTableServices) MarshalJSON ¶
func (l ListTableServices) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListTableServices.
func (*ListTableServices) UnmarshalJSON ¶ added in v1.1.0
func (l *ListTableServices) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListTableServices.
type LocalUser ¶ added in v0.3.0
type LocalUser struct { // Storage account local user properties. Properties *LocalUserProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
LocalUser - The local user associated with the storage accounts.
func (LocalUser) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type LocalUser.
func (*LocalUser) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type LocalUser.
type LocalUserKeys ¶ added in v0.3.0
type LocalUserKeys struct { // Optional, local user ssh authorized keys for SFTP. SSHAuthorizedKeys []*SSHPublicKey SharedKey *string }
LocalUserKeys - The Storage Account Local User keys.
func (LocalUserKeys) MarshalJSON ¶ added in v0.3.0
func (l LocalUserKeys) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalUserKeys.
func (*LocalUserKeys) UnmarshalJSON ¶ added in v1.1.0
func (l *LocalUserKeys) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalUserKeys.
type LocalUserProperties ¶ added in v0.3.0
type LocalUserProperties struct { // Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. AllowACLAuthorization *bool // Supplementary group membership. Only applicable for local users enabled for NFSv3 access. ExtendedGroups []*int32 // An identifier for associating a group of users. GroupID *int32 // Indicates whether ssh key exists. Set it to false to remove existing SSH key. HasSSHKey *bool // Indicates whether ssh password exists. Set it to false to remove existing SSH password. HasSSHPassword *bool HasSharedKey *bool // Optional, local user home directory. HomeDirectory *string // Indicates if the local user is enabled for access with NFSv3 protocol. IsNFSv3Enabled *bool // The permission scopes of the local user. PermissionScopes []*PermissionScope // Optional, local user ssh authorized keys for SFTP. SSHAuthorizedKeys []*SSHPublicKey // READ-ONLY; A unique Security Identifier that is generated by the server. Sid *string // READ-ONLY; A unique Identifier that is generated by the server. UserID *int32 }
LocalUserProperties - The Storage Account Local User properties.
func (LocalUserProperties) MarshalJSON ¶ added in v0.3.0
func (l LocalUserProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalUserProperties.
func (*LocalUserProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *LocalUserProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalUserProperties.
type LocalUserRegeneratePasswordResult ¶ added in v0.3.0
type LocalUserRegeneratePasswordResult struct { // READ-ONLY; Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation // of local user. SSHPassword *string }
LocalUserRegeneratePasswordResult - The secrets of Storage Account Local User.
func (LocalUserRegeneratePasswordResult) MarshalJSON ¶ added in v1.1.0
func (l LocalUserRegeneratePasswordResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalUserRegeneratePasswordResult.
func (*LocalUserRegeneratePasswordResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LocalUserRegeneratePasswordResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalUserRegeneratePasswordResult.
type LocalUsers ¶ added in v0.3.0
type LocalUsers struct { // The list of local users associated with the storage account. Value []*LocalUser // READ-ONLY; Request URL that can be used to query next page of local users. Returned when total number of requested local // users exceeds the maximum page size. NextLink *string }
LocalUsers - List of local users requested, and if paging is required, a URL to the next page of local users.
func (LocalUsers) MarshalJSON ¶ added in v0.3.0
func (l LocalUsers) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalUsers.
func (*LocalUsers) UnmarshalJSON ¶ added in v1.1.0
func (l *LocalUsers) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalUsers.
type LocalUsersClient ¶ added in v0.3.0
type LocalUsersClient struct {
// contains filtered or unexported fields
}
LocalUsersClient contains the methods for the LocalUsers group. Don't use this type directly, use NewLocalUsersClient() instead.
func NewLocalUsersClient ¶ added in v0.3.0
func NewLocalUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalUsersClient, error)
NewLocalUsersClient creates a new instance of LocalUsersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocalUsersClient) CreateOrUpdate ¶ added in v0.3.0
func (client *LocalUsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, username string, properties LocalUser, options *LocalUsersClientCreateOrUpdateOptions) (LocalUsersClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- username - The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
- properties - The local user associated with a storage account.
- options - LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method.
Example (CreateLocalUser) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ Properties: &armstorage.LocalUserProperties{ AllowACLAuthorization: to.Ptr(true), GroupID: to.Ptr[int32](2000), HasSSHPassword: to.Ptr(true), HomeDirectory: to.Ptr("homedirectory"), PermissionScopes: []*armstorage.PermissionScope{ { Permissions: to.Ptr("rwd"), ResourceName: to.Ptr("share1"), Service: to.Ptr("file"), }, { Permissions: to.Ptr("rw"), ResourceName: to.Ptr("share2"), Service: to.Ptr("file"), }}, SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ { Description: to.Ptr("key name"), Key: to.Ptr("ssh-rsa keykeykeykeykey="), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUser = armstorage.LocalUser{ // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // GroupID: to.Ptr[int32](2000), // HomeDirectory: to.Ptr("homedirectory"), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rwd"), // ResourceName: to.Ptr("share1"), // Service: to.Ptr("file"), // }, // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("share2"), // Service: to.Ptr("file"), // }}, // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ // { // Description: to.Ptr("key name"), // Key: to.Ptr("ssh-rsa keykeykeykeykey="), // }}, // UserID: to.Ptr[int32](1000), // }, // } }
Output:
Example (CreateNfSv3EnabledLocalUser) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreateNFSv3Enabled.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ Properties: &armstorage.LocalUserProperties{ ExtendedGroups: []*int32{ to.Ptr[int32](1001), to.Ptr[int32](1005), to.Ptr[int32](2005)}, IsNFSv3Enabled: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUser = armstorage.LocalUser{ // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // ExtendedGroups: []*int32{ // to.Ptr[int32](1001), // to.Ptr[int32](1005), // to.Ptr[int32](2005)}, // GroupID: to.Ptr[int32](2000), // HomeDirectory: to.Ptr("homedirectory"), // IsNFSv3Enabled: to.Ptr(true), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rwd"), // ResourceName: to.Ptr("share1"), // Service: to.Ptr("file"), // }, // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("share2"), // Service: to.Ptr("file"), // }}, // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ // { // Description: to.Ptr("key name"), // Key: to.Ptr("ssh-rsa keykeykeykeykey="), // }}, // UserID: to.Ptr[int32](1000), // }, // } }
Output:
Example (UpdateLocalUser) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().CreateOrUpdate(ctx, "res6977", "sto2527", "user1", armstorage.LocalUser{ Properties: &armstorage.LocalUserProperties{ AllowACLAuthorization: to.Ptr(false), ExtendedGroups: []*int32{ to.Ptr[int32](1001), to.Ptr[int32](1005), to.Ptr[int32](2005)}, GroupID: to.Ptr[int32](3000), HasSharedKey: to.Ptr(false), HasSSHKey: to.Ptr(false), HasSSHPassword: to.Ptr(false), HomeDirectory: to.Ptr("homedirectory2"), IsNFSv3Enabled: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUser = armstorage.LocalUser{ // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(false), // ExtendedGroups: []*int32{ // to.Ptr[int32](1001), // to.Ptr[int32](1005), // to.Ptr[int32](2005)}, // GroupID: to.Ptr[int32](3000), // HasSharedKey: to.Ptr(false), // HasSSHKey: to.Ptr(false), // HasSSHPassword: to.Ptr(false), // HomeDirectory: to.Ptr("homedirectory2"), // IsNFSv3Enabled: to.Ptr(true), // Sid: to.Ptr("S-1-2-0-3528686663-1788730862-2791910117-1000"), // UserID: to.Ptr[int32](1000), // }, // } }
Output:
func (*LocalUsersClient) Delete ¶ added in v0.3.0
func (client *LocalUsersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientDeleteOptions) (LocalUsersClientDeleteResponse, error)
Delete - Deletes the local user associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- username - The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
- options - LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewLocalUsersClient().Delete(ctx, "res6977", "sto2527", "user1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*LocalUsersClient) Get ¶ added in v0.3.0
func (client *LocalUsersClient) Get(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientGetOptions) (LocalUsersClientGetResponse, error)
Get - Get the local user of the storage account by username. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- username - The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
- options - LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().Get(ctx, "res6977", "sto2527", "user1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUser = armstorage.LocalUser{ // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // ExtendedGroups: []*int32{ // to.Ptr[int32](1001), // to.Ptr[int32](1005), // to.Ptr[int32](2005)}, // GroupID: to.Ptr[int32](2000), // HasSharedKey: to.Ptr(true), // HasSSHKey: to.Ptr(true), // HasSSHPassword: to.Ptr(true), // HomeDirectory: to.Ptr("homedirectory"), // IsNFSv3Enabled: to.Ptr(true), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rwd"), // ResourceName: to.Ptr("share1"), // Service: to.Ptr("file"), // }, // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("share2"), // Service: to.Ptr("file"), // }}, // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), // UserID: to.Ptr[int32](1000), // }, // } }
Output:
func (*LocalUsersClient) ListKeys ¶ added in v0.3.0
func (client *LocalUsersClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientListKeysOptions) (LocalUsersClientListKeysResponse, error)
ListKeys - List SSH authorized keys and shared key of the local user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- username - The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
- options - LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().ListKeys(ctx, "res6977", "sto2527", "user1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUserKeys = armstorage.LocalUserKeys{ // SharedKey: to.Ptr("<REDACTED>"), // SSHAuthorizedKeys: []*armstorage.SSHPublicKey{ // { // Description: to.Ptr("key name"), // Key: to.Ptr("ssh-rsa keykeykeykeykew="), // }}, // } }
Output:
func (*LocalUsersClient) NewListPager ¶ added in v0.6.0
func (client *LocalUsersClient) NewListPager(resourceGroupName string, accountName string, options *LocalUsersClientListOptions) *runtime.Pager[LocalUsersClientListResponse]
NewListPager - List the local users associated with the storage account.
Generated from API version 2023-05-01
- 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.
- options - LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method.
Example (ListLocalUsers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLocalUsersClient().NewListPager("res6977", "sto2527", &armstorage.LocalUsersClientListOptions{Maxpagesize: nil, Filter: nil, Include: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LocalUsers = armstorage.LocalUsers{ // Value: []*armstorage.LocalUser{ // { // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // GroupID: to.Ptr[int32](2000), // HasSharedKey: to.Ptr(true), // HasSSHKey: to.Ptr(true), // HasSSHPassword: to.Ptr(true), // HomeDirectory: to.Ptr("homedirectory"), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rwd"), // ResourceName: to.Ptr("share1"), // Service: to.Ptr("file"), // }, // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("share2"), // Service: to.Ptr("file"), // }}, // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), // UserID: to.Ptr[int32](1000), // }, // }, // { // Name: to.Ptr("user2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // GroupID: to.Ptr[int32](2000), // HasSharedKey: to.Ptr(true), // HasSSHKey: to.Ptr(false), // HasSSHPassword: to.Ptr(true), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("resourcename"), // Service: to.Ptr("blob"), // }}, // Sid: to.Ptr("S-1-2-0-533672-235636-66334-1001"), // UserID: to.Ptr[int32](1001), // }, // }}, // } } }
Output:
Example (ListNfSv3EnabledLocalUsers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersListNFSv3Enabled.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLocalUsersClient().NewListPager("res6977", "sto2527", &armstorage.LocalUsersClientListOptions{Maxpagesize: nil, Filter: nil, Include: to.Ptr(armstorage.ListLocalUserIncludeParamNfsv3), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LocalUsers = armstorage.LocalUsers{ // Value: []*armstorage.LocalUser{ // { // Name: to.Ptr("user1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // ExtendedGroups: []*int32{ // to.Ptr[int32](1001), // to.Ptr[int32](1005), // to.Ptr[int32](2005)}, // GroupID: to.Ptr[int32](2000), // HasSharedKey: to.Ptr(true), // HasSSHKey: to.Ptr(true), // HasSSHPassword: to.Ptr(true), // HomeDirectory: to.Ptr("homedirectory"), // IsNFSv3Enabled: to.Ptr(true), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rwd"), // ResourceName: to.Ptr("share1"), // Service: to.Ptr("file"), // }, // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("share2"), // Service: to.Ptr("file"), // }}, // Sid: to.Ptr("S-1-2-0-125132-153423-36235-1000"), // UserID: to.Ptr[int32](1000), // }, // }, // { // Name: to.Ptr("user2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/localUsers"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2"), // Properties: &armstorage.LocalUserProperties{ // AllowACLAuthorization: to.Ptr(true), // ExtendedGroups: []*int32{ // to.Ptr[int32](1001), // to.Ptr[int32](1005), // to.Ptr[int32](2005)}, // GroupID: to.Ptr[int32](2000), // HasSharedKey: to.Ptr(true), // HasSSHKey: to.Ptr(false), // HasSSHPassword: to.Ptr(true), // IsNFSv3Enabled: to.Ptr(true), // PermissionScopes: []*armstorage.PermissionScope{ // { // Permissions: to.Ptr("rw"), // ResourceName: to.Ptr("resourcename"), // Service: to.Ptr("blob"), // }}, // Sid: to.Ptr("S-1-2-0-533672-235636-66334-1001"), // UserID: to.Ptr[int32](1001), // }, // }}, // } } }
Output:
func (*LocalUsersClient) RegeneratePassword ¶ added in v0.3.0
func (client *LocalUsersClient) RegeneratePassword(ctx context.Context, resourceGroupName string, accountName string, username string, options *LocalUsersClientRegeneratePasswordOptions) (LocalUsersClientRegeneratePasswordResponse, error)
RegeneratePassword - Regenerate the local user SSH password. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- username - The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
- options - LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocalUsersClient().RegeneratePassword(ctx, "res6977", "sto2527", "user1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocalUserRegeneratePasswordResult = armstorage.LocalUserRegeneratePasswordResult{ // SSHPassword: to.Ptr("<REDACTED>"), // } }
Output:
type LocalUsersClientCreateOrUpdateOptions ¶ added in v0.3.0
type LocalUsersClientCreateOrUpdateOptions struct { }
LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method.
type LocalUsersClientCreateOrUpdateResponse ¶ added in v0.3.0
type LocalUsersClientCreateOrUpdateResponse struct { // The local user associated with the storage accounts. LocalUser }
LocalUsersClientCreateOrUpdateResponse contains the response from method LocalUsersClient.CreateOrUpdate.
type LocalUsersClientDeleteOptions ¶ added in v0.3.0
type LocalUsersClientDeleteOptions struct { }
LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method.
type LocalUsersClientDeleteResponse ¶ added in v0.3.0
type LocalUsersClientDeleteResponse struct { }
LocalUsersClientDeleteResponse contains the response from method LocalUsersClient.Delete.
type LocalUsersClientGetOptions ¶ added in v0.3.0
type LocalUsersClientGetOptions struct { }
LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method.
type LocalUsersClientGetResponse ¶ added in v0.3.0
type LocalUsersClientGetResponse struct { // The local user associated with the storage accounts. LocalUser }
LocalUsersClientGetResponse contains the response from method LocalUsersClient.Get.
type LocalUsersClientListKeysOptions ¶ added in v0.3.0
type LocalUsersClientListKeysOptions struct { }
LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method.
type LocalUsersClientListKeysResponse ¶ added in v0.3.0
type LocalUsersClientListKeysResponse struct { // The Storage Account Local User keys. LocalUserKeys }
LocalUsersClientListKeysResponse contains the response from method LocalUsersClient.ListKeys.
type LocalUsersClientListOptions ¶ added in v0.3.0
type LocalUsersClientListOptions struct { // Optional. When specified, only local user names starting with the filter will be listed. Filter *string // Optional, when specified, will list local users enabled for the specific protocol. Lists all users by default. Include *ListLocalUserIncludeParam // Optional, specifies the maximum number of local users that will be included in the list response. Maxpagesize *int32 }
LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method.
type LocalUsersClientListResponse ¶ added in v0.3.0
type LocalUsersClientListResponse struct { // List of local users requested, and if paging is required, a URL to the next page of local users. LocalUsers }
LocalUsersClientListResponse contains the response from method LocalUsersClient.NewListPager.
type LocalUsersClientRegeneratePasswordOptions ¶ added in v0.3.0
type LocalUsersClientRegeneratePasswordOptions struct { }
LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword method.
type LocalUsersClientRegeneratePasswordResponse ¶ added in v0.3.0
type LocalUsersClientRegeneratePasswordResponse struct { // The secrets of Storage Account Local User. LocalUserRegeneratePasswordResult }
LocalUsersClientRegeneratePasswordResponse contains the response from method LocalUsersClient.RegeneratePassword.
type ManagementPoliciesClient ¶
type ManagementPoliciesClient struct {
// contains filtered or unexported fields
}
ManagementPoliciesClient contains the methods for the ManagementPolicies group. Don't use this type directly, use NewManagementPoliciesClient() instead.
func NewManagementPoliciesClient ¶
func NewManagementPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementPoliciesClient, error)
NewManagementPoliciesClient creates a new instance of ManagementPoliciesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagementPoliciesClient) CreateOrUpdate ¶
func (client *ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, properties ManagementPolicy, options *ManagementPoliciesClientCreateOrUpdateOptions) (ManagementPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Sets the managementpolicy to the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- managementPolicyName - The name of the Storage Account Management Policy. It should always be 'default'
- properties - The ManagementPolicy set to a storage account.
- options - ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate method.
Example (StorageAccountSetManagementPolicies) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }, { Name: to.Ptr("olcmtest2"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobIndexMatch: []*armstorage.TagFilter{ { Name: to.Ptr("tag1"), Op: to.Ptr("=="), Value: to.Ptr("val1"), }, { Name: to.Ptr("tag2"), Op: to.Ptr("=="), Value: to.Ptr("val2"), }}, BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer2")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }, // { // Name: to.Ptr("olcmtest2"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobIndexMatch: []*armstorage.TagFilter{ // { // Name: to.Ptr("tag1"), // Op: to.Ptr("=="), // Value: to.Ptr("val1"), // }, // { // Name: to.Ptr("tag2"), // Op: to.Ptr("=="), // Value: to.Ptr("val2"), // }}, // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer2")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterCreationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterCreationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterCreationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyColdTierActions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyColdTierActions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, TierToCold: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, TierToCold: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, Version: &armstorage.ManagementPolicyVersion{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, TierToCold: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCold: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // TierToCold: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // Version: &armstorage.ManagementPolicyVersion{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // TierToCold: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyForBlockAndAppendBlobs) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](90), }, }, Version: &armstorage.ManagementPolicyVersion{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](90), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob"), to.Ptr("appendBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](90), // }, // }, // Version: &armstorage.ManagementPolicyVersion{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](90), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob"), // to.Ptr("appendBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyHotTierActions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyHotTierActions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ TierToHot: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ TierToHot: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, Version: &armstorage.ManagementPolicyVersion{ TierToHot: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // TierToHot: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // TierToHot: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // Version: &armstorage.ManagementPolicyVersion{ // TierToHot: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), }, EnableAutoTierToHotFromCool: to.Ptr(true), TierToArchive: &armstorage.DateAfterModification{ DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](1000), // }, // EnableAutoTierToHotFromCool: to.Ptr(true), // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterLastAccessTimeGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyLastTierChangeTimeActions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ TierToArchive: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), }, }, Version: &armstorage.ManagementPolicyVersion{ TierToArchive: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](120), // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // TierToArchive: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), // }, // }, // Version: &armstorage.ManagementPolicyVersion{ // TierToArchive: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // DaysAfterLastTierChangeGreaterThan: to.Ptr[float32](90), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
Example (StorageAccountSetManagementPolicyWithSnapshotAndVersion) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().CreateOrUpdate(ctx, "res7687", "sto9699", armstorage.ManagementPolicyNameDefault, armstorage.ManagementPolicy{ Properties: &armstorage.ManagementPolicyProperties{ Policy: &armstorage.ManagementPolicySchema{ Rules: []*armstorage.ManagementPolicyRule{ { Name: to.Ptr("olcmtest1"), Type: to.Ptr(armstorage.RuleTypeLifecycle), Definition: &armstorage.ManagementPolicyDefinition{ Actions: &armstorage.ManagementPolicyAction{ BaseBlob: &armstorage.ManagementPolicyBaseBlob{ Delete: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterModification{ DaysAfterModificationGreaterThan: to.Ptr[float32](30), }, }, Snapshot: &armstorage.ManagementPolicySnapShot{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, Version: &armstorage.ManagementPolicyVersion{ Delete: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](1000), }, TierToArchive: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](90), }, TierToCool: &armstorage.DateAfterCreation{ DaysAfterCreationGreaterThan: to.Ptr[float32](30), }, }, }, Filters: &armstorage.ManagementPolicyFilter{ BlobTypes: []*string{ to.Ptr("blockBlob")}, PrefixMatch: []*string{ to.Ptr("olcmtestcontainer1")}, }, }, Enabled: to.Ptr(true), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T02:53:39.093Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest1"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // Version: &armstorage.ManagementPolicyVersion{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer1")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
func (*ManagementPoliciesClient) Delete ¶
func (client *ManagementPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientDeleteOptions) (ManagementPoliciesClientDeleteResponse, error)
Delete - Deletes the managementpolicy associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- managementPolicyName - The name of the Storage Account Management Policy. It should always be 'default'
- options - ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagementPoliciesClient().Delete(ctx, "res6977", "sto2527", armstorage.ManagementPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagementPoliciesClient) Get ¶
func (client *ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, managementPolicyName ManagementPolicyName, options *ManagementPoliciesClientGetOptions) (ManagementPoliciesClientGetResponse, error)
Get - Gets the managementpolicy associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- managementPolicyName - The name of the Storage Account Management Policy. It should always be 'default'
- options - ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementPoliciesClient().Get(ctx, "res6977", "sto2527", armstorage.ManagementPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagementPolicy = armstorage.ManagementPolicy{ // Name: to.Ptr("DefaultManagementPolicy"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/managementPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default"), // Properties: &armstorage.ManagementPolicyProperties{ // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-08T03:01:55.716Z"); return t}()), // Policy: &armstorage.ManagementPolicySchema{ // Rules: []*armstorage.ManagementPolicyRule{ // { // Name: to.Ptr("olcmtest"), // Type: to.Ptr(armstorage.RuleTypeLifecycle), // Definition: &armstorage.ManagementPolicyDefinition{ // Actions: &armstorage.ManagementPolicyAction{ // BaseBlob: &armstorage.ManagementPolicyBaseBlob{ // Delete: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](1000), // }, // TierToArchive: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](90), // }, // TierToCool: &armstorage.DateAfterModification{ // DaysAfterModificationGreaterThan: to.Ptr[float32](30), // }, // }, // Snapshot: &armstorage.ManagementPolicySnapShot{ // Delete: &armstorage.DateAfterCreation{ // DaysAfterCreationGreaterThan: to.Ptr[float32](30), // }, // }, // }, // Filters: &armstorage.ManagementPolicyFilter{ // BlobTypes: []*string{ // to.Ptr("blockBlob")}, // PrefixMatch: []*string{ // to.Ptr("olcmtestcontainer")}, // }, // }, // Enabled: to.Ptr(true), // }}, // }, // }, // } }
Output:
type ManagementPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagementPoliciesClientCreateOrUpdateOptions struct { }
ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate method.
type ManagementPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagementPoliciesClientCreateOrUpdateResponse struct { // The Get Storage Account ManagementPolicies operation response. ManagementPolicy }
ManagementPoliciesClientCreateOrUpdateResponse contains the response from method ManagementPoliciesClient.CreateOrUpdate.
type ManagementPoliciesClientDeleteOptions ¶ added in v0.3.0
type ManagementPoliciesClientDeleteOptions struct { }
ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method.
type ManagementPoliciesClientDeleteResponse ¶ added in v0.3.0
type ManagementPoliciesClientDeleteResponse struct { }
ManagementPoliciesClientDeleteResponse contains the response from method ManagementPoliciesClient.Delete.
type ManagementPoliciesClientGetOptions ¶ added in v0.3.0
type ManagementPoliciesClientGetOptions struct { }
ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method.
type ManagementPoliciesClientGetResponse ¶ added in v0.3.0
type ManagementPoliciesClientGetResponse struct { // The Get Storage Account ManagementPolicies operation response. ManagementPolicy }
ManagementPoliciesClientGetResponse contains the response from method ManagementPoliciesClient.Get.
type ManagementPolicy ¶
type ManagementPolicy struct { // Returns the Storage Account Data Policies Rules. Properties *ManagementPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ManagementPolicy - The Get Storage Account ManagementPolicies operation response.
func (ManagementPolicy) MarshalJSON ¶
func (m ManagementPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicy.
func (*ManagementPolicy) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicy.
type ManagementPolicyAction ¶
type ManagementPolicyAction struct { // The management policy action for base blob BaseBlob *ManagementPolicyBaseBlob // The management policy action for snapshot Snapshot *ManagementPolicySnapShot // The management policy action for version Version *ManagementPolicyVersion }
ManagementPolicyAction - Actions are applied to the filtered blobs when the execution condition is met.
func (ManagementPolicyAction) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicyAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyAction.
func (*ManagementPolicyAction) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyAction.
type ManagementPolicyBaseBlob ¶
type ManagementPolicyBaseBlob struct { // The function to delete the blob Delete *DateAfterModification // This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan. EnableAutoTierToHotFromCool *bool // The function to tier blobs to archive storage. TierToArchive *DateAfterModification // The function to tier blobs to cold storage. TierToCold *DateAfterModification // The function to tier blobs to cool storage. TierToCool *DateAfterModification // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts TierToHot *DateAfterModification }
ManagementPolicyBaseBlob - Management policy action for base blob.
func (ManagementPolicyBaseBlob) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicyBaseBlob) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyBaseBlob.
func (*ManagementPolicyBaseBlob) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyBaseBlob) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyBaseBlob.
type ManagementPolicyDefinition ¶
type ManagementPolicyDefinition struct { // REQUIRED; An object that defines the action set. Actions *ManagementPolicyAction // An object that defines the filter set. Filters *ManagementPolicyFilter }
ManagementPolicyDefinition - An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.
func (ManagementPolicyDefinition) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicyDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyDefinition.
func (*ManagementPolicyDefinition) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyDefinition.
type ManagementPolicyFilter ¶
type ManagementPolicyFilter struct { // REQUIRED; An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete // actions are supported for appendBlob. BlobTypes []*string // An array of blob index tag based filters, there can be at most 10 tag filters BlobIndexMatch []*TagFilter // An array of strings for prefixes to be match. PrefixMatch []*string }
ManagementPolicyFilter - Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters.
func (ManagementPolicyFilter) MarshalJSON ¶
func (m ManagementPolicyFilter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyFilter.
func (*ManagementPolicyFilter) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyFilter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyFilter.
type ManagementPolicyName ¶
type ManagementPolicyName string
const (
ManagementPolicyNameDefault ManagementPolicyName = "default"
)
func PossibleManagementPolicyNameValues ¶
func PossibleManagementPolicyNameValues() []ManagementPolicyName
PossibleManagementPolicyNameValues returns the possible values for the ManagementPolicyName const type.
type ManagementPolicyProperties ¶
type ManagementPolicyProperties struct { // REQUIRED; The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. Policy *ManagementPolicySchema // READ-ONLY; Returns the date and time the ManagementPolicies was last modified. LastModifiedTime *time.Time }
ManagementPolicyProperties - The Storage Account ManagementPolicy properties.
func (ManagementPolicyProperties) MarshalJSON ¶
func (m ManagementPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyProperties.
func (*ManagementPolicyProperties) UnmarshalJSON ¶
func (m *ManagementPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyProperties.
type ManagementPolicyRule ¶
type ManagementPolicyRule struct { // REQUIRED; An object that defines the Lifecycle rule. Definition *ManagementPolicyDefinition // REQUIRED; A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be // unique within a policy. Name *string // REQUIRED; The valid value is Lifecycle Type *RuleType // Rule is enabled if set to true. Enabled *bool }
ManagementPolicyRule - An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
func (ManagementPolicyRule) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicyRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyRule.
func (*ManagementPolicyRule) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyRule.
type ManagementPolicySchema ¶
type ManagementPolicySchema struct { // REQUIRED; The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. Rules []*ManagementPolicyRule }
ManagementPolicySchema - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
func (ManagementPolicySchema) MarshalJSON ¶
func (m ManagementPolicySchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicySchema.
func (*ManagementPolicySchema) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicySchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicySchema.
type ManagementPolicySnapShot ¶
type ManagementPolicySnapShot struct { // The function to delete the blob snapshot Delete *DateAfterCreation // The function to tier blob snapshot to archive storage. TierToArchive *DateAfterCreation // The function to tier blobs to cold storage. TierToCold *DateAfterCreation // The function to tier blob snapshot to cool storage. TierToCool *DateAfterCreation // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts TierToHot *DateAfterCreation }
ManagementPolicySnapShot - Management policy action for snapshot.
func (ManagementPolicySnapShot) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicySnapShot) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicySnapShot.
func (*ManagementPolicySnapShot) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicySnapShot) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicySnapShot.
type ManagementPolicyVersion ¶
type ManagementPolicyVersion struct { // The function to delete the blob version Delete *DateAfterCreation // The function to tier blob version to archive storage. TierToArchive *DateAfterCreation // The function to tier blobs to cold storage. TierToCold *DateAfterCreation // The function to tier blob version to cool storage. TierToCool *DateAfterCreation // The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts TierToHot *DateAfterCreation }
ManagementPolicyVersion - Management policy action for blob version.
func (ManagementPolicyVersion) MarshalJSON ¶ added in v1.1.0
func (m ManagementPolicyVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagementPolicyVersion.
func (*ManagementPolicyVersion) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagementPolicyVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagementPolicyVersion.
type MetricSpecification ¶
type MetricSpecification struct { // Aggregation type could be Average. AggregationType *string // The category this metric specification belong to, could be Capacity. Category *string // Dimensions of blobs, including blob type and access tier. Dimensions []*Dimension // Display description of metric specification. DisplayDescription *string // Display name of metric specification. DisplayName *string // The property to decide fill gap with zero or not. FillGapWithZero *bool // Name of metric specification. Name *string // Account Resource Id. ResourceIDDimensionNameOverride *string // Unit could be Bytes or Count. Unit *string }
MetricSpecification - Metric specification of operation.
func (MetricSpecification) MarshalJSON ¶
func (m MetricSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricSpecification.
func (*MetricSpecification) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.
type MigrationName ¶ added in v1.4.0
type MigrationName string
const (
MigrationNameDefault MigrationName = "default"
)
func PossibleMigrationNameValues ¶ added in v1.4.0
func PossibleMigrationNameValues() []MigrationName
PossibleMigrationNameValues returns the possible values for the MigrationName const type.
type MigrationState ¶
type MigrationState string
MigrationState - This property denotes the container level immutability to object level immutability migration state.
const ( MigrationStateCompleted MigrationState = "Completed" MigrationStateInProgress MigrationState = "InProgress" )
func PossibleMigrationStateValues ¶
func PossibleMigrationStateValues() []MigrationState
PossibleMigrationStateValues returns the possible values for the MigrationState const type.
type MigrationStatus ¶ added in v1.4.0
type MigrationStatus string
MigrationStatus - Current status of migration
const ( MigrationStatusComplete MigrationStatus = "Complete" MigrationStatusFailed MigrationStatus = "Failed" MigrationStatusInProgress MigrationStatus = "InProgress" MigrationStatusInvalid MigrationStatus = "Invalid" MigrationStatusSubmittedForConversion MigrationStatus = "SubmittedForConversion" )
func PossibleMigrationStatusValues ¶ added in v1.4.0
func PossibleMigrationStatusValues() []MigrationStatus
PossibleMigrationStatusValues returns the possible values for the MigrationStatus const type.
type MinimumTLSVersion ¶
type MinimumTLSVersion string
MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.
const ( MinimumTLSVersionTLS10 MinimumTLSVersion = "TLS1_0" MinimumTLSVersionTLS11 MinimumTLSVersion = "TLS1_1" MinimumTLSVersionTLS12 MinimumTLSVersion = "TLS1_2" MinimumTLSVersionTLS13 MinimumTLSVersion = "TLS1_3" )
func PossibleMinimumTLSVersionValues ¶
func PossibleMinimumTLSVersionValues() []MinimumTLSVersion
PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type.
type Multichannel ¶
type Multichannel struct { // Indicates whether multichannel is enabled Enabled *bool }
Multichannel setting. Applies to Premium FileStorage only.
func (Multichannel) MarshalJSON ¶ added in v1.1.0
func (m Multichannel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Multichannel.
func (*Multichannel) UnmarshalJSON ¶ added in v1.1.0
func (m *Multichannel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Multichannel.
type Name ¶
type Name string
Name - Name of the policy. The valid value is AccessTimeTracking. This field is currently read only
const (
NameAccessTimeTracking Name = "AccessTimeTracking"
)
func PossibleNameValues ¶
func PossibleNameValues() []Name
PossibleNameValues returns the possible values for the Name const type.
type NetworkRuleSet ¶
type NetworkRuleSet struct { // REQUIRED; Specifies the default action of allow or deny when no other rules match. DefaultAction *DefaultAction // Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices // (For example, "Logging, Metrics"), or None to bypass none // of those traffics. Bypass *Bypass // Sets the IP ACL rules IPRules []*IPRule // Sets the resource access rules ResourceAccessRules []*ResourceAccessRule // Sets the virtual network rules VirtualNetworkRules []*VirtualNetworkRule }
NetworkRuleSet - Network rule set
func (NetworkRuleSet) MarshalJSON ¶
func (n NetworkRuleSet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.
func (*NetworkRuleSet) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.
type NetworkSecurityPerimeter ¶ added in v1.6.0
type NetworkSecurityPerimeter struct { // The ARM identifier of the resource ID *string // Location of the resource Location *string // Guid of the resource PerimeterGUID *string }
NetworkSecurityPerimeter related information
func (NetworkSecurityPerimeter) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeter.
func (*NetworkSecurityPerimeter) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeter.
type NetworkSecurityPerimeterConfiguration ¶ added in v1.6.0
type NetworkSecurityPerimeterConfiguration struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Properties of the Network Security Perimeter Configuration Properties *NetworkSecurityPerimeterConfigurationProperties // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
NetworkSecurityPerimeterConfiguration - The Network Security Perimeter configuration resource.
func (NetworkSecurityPerimeterConfiguration) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeterConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration.
func (*NetworkSecurityPerimeterConfiguration) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeterConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfiguration.
type NetworkSecurityPerimeterConfigurationList ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationList struct { // The URI that can be used to request the next set of paged results. NextLink *string // READ-ONLY; A collection of Network Security Perimeter configurations Value []*NetworkSecurityPerimeterConfiguration }
NetworkSecurityPerimeterConfigurationList - Result of the List Network Security Perimeter configuration operation.
func (NetworkSecurityPerimeterConfigurationList) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeterConfigurationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationList.
func (*NetworkSecurityPerimeterConfigurationList) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeterConfigurationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationList.
type NetworkSecurityPerimeterConfigurationProperties ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationProperties struct { // READ-ONLY; NetworkSecurityPerimeter related information NetworkSecurityPerimeter *NetworkSecurityPerimeter // READ-ONLY; Network Security Perimeter profile Profile *NetworkSecurityPerimeterConfigurationPropertiesProfile // READ-ONLY; List of Provisioning Issues if any ProvisioningIssues []*ProvisioningIssue // READ-ONLY; Provisioning state of Network Security Perimeter configuration propagation ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState // READ-ONLY; Information about resource association ResourceAssociation *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation }
NetworkSecurityPerimeterConfigurationProperties - Properties of the Network Security Perimeter Configuration
func (NetworkSecurityPerimeterConfigurationProperties) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeterConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties.
func (*NetworkSecurityPerimeterConfigurationProperties) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeterConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationProperties.
type NetworkSecurityPerimeterConfigurationPropertiesProfile ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationPropertiesProfile struct { // List of Access Rules AccessRules []*NspAccessRule // Current access rules version AccessRulesVersion *float32 // Diagnostic settings version DiagnosticSettingsVersion *float32 // Enabled logging categories EnabledLogCategories []*string // Name of the resource Name *string }
NetworkSecurityPerimeterConfigurationPropertiesProfile - Network Security Perimeter profile
func (NetworkSecurityPerimeterConfigurationPropertiesProfile) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeterConfigurationPropertiesProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile.
func (*NetworkSecurityPerimeterConfigurationPropertiesProfile) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeterConfigurationPropertiesProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile.
type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation struct { // Access Mode of the resource association AccessMode *ResourceAssociationAccessMode // Name of the resource association Name *string }
NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation - Information about resource association
func (NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) MarshalJSON ¶ added in v1.6.0
func (n NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.
func (*NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) UnmarshalJSON ¶ added in v1.6.0
func (n *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.
type NetworkSecurityPerimeterConfigurationProvisioningState ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationProvisioningState string
NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of Network Security Perimeter configuration propagation
const ( NetworkSecurityPerimeterConfigurationProvisioningStateAccepted NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted" NetworkSecurityPerimeterConfigurationProvisioningStateCanceled NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled" NetworkSecurityPerimeterConfigurationProvisioningStateDeleting NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting" NetworkSecurityPerimeterConfigurationProvisioningStateFailed NetworkSecurityPerimeterConfigurationProvisioningState = "Failed" NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded" )
func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues ¶ added in v1.6.0
func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState
PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type.
type NetworkSecurityPerimeterConfigurationsClient ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClient struct {
// contains filtered or unexported fields
}
NetworkSecurityPerimeterConfigurationsClient contains the methods for the NetworkSecurityPerimeterConfigurations group. Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsClient() instead.
func NewNetworkSecurityPerimeterConfigurationsClient ¶ added in v1.6.0
func NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error)
NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*NetworkSecurityPerimeterConfigurationsClient) BeginReconcile ¶ added in v1.6.0
func (client *NetworkSecurityPerimeterConfigurationsClient) BeginReconcile(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions) (*runtime.Poller[NetworkSecurityPerimeterConfigurationsClientReconcileResponse], error)
BeginReconcile - Refreshes any information about the association. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
- options - NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().BeginReconcile(ctx, "res4410", "sto8607", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*NetworkSecurityPerimeterConfigurationsClient) Get ¶ added in v1.6.0
func (client *NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterConfigurationsClientGetOptions) (NetworkSecurityPerimeterConfigurationsClientGetResponse, error)
Get - Gets effective NetworkSecurityPerimeterConfiguration for association If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
- options - NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().Get(ctx, "res4410", "sto8607", "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.NetworkSecurityPerimeterConfiguration = armstorage.NetworkSecurityPerimeterConfiguration{ // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/networkSecurityPerimeterConfigurations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), // Properties: &armstorage.NetworkSecurityPerimeterConfigurationProperties{ // NetworkSecurityPerimeter: &armstorage.NetworkSecurityPerimeter{ // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), // Location: to.Ptr("East US"), // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), // }, // Profile: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesProfile{ // Name: to.Ptr("profile1"), // AccessRules: []*armstorage.NspAccessRule{ // { // Name: to.Ptr("allowedSubscriptions"), // Properties: &armstorage.NspAccessRuleProperties{ // Direction: to.Ptr(armstorage.NspAccessRuleDirectionInbound), // Subscriptions: []*armstorage.NspAccessRulePropertiesSubscriptionsItem{ // { // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774"), // }}, // }, // }}, // AccessRulesVersion: to.Ptr[float32](10), // DiagnosticSettingsVersion: to.Ptr[float32](5), // EnabledLogCategories: []*string{ // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, // }, // ProvisioningIssues: []*armstorage.ProvisioningIssue{ // { // Name: to.Ptr("ConfigurationPropagationFailure"), // Properties: &armstorage.ProvisioningIssueProperties{ // Description: to.Ptr("Failed to update Network Security Perimeter association."), // IssueType: to.Ptr(armstorage.IssueTypeConfigurationPropagationFailure), // Severity: to.Ptr(armstorage.SeverityError), // }, // }}, // ProvisioningState: to.Ptr(armstorage.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), // ResourceAssociation: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation{ // Name: to.Ptr("resourceAssociation1"), // AccessMode: to.Ptr(armstorage.ResourceAssociationAccessModeEnforced), // }, // }, // } }
Output:
func (*NetworkSecurityPerimeterConfigurationsClient) NewListPager ¶ added in v1.6.0
func (client *NetworkSecurityPerimeterConfigurationsClient) NewListPager(resourceGroupName string, accountName string, options *NetworkSecurityPerimeterConfigurationsClientListOptions) *runtime.Pager[NetworkSecurityPerimeterConfigurationsClientListResponse]
NewListPager - Gets list of effective NetworkSecurityPerimeterConfiguration for storage account
Generated from API version 2023-05-01
- 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.
- options - NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNetworkSecurityPerimeterConfigurationsClient().NewListPager("res4410", "sto8607", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.NetworkSecurityPerimeterConfigurationList = armstorage.NetworkSecurityPerimeterConfigurationList{ // Value: []*armstorage.NetworkSecurityPerimeterConfiguration{ // { // Name: to.Ptr("dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/networkSecurityPerimeterConfigurations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/networkSecurityPerimeterConfigurations/dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"), // Properties: &armstorage.NetworkSecurityPerimeterConfigurationProperties{ // NetworkSecurityPerimeter: &armstorage.NetworkSecurityPerimeter{ // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/res4794/providers/Microsoft.Network/networkSecurityPerimeters/nsp1"), // Location: to.Ptr("East US"), // PerimeterGUID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"), // }, // Profile: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesProfile{ // Name: to.Ptr("profile1"), // AccessRules: []*armstorage.NspAccessRule{ // { // Name: to.Ptr("inVpnRule"), // Properties: &armstorage.NspAccessRuleProperties{ // AddressPrefixes: []*string{ // to.Ptr("148.0.0.0/8"), // to.Ptr("152.4.6.0/24")}, // Direction: to.Ptr(armstorage.NspAccessRuleDirectionInbound), // }, // }}, // AccessRulesVersion: to.Ptr[float32](10), // DiagnosticSettingsVersion: to.Ptr[float32](5), // EnabledLogCategories: []*string{ // to.Ptr("NspPublicInboundPerimeterRulesAllowed"), // to.Ptr("NspPublicInboundPerimeterRulesDenied")}, // }, // ProvisioningState: to.Ptr(armstorage.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded), // ResourceAssociation: &armstorage.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation{ // Name: to.Ptr("association1"), // AccessMode: to.Ptr(armstorage.ResourceAssociationAccessModeEnforced), // }, // }, // }}, // } } }
Output:
type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NetworkSecurityPerimeterConfigurationsClientBeginReconcileOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginReconcile method.
type NetworkSecurityPerimeterConfigurationsClientGetOptions ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientGetOptions struct { }
NetworkSecurityPerimeterConfigurationsClientGetOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.Get method.
type NetworkSecurityPerimeterConfigurationsClientGetResponse ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientGetResponse struct { // The Network Security Perimeter configuration resource. NetworkSecurityPerimeterConfiguration }
NetworkSecurityPerimeterConfigurationsClientGetResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.Get.
type NetworkSecurityPerimeterConfigurationsClientListOptions ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientListOptions struct { }
NetworkSecurityPerimeterConfigurationsClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.NewListPager method.
type NetworkSecurityPerimeterConfigurationsClientListResponse ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientListResponse struct { // Result of the List Network Security Perimeter configuration operation. NetworkSecurityPerimeterConfigurationList }
NetworkSecurityPerimeterConfigurationsClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.NewListPager.
type NetworkSecurityPerimeterConfigurationsClientReconcileResponse ¶ added in v1.6.0
type NetworkSecurityPerimeterConfigurationsClientReconcileResponse struct { }
NetworkSecurityPerimeterConfigurationsClientReconcileResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.BeginReconcile.
type NspAccessRule ¶ added in v1.6.0
type NspAccessRule struct { // Name of the resource Name *string // READ-ONLY; Properties of Access Rule Properties *NspAccessRuleProperties }
NspAccessRule - Information of Access Rule in Network Security Perimeter profile
func (NspAccessRule) MarshalJSON ¶ added in v1.6.0
func (n NspAccessRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NspAccessRule.
func (*NspAccessRule) UnmarshalJSON ¶ added in v1.6.0
func (n *NspAccessRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRule.
type NspAccessRuleDirection ¶ added in v1.6.0
type NspAccessRuleDirection string
NspAccessRuleDirection - Direction of Access Rule
const ( NspAccessRuleDirectionInbound NspAccessRuleDirection = "Inbound" NspAccessRuleDirectionOutbound NspAccessRuleDirection = "Outbound" )
func PossibleNspAccessRuleDirectionValues ¶ added in v1.6.0
func PossibleNspAccessRuleDirectionValues() []NspAccessRuleDirection
PossibleNspAccessRuleDirectionValues returns the possible values for the NspAccessRuleDirection const type.
type NspAccessRuleProperties ¶ added in v1.6.0
type NspAccessRuleProperties struct { // Address prefixes in the CIDR format for inbound rules AddressPrefixes []*string // Direction of Access Rule Direction *NspAccessRuleDirection // Subscriptions for inbound rules Subscriptions []*NspAccessRulePropertiesSubscriptionsItem // READ-ONLY; FQDN for outbound rules FullyQualifiedDomainNames []*string // READ-ONLY; NetworkSecurityPerimeters for inbound rules NetworkSecurityPerimeters []*NetworkSecurityPerimeter }
NspAccessRuleProperties - Properties of Access Rule
func (NspAccessRuleProperties) MarshalJSON ¶ added in v1.6.0
func (n NspAccessRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NspAccessRuleProperties.
func (*NspAccessRuleProperties) UnmarshalJSON ¶ added in v1.6.0
func (n *NspAccessRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRuleProperties.
type NspAccessRulePropertiesSubscriptionsItem ¶ added in v1.6.0
type NspAccessRulePropertiesSubscriptionsItem struct { // The ARM identifier of subscription ID *string }
NspAccessRulePropertiesSubscriptionsItem - Subscription for inbound rule
func (NspAccessRulePropertiesSubscriptionsItem) MarshalJSON ¶ added in v1.6.0
func (n NspAccessRulePropertiesSubscriptionsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NspAccessRulePropertiesSubscriptionsItem.
func (*NspAccessRulePropertiesSubscriptionsItem) UnmarshalJSON ¶ added in v1.6.0
func (n *NspAccessRulePropertiesSubscriptionsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NspAccessRulePropertiesSubscriptionsItem.
type ObjectReplicationPolicies ¶
type ObjectReplicationPolicies struct { // The replication policy between two storage accounts. Value []*ObjectReplicationPolicy }
ObjectReplicationPolicies - List storage account object replication policies.
func (ObjectReplicationPolicies) MarshalJSON ¶
func (o ObjectReplicationPolicies) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicies.
func (*ObjectReplicationPolicies) UnmarshalJSON ¶ added in v1.1.0
func (o *ObjectReplicationPolicies) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicies.
type ObjectReplicationPoliciesClient ¶
type ObjectReplicationPoliciesClient struct {
// contains filtered or unexported fields
}
ObjectReplicationPoliciesClient contains the methods for the ObjectReplicationPolicies group. Don't use this type directly, use NewObjectReplicationPoliciesClient() instead.
func NewObjectReplicationPoliciesClient ¶
func NewObjectReplicationPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ObjectReplicationPoliciesClient, error)
NewObjectReplicationPoliciesClient creates a new instance of ObjectReplicationPoliciesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ObjectReplicationPoliciesClient) CreateOrUpdate ¶
func (client *ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy, options *ObjectReplicationPoliciesClientCreateOrUpdateOptions) (ObjectReplicationPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update the object replication policy of the storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- objectReplicationPolicyID - For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
- properties - The object replication policy set to a storage account. A unique policy ID will be created if absent.
- options - ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate method.
Example (StorageAccountCreateObjectReplicationPolicyOnDestination) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "dst112", "default", armstorage.ObjectReplicationPolicy{ Properties: &armstorage.ObjectReplicationPolicyProperties{ DestinationAccount: to.Ptr("dst112"), Rules: []*armstorage.ObjectReplicationPolicyRule{ { DestinationContainer: to.Ptr("dcont139"), Filters: &armstorage.ObjectReplicationPolicyFilter{ PrefixMatch: []*string{ to.Ptr("blobA"), to.Ptr("blobB")}, }, SourceContainer: to.Ptr("scont139"), }}, SourceAccount: to.Ptr("src1122"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("dst112"), // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Rules: []*armstorage.ObjectReplicationPolicyRule{ // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // PrefixMatch: []*string{ // to.Ptr("blobA"), // to.Ptr("blobB")}, // }, // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), // SourceContainer: to.Ptr("sourceContainer1"), // }}, // SourceAccount: to.Ptr("src1122"), // }, // } }
Output:
Example (StorageAccountCreateObjectReplicationPolicyOnSource) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ Properties: &armstorage.ObjectReplicationPolicyProperties{ DestinationAccount: to.Ptr("dst112"), Rules: []*armstorage.ObjectReplicationPolicyRule{ { DestinationContainer: to.Ptr("dcont139"), Filters: &armstorage.ObjectReplicationPolicyFilter{ MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), PrefixMatch: []*string{ to.Ptr("blobA"), to.Ptr("blobB")}, }, RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), SourceContainer: to.Ptr("scont139"), }}, SourceAccount: to.Ptr("src1122"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("dst112"), // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.716Z"); return t}()), // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Rules: []*armstorage.ObjectReplicationPolicyRule{ // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // MinCreationTime: to.Ptr("2020-02-19T16:05:00Z"), // PrefixMatch: []*string{ // to.Ptr("blobA"), // to.Ptr("blobB")}, // }, // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), // SourceContainer: to.Ptr("sourceContainer1"), // }}, // SourceAccount: to.Ptr("src1122"), // }, // } }
Output:
Example (StorageAccountUpdateObjectReplicationPolicyOnDestination) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnDestination.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "dst112", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ Properties: &armstorage.ObjectReplicationPolicyProperties{ DestinationAccount: to.Ptr("dst112"), Rules: []*armstorage.ObjectReplicationPolicyRule{ { DestinationContainer: to.Ptr("dcont139"), Filters: &armstorage.ObjectReplicationPolicyFilter{ PrefixMatch: []*string{ to.Ptr("blobA"), to.Ptr("blobB")}, }, RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), SourceContainer: to.Ptr("scont139"), }, { DestinationContainer: to.Ptr("dcont179"), SourceContainer: to.Ptr("scont179"), }}, SourceAccount: to.Ptr("src1122"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("dst112"), // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Rules: []*armstorage.ObjectReplicationPolicyRule{ // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // PrefixMatch: []*string{ // to.Ptr("blobA"), // to.Ptr("blobB")}, // }, // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), // SourceContainer: to.Ptr("sourceContainer1"), // }, // { // DestinationContainer: to.Ptr("dcont179"), // RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), // SourceContainer: to.Ptr("scont179"), // }}, // SourceAccount: to.Ptr("src1122"), // }, // } }
Output:
Example (StorageAccountUpdateObjectReplicationPolicyOnSource) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewObjectReplicationPoliciesClient().CreateOrUpdate(ctx, "res7687", "src1122", "2a20bb73-5717-4635-985a-5d4cf777438f", armstorage.ObjectReplicationPolicy{ Properties: &armstorage.ObjectReplicationPolicyProperties{ DestinationAccount: to.Ptr("dst112"), Rules: []*armstorage.ObjectReplicationPolicyRule{ { DestinationContainer: to.Ptr("dcont139"), Filters: &armstorage.ObjectReplicationPolicyFilter{ PrefixMatch: []*string{ to.Ptr("blobA"), to.Ptr("blobB")}, }, RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), SourceContainer: to.Ptr("scont139"), }, { DestinationContainer: to.Ptr("dcont179"), RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), SourceContainer: to.Ptr("scont179"), }}, SourceAccount: to.Ptr("src1122"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ // Name: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("dst112"), // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.716Z"); return t}()), // PolicyID: to.Ptr("2a20bb73-5717-4635-985a-5d4cf777438f"), // Rules: []*armstorage.ObjectReplicationPolicyRule{ // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // PrefixMatch: []*string{ // to.Ptr("blobA"), // to.Ptr("blobB")}, // }, // RuleID: to.Ptr("d5d18a48-8801-4554-aeaa-74faf65f5ef9"), // SourceContainer: to.Ptr("sourceContainer1"), // }, // { // DestinationContainer: to.Ptr("dcont179"), // RuleID: to.Ptr("cfbb4bc2-8b60-429f-b05a-d1e0942b33b2"), // SourceContainer: to.Ptr("scont179"), // }}, // SourceAccount: to.Ptr("src1122"), // }, // } }
Output:
func (*ObjectReplicationPoliciesClient) Delete ¶
func (client *ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientDeleteOptions) (ObjectReplicationPoliciesClientDeleteResponse, error)
Delete - Deletes the object replication policy associated with the specified storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- objectReplicationPolicyID - For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
- options - ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteObjectReplicationPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewObjectReplicationPoliciesClient().Delete(ctx, "res6977", "sto2527", "{objectReplicationPolicy-Id}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ObjectReplicationPoliciesClient) Get ¶
func (client *ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, options *ObjectReplicationPoliciesClientGetOptions) (ObjectReplicationPoliciesClientGetResponse, error)
Get - Get the object replication policy of the storage account by policy ID. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- objectReplicationPolicyID - For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
- options - ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewObjectReplicationPoliciesClient().Get(ctx, "res6977", "sto2527", "{objectReplicationPolicy-Id}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ObjectReplicationPolicy = armstorage.ObjectReplicationPolicy{ // Name: to.Ptr("{objectReplicationPolicy-Id}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("destAccount1"), // EnabledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-08T03:01:55.716Z"); return t}()), // PolicyID: to.Ptr("{objectReplicationPolicy-Id}"), // Rules: []*armstorage.ObjectReplicationPolicyRule{ // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // PrefixMatch: []*string{ // to.Ptr("blobA"), // to.Ptr("blobB")}, // }, // SourceContainer: to.Ptr("sourceContainer1"), // }, // { // DestinationContainer: to.Ptr("destContainer1"), // Filters: &armstorage.ObjectReplicationPolicyFilter{ // PrefixMatch: []*string{ // to.Ptr("blobC"), // to.Ptr("blobD")}, // }, // SourceContainer: to.Ptr("sourceContainer1"), // }}, // SourceAccount: to.Ptr("sto2527"), // }, // } }
Output:
func (*ObjectReplicationPoliciesClient) NewListPager ¶ added in v0.6.0
func (client *ObjectReplicationPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *ObjectReplicationPoliciesClientListOptions) *runtime.Pager[ObjectReplicationPoliciesClientListResponse]
NewListPager - List the object replication policies associated with the storage account.
Generated from API version 2023-05-01
- 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.
- options - ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewObjectReplicationPoliciesClient().NewListPager("res6977", "sto2527", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ObjectReplicationPolicies = armstorage.ObjectReplicationPolicies{ // Value: []*armstorage.ObjectReplicationPolicy{ // { // Name: to.Ptr("c6c23999-fd4e-433a-bcf9-1db69d27cd8a"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/c6c23999-fd4e-433a-bcf9-1db69d27cd8a"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("destAccount1"), // SourceAccount: to.Ptr("sto2527"), // }, // }, // { // Name: to.Ptr("141d23dc-8958-4b48-b6e6-5a40bf1af116"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/objectReplicationPolicies"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/objectReplicationPolicies/141d23dc-8958-4b48-b6e6-5a40bf1af116"), // Properties: &armstorage.ObjectReplicationPolicyProperties{ // DestinationAccount: to.Ptr("destAccount2"), // SourceAccount: to.Ptr("sto2527"), // }, // }}, // } } }
Output:
type ObjectReplicationPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ObjectReplicationPoliciesClientCreateOrUpdateOptions struct { }
ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate method.
type ObjectReplicationPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ObjectReplicationPoliciesClientCreateOrUpdateResponse struct { // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy }
ObjectReplicationPoliciesClientCreateOrUpdateResponse contains the response from method ObjectReplicationPoliciesClient.CreateOrUpdate.
type ObjectReplicationPoliciesClientDeleteOptions ¶ added in v0.3.0
type ObjectReplicationPoliciesClientDeleteOptions struct { }
ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete method.
type ObjectReplicationPoliciesClientDeleteResponse ¶ added in v0.3.0
type ObjectReplicationPoliciesClientDeleteResponse struct { }
ObjectReplicationPoliciesClientDeleteResponse contains the response from method ObjectReplicationPoliciesClient.Delete.
type ObjectReplicationPoliciesClientGetOptions ¶ added in v0.3.0
type ObjectReplicationPoliciesClientGetOptions struct { }
ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get method.
type ObjectReplicationPoliciesClientGetResponse ¶ added in v0.3.0
type ObjectReplicationPoliciesClientGetResponse struct { // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy }
ObjectReplicationPoliciesClientGetResponse contains the response from method ObjectReplicationPoliciesClient.Get.
type ObjectReplicationPoliciesClientListOptions ¶ added in v0.3.0
type ObjectReplicationPoliciesClientListOptions struct { }
ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager method.
type ObjectReplicationPoliciesClientListResponse ¶ added in v0.3.0
type ObjectReplicationPoliciesClientListResponse struct { // List storage account object replication policies. ObjectReplicationPolicies }
ObjectReplicationPoliciesClientListResponse contains the response from method ObjectReplicationPoliciesClient.NewListPager.
type ObjectReplicationPolicy ¶
type ObjectReplicationPolicy struct { // Returns the Storage Account Object Replication Policy. Properties *ObjectReplicationPolicyProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ObjectReplicationPolicy - The replication policy between two storage accounts. Multiple rules can be defined in one policy.
func (ObjectReplicationPolicy) MarshalJSON ¶
func (o ObjectReplicationPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicy.
func (*ObjectReplicationPolicy) UnmarshalJSON ¶ added in v1.1.0
func (o *ObjectReplicationPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicy.
type ObjectReplicationPolicyFilter ¶
type ObjectReplicationPolicyFilter struct { // Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. // Example: 2020-02-19T16:05:00Z MinCreationTime *string // Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. PrefixMatch []*string }
ObjectReplicationPolicyFilter - Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters.
func (ObjectReplicationPolicyFilter) MarshalJSON ¶
func (o ObjectReplicationPolicyFilter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyFilter.
func (*ObjectReplicationPolicyFilter) UnmarshalJSON ¶ added in v1.1.0
func (o *ObjectReplicationPolicyFilter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicyFilter.
type ObjectReplicationPolicyProperties ¶
type ObjectReplicationPolicyProperties struct { // REQUIRED; Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false. DestinationAccount *string // REQUIRED; Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false. SourceAccount *string // The storage account object replication rules. Rules []*ObjectReplicationPolicyRule // READ-ONLY; Indicates when the policy is enabled on the source account. EnabledTime *time.Time // READ-ONLY; A unique id for object replication policy. PolicyID *string }
ObjectReplicationPolicyProperties - The Storage Account ObjectReplicationPolicy properties.
func (ObjectReplicationPolicyProperties) MarshalJSON ¶
func (o ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyProperties.
func (*ObjectReplicationPolicyProperties) UnmarshalJSON ¶
func (o *ObjectReplicationPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicyProperties.
type ObjectReplicationPolicyRule ¶
type ObjectReplicationPolicyRule struct { // REQUIRED; Required. Destination container name. DestinationContainer *string // REQUIRED; Required. Source container name. SourceContainer *string // Optional. An object that defines the filter set. Filters *ObjectReplicationPolicyFilter // Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. RuleID *string }
ObjectReplicationPolicyRule - The replication policy rule between two containers.
func (ObjectReplicationPolicyRule) MarshalJSON ¶ added in v1.1.0
func (o ObjectReplicationPolicyRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReplicationPolicyRule.
func (*ObjectReplicationPolicyRule) UnmarshalJSON ¶ added in v1.1.0
func (o *ObjectReplicationPolicyRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReplicationPolicyRule.
type ObjectType ¶
type ObjectType string
ObjectType - This is a required field. This field specifies the scope of the inventory created either at the blob or container level.
const ( ObjectTypeBlob ObjectType = "Blob" ObjectTypeContainer ObjectType = "Container" )
func PossibleObjectTypeValues ¶
func PossibleObjectTypeValues() []ObjectType
PossibleObjectTypeValues returns the possible values for the ObjectType const type.
type Operation ¶
type Operation struct { // Display metadata associated with the operation. Display *OperationDisplay // Operation name: {provider}/{resource}/{operation} Name *string // Properties of operation, include metric specifications. OperationProperties *OperationProperties // The origin of operations. Origin *string }
Operation - Storage REST API operation definition.
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // Description of the operation. Description *string // Type of operation: get, read, delete, etc. Operation *string // Service provider: Microsoft Storage. Provider *string // Resource on which the operation is performed etc. Resource *string }
OperationDisplay - Display metadata associated with the operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // List of Storage operations supported by the Storage resource provider. Value []*Operation }
OperationListResult - Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationProperties ¶
type OperationProperties struct { // One property of operation, include metric specifications. ServiceSpecification *ServiceSpecification }
OperationProperties - Properties of operation, include metric specifications.
func (OperationProperties) MarshalJSON ¶ added in v1.1.0
func (o OperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProperties.
func (*OperationProperties) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.6.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Storage Rest API operations.
Generated from API version 2023-05-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armstorage.OperationListResult{ // Value: []*armstorage.Operation{ // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates a storage account with the specified parameters or update the properties or tags or adds custom domain for the specified storage account."), // Operation: to.Ptr("Create/Update Storage Account"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/delete"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Deletes an existing storage account."), // Operation: to.Ptr("Delete Storage Account"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/listkeys/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Returns the access keys for the specified storage account."), // Operation: to.Ptr("List Storage Account Keys"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/regeneratekey/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Regenerates the access keys for the specified storage account."), // Operation: to.Ptr("Regenerate Storage Account Keys"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/checknameavailability/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Checks that account name is valid and is not in use."), // Operation: to.Ptr("Check Name Availability"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Name Availability"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Returns the list of storage accounts or gets the properties for the specified storage account."), // Operation: to.Ptr("List/Get Storage Account(s)"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/usages/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Returns the limit and the current usage count for resources in the specified subscription"), // Operation: to.Ptr("Get Subscription Usages"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Usage Metrics"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/listAccountSas/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Returns the Account SAS token for the specified storage account."), // Operation: to.Ptr("Returns Storage Account SAS Token"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Account SAS Token"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/listServiceSas/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Storage Service SAS Token"), // Operation: to.Ptr("Returns Storage Service SAS Token"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Returns the Service SAS token for the specified storage account."), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/locations/deleteVirtualNetworkOrSubnets/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Notifies Microsoft.Storage that virtual network or subnet is being deleted"), // Operation: to.Ptr("Delete virtual network or subnets notifications"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Location"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/operations/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Polls the status of an asynchronous operation."), // Operation: to.Ptr("Poll Asynchronous Operation"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Operations"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/register/action"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Registers the subscription for the storage resource provider and enables the creation of storage accounts."), // Operation: to.Ptr("Registers the Storage Resource Provider"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Resource Provider"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/skus/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Lists the Skus supported by Microsoft.Storage."), // Operation: to.Ptr("List Skus"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Skus"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/services/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Create/Update storage account diagnostic settings."), // Operation: to.Ptr("Create/Update Diagnostic Settings"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // Origin: to.Ptr("system"), // OperationProperties: &armstorage.OperationProperties{ // ServiceSpecification: &armstorage.ServiceSpecification{ // MetricSpecifications: []*armstorage.MetricSpecification{ // { // Name: to.Ptr("UsedCapacity"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("Account used capacity"), // DisplayName: to.Ptr("Used capacity"), // FillGapWithZero: to.Ptr(false), // ResourceIDDimensionNameOverride: to.Ptr("AccountResourceId"), // Unit: to.Ptr("Bytes"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource."), // Operation: to.Ptr("Read diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), // Operation: to.Ptr("Write diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Storage Accounts"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Blob service"), // }, // Origin: to.Ptr("system"), // OperationProperties: &armstorage.OperationProperties{ // ServiceSpecification: &armstorage.ServiceSpecification{ // MetricSpecifications: []*armstorage.MetricSpecification{ // { // Name: to.Ptr("BlobCapacity"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // Dimensions: []*armstorage.Dimension{ // { // Name: to.Ptr("BlobType"), // DisplayName: to.Ptr("Blob type"), // }}, // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Blob service in bytes."), // DisplayName: to.Ptr("Blob Capacity"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }, // { // Name: to.Ptr("BlobCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // Dimensions: []*armstorage.Dimension{ // { // Name: to.Ptr("BlobType"), // DisplayName: to.Ptr("Blob type"), // }}, // DisplayDescription: to.Ptr("The number of Blob in the storage account’s Blob service."), // DisplayName: to.Ptr("Blob Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("ContainerCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of containers in the storage account’s Blob service."), // DisplayName: to.Ptr("Blob Container Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("BlobProvisionedSize"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // Dimensions: []*armstorage.Dimension{ // { // Name: to.Ptr("BlobType"), // DisplayName: to.Ptr("Blob type"), // }}, // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s Blob service in bytes."), // DisplayName: to.Ptr("Blob Provisioned Size"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource."), // Operation: to.Ptr("Read diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Blob service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/blobServices/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), // Operation: to.Ptr("Write diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Blob service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Table service"), // }, // Origin: to.Ptr("system"), // OperationProperties: &armstorage.OperationProperties{ // ServiceSpecification: &armstorage.ServiceSpecification{ // MetricSpecifications: []*armstorage.MetricSpecification{ // { // Name: to.Ptr("TableCapacity"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Table service in bytes."), // DisplayName: to.Ptr("Table Capacity"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }, // { // Name: to.Ptr("TableCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of table in the storage account’s Table service."), // DisplayName: to.Ptr("Table Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("TableEntityCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of table entities in the storage account’s Table service."), // DisplayName: to.Ptr("Table Entity Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource."), // Operation: to.Ptr("Read diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Table service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), // Operation: to.Ptr("Write diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Table service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Queue service"), // }, // Origin: to.Ptr("system"), // OperationProperties: &armstorage.OperationProperties{ // ServiceSpecification: &armstorage.ServiceSpecification{ // MetricSpecifications: []*armstorage.MetricSpecification{ // { // Name: to.Ptr("QueueCapacity"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s Queue service in bytes."), // DisplayName: to.Ptr("Queue Capacity"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }, // { // Name: to.Ptr("QueueCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of queue in the storage account’s Queue service."), // DisplayName: to.Ptr("Queue Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("QueueMessageCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The approximate number of queue messages in the storage account’s Queue service."), // DisplayName: to.Ptr("Queue Message Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource."), // Operation: to.Ptr("Read diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Queue service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), // Operation: to.Ptr("Write diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("Queue service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Get list of Microsoft Storage Metrics definitions."), // Operation: to.Ptr("Get list of Microsoft Storage Metrics definitions"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("File service"), // }, // Origin: to.Ptr("system"), // OperationProperties: &armstorage.OperationProperties{ // ServiceSpecification: &armstorage.ServiceSpecification{ // MetricSpecifications: []*armstorage.MetricSpecification{ // { // Name: to.Ptr("FileCapacity"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The amount of storage used by the storage account’s File service in bytes."), // DisplayName: to.Ptr("File Capacity"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }, // { // Name: to.Ptr("FileProvisionedSize"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The amount of storage provisioned in the storage account’s File service in bytes."), // DisplayName: to.Ptr("File Provisioned Size"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Bytes"), // }, // { // Name: to.Ptr("FileCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of file in the storage account’s File service."), // DisplayName: to.Ptr("File Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("FileShareCount"), // AggregationType: to.Ptr("Average"), // Category: to.Ptr("Capacity"), // DisplayDescription: to.Ptr("The number of file shares in the storage account’s File service."), // DisplayName: to.Ptr("File Share Count"), // FillGapWithZero: to.Ptr(false), // Unit: to.Ptr("Count"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource."), // Operation: to.Ptr("Read diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("File service"), // }, // Origin: to.Ptr("system"), // }, // { // Name: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armstorage.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource."), // Operation: to.Ptr("Write diagnostic setting"), // Provider: to.Ptr("Microsoft Storage"), // Resource: to.Ptr("File service"), // }, // Origin: to.Ptr("system"), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of // results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PermissionScope ¶ added in v0.3.0
type PermissionScope struct { // REQUIRED; The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create // (c), Modify Ownership (o), and Modify Permissions (p). Permissions *string // REQUIRED; The name of resource, normally the container name or the file share name, used by the local user. ResourceName *string // REQUIRED; The service used by the local user, e.g. blob, file. Service *string }
func (PermissionScope) MarshalJSON ¶ added in v1.1.0
func (p PermissionScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PermissionScope.
func (*PermissionScope) UnmarshalJSON ¶ added in v1.1.0
func (p *PermissionScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PermissionScope.
type Permissions ¶
type Permissions string
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).
const ( PermissionsA Permissions = "a" PermissionsC Permissions = "c" PermissionsD Permissions = "d" PermissionsL Permissions = "l" PermissionsP Permissions = "p" PermissionsR Permissions = "r" PermissionsU Permissions = "u" PermissionsW Permissions = "w" )
func PossiblePermissionsValues ¶
func PossiblePermissionsValues() []Permissions
PossiblePermissionsValues returns the possible values for the Permissions const type.
type PostFailoverRedundancy ¶ added in v1.4.0
type PostFailoverRedundancy string
PostFailoverRedundancy - The redundancy type of the account after an account failover is performed.
const ( PostFailoverRedundancyStandardLRS PostFailoverRedundancy = "Standard_LRS" PostFailoverRedundancyStandardZRS PostFailoverRedundancy = "Standard_ZRS" )
func PossiblePostFailoverRedundancyValues ¶ added in v1.4.0
func PossiblePostFailoverRedundancyValues() []PostFailoverRedundancy
PossiblePostFailoverRedundancyValues returns the possible values for the PostFailoverRedundancy const type.
type PostPlannedFailoverRedundancy ¶ added in v1.4.0
type PostPlannedFailoverRedundancy string
PostPlannedFailoverRedundancy - The redundancy type of the account after a planned account failover is performed.
const ( PostPlannedFailoverRedundancyStandardGRS PostPlannedFailoverRedundancy = "Standard_GRS" PostPlannedFailoverRedundancyStandardGZRS PostPlannedFailoverRedundancy = "Standard_GZRS" PostPlannedFailoverRedundancyStandardRAGRS PostPlannedFailoverRedundancy = "Standard_RAGRS" PostPlannedFailoverRedundancyStandardRAGZRS PostPlannedFailoverRedundancy = "Standard_RAGZRS" )
func PossiblePostPlannedFailoverRedundancyValues ¶ added in v1.4.0
func PossiblePostPlannedFailoverRedundancyValues() []PostPlannedFailoverRedundancy
PossiblePostPlannedFailoverRedundancyValues returns the possible values for the PostPlannedFailoverRedundancy const type.
type PrivateEndpoint ¶
type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint ID *string }
PrivateEndpoint - The Private Endpoint resource.
func (PrivateEndpoint) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - The Private Endpoint Connection resource.
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections Value []*PrivateEndpointConnection }
PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // The resource of private end point. PrivateEndpoint *PrivateEndpoint // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState }
PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionProvisioningState ¶
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - The current provisioning state.
const ( PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) Delete ¶
func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error)
Delete - Deletes the specified private endpoint connection associated with the storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
- options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewPrivateEndpointConnectionsClient().Delete(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Gets the specified private endpoint connection associated with the storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "res6977", "sto2527", "{privateEndpointConnectionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armstorage.PrivateEndpointConnection{ // Name: to.Ptr("{privateEndpointConnectionName}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), // Properties: &armstorage.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armstorage.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), // }, // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionRequired: to.Ptr("None"), // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListPager ¶ added in v0.6.0
func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, accountName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
NewListPager - List all the private endpoint connections associated with the storage account.
Generated from API version 2023-05-01
- 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.
- options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("res6977", "sto2527", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResult = armstorage.PrivateEndpointConnectionListResult{ // Value: []*armstorage.PrivateEndpointConnection{ // { // Name: to.Ptr("{privateEndpointConnectionName}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), // Properties: &armstorage.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armstorage.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), // }, // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionRequired: to.Ptr("None"), // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("{privateEndpointConnectionName}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), // Properties: &armstorage.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armstorage.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02"), // }, // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionRequired: to.Ptr("None"), // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*PrivateEndpointConnectionsClient) Put ¶
func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error)
Put - Update the state of specified private endpoint connection associated with the storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
- properties - The private endpoint connection properties.
- options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Put(ctx, "res7687", "sto9699", "{privateEndpointConnectionName}", armstorage.PrivateEndpointConnection{ Properties: &armstorage.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ Description: to.Ptr("Auto-Approved"), Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armstorage.PrivateEndpointConnection{ // Name: to.Ptr("{privateEndpointConnectionName}"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}"), // Properties: &armstorage.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armstorage.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"), // }, // PrivateLinkServiceConnectionState: &armstorage.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionRequired: to.Ptr("None"), // Status: to.Ptr(armstorage.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armstorage.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
Output:
type PrivateEndpointConnectionsClientDeleteOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteOptions struct { }
PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListOptions struct { }
PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
type PrivateEndpointConnectionsClientListResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListResponse struct { // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.
type PrivateEndpointConnectionsClientPutOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientPutOptions struct { }
PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put method.
type PrivateEndpointConnectionsClientPutResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientPutResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnection }
PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.Put.
type PrivateEndpointServiceConnectionStatus ¶
type PrivateEndpointServiceConnectionStatus string
PrivateEndpointServiceConnectionStatus - The private endpoint connection status.
const ( PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" )
func PossiblePrivateEndpointServiceConnectionStatusValues ¶
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus
PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. RequiredZoneNames []*string // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) ListByStorageAccount ¶
func (client *PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, resourceGroupName string, accountName string, options *PrivateLinkResourcesClientListByStorageAccountOptions) (PrivateLinkResourcesClientListByStorageAccountResponse, error)
ListByStorageAccount - Gets the private link resources that need to be created for a storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().ListByStorageAccount(ctx, "res6977", "sto2527", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResourceListResult = armstorage.PrivateLinkResourceListResult{ // Value: []*armstorage.PrivateLinkResource{ // { // Name: to.Ptr("blob"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("blob"), // RequiredMembers: []*string{ // to.Ptr("blob")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.blob.core.windows.net")}, // }, // }, // { // Name: to.Ptr("blob_secondary"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob_secondary"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("blob_secondary"), // RequiredMembers: []*string{ // to.Ptr("blob_secondary")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.blob.core.windows.net")}, // }, // }, // { // Name: to.Ptr("table"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("table"), // RequiredMembers: []*string{ // to.Ptr("table")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.table.core.windows.net")}, // }, // }, // { // Name: to.Ptr("table_secondary"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table_secondary"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("table_secondary"), // RequiredMembers: []*string{ // to.Ptr("table_secondary")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.table.core.windows.net")}, // }, // }, // { // Name: to.Ptr("dfs"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("dfs"), // RequiredMembers: []*string{ // to.Ptr("dfs")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.dfs.core.windows.net")}, // }, // }, // { // Name: to.Ptr("dfs_secondary"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/privateLinkResources"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs_secondary"), // Properties: &armstorage.PrivateLinkResourceProperties{ // GroupID: to.Ptr("dfs_secondary"), // RequiredMembers: []*string{ // to.Ptr("dfs_secondary")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.dfs.core.windows.net")}, // }, // }}, // } }
Output:
type PrivateLinkResourcesClientListByStorageAccountOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientListByStorageAccountOptions struct { }
PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount method.
type PrivateLinkResourcesClientListByStorageAccountResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientListByStorageAccountResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByStorageAccountResponse contains the response from method PrivateLinkResourcesClient.ListByStorageAccount.
type PrivateLinkServiceConnectionState ¶
type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. ActionRequired *string // The reason for approval/rejection of the connection. Description *string // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus }
PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
func (PrivateLinkServiceConnectionState) MarshalJSON ¶ added in v1.1.0
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type ProtectedAppendWritesHistory ¶
type ProtectedAppendWritesHistory struct { // When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. // Only new blocks can be added and any existing blocks cannot be modified // or deleted. AllowProtectedAppendWritesAll *bool // READ-ONLY; Returns the date and time the tag was added. Timestamp *time.Time }
ProtectedAppendWritesHistory - Protected append writes history setting for the blob container with Legal holds.
func (ProtectedAppendWritesHistory) MarshalJSON ¶
func (p ProtectedAppendWritesHistory) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProtectedAppendWritesHistory.
func (*ProtectedAppendWritesHistory) UnmarshalJSON ¶
func (p *ProtectedAppendWritesHistory) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedAppendWritesHistory.
type ProtocolSettings ¶
type ProtocolSettings struct { // Setting for SMB protocol Smb *SmbSetting }
ProtocolSettings - Protocol settings for file service
func (ProtocolSettings) MarshalJSON ¶ added in v1.1.0
func (p ProtocolSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProtocolSettings.
func (*ProtocolSettings) UnmarshalJSON ¶ added in v1.1.0
func (p *ProtocolSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolSettings.
type ProvisioningIssue ¶ added in v1.6.0
type ProvisioningIssue struct { // Name of the issue Name *string // READ-ONLY; Properties of provisioning issue Properties *ProvisioningIssueProperties }
ProvisioningIssue - Describes provisioning issue for given NetworkSecurityPerimeterConfiguration
func (ProvisioningIssue) MarshalJSON ¶ added in v1.6.0
func (p ProvisioningIssue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue.
func (*ProvisioningIssue) UnmarshalJSON ¶ added in v1.6.0
func (p *ProvisioningIssue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssue.
type ProvisioningIssueProperties ¶ added in v1.6.0
type ProvisioningIssueProperties struct { // Description of the issue Description *string // Type of issue IssueType *IssueType // Severity of the issue. Severity *Severity }
ProvisioningIssueProperties - Properties of provisioning issue
func (ProvisioningIssueProperties) MarshalJSON ¶ added in v1.6.0
func (p ProvisioningIssueProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningIssueProperties.
func (*ProvisioningIssueProperties) UnmarshalJSON ¶ added in v1.6.0
func (p *ProvisioningIssueProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssueProperties.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Gets the status of the storage account at the time the operation was called.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateValidateSubscriptionQuotaBegin ProvisioningState = "ValidateSubscriptionQuotaBegin" ProvisioningStateValidateSubscriptionQuotaEnd ProvisioningState = "ValidateSubscriptionQuotaEnd" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type ProxyResourceAutoGenerated ¶ added in v1.6.0
type ProxyResourceAutoGenerated struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResourceAutoGenerated - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResourceAutoGenerated) MarshalJSON ¶ added in v1.6.0
func (p ProxyResourceAutoGenerated) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResourceAutoGenerated.
func (*ProxyResourceAutoGenerated) UnmarshalJSON ¶ added in v1.6.0
func (p *ProxyResourceAutoGenerated) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceAutoGenerated.
type PublicAccess ¶
type PublicAccess string
PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access.
const ( PublicAccessBlob PublicAccess = "Blob" PublicAccessContainer PublicAccess = "Container" PublicAccessNone PublicAccess = "None" )
func PossiblePublicAccessValues ¶
func PossiblePublicAccessValues() []PublicAccess
PossiblePublicAccessValues returns the possible values for the PublicAccess const type.
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" )
func PossiblePublicNetworkAccessValues ¶
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type Queue ¶ added in v0.3.0
type Queue struct { // Queue resource properties. QueueProperties *QueueProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
func (Queue) MarshalJSON ¶ added in v0.3.0
MarshalJSON implements the json.Marshaller interface for type Queue.
func (*Queue) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Queue.
type QueueClient ¶
type QueueClient struct {
// contains filtered or unexported fields
}
QueueClient contains the methods for the Queue group. Don't use this type directly, use NewQueueClient() instead.
func NewQueueClient ¶
func NewQueueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QueueClient, error)
NewQueueClient creates a new instance of QueueClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*QueueClient) Create ¶
func (client *QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientCreateOptions) (QueueClientCreateResponse, error)
Create - Creates a new queue with the specified queue name, under the specified account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- queueName - A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
- queue - Queue properties and metadata to be created with
- options - QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method.
Example (QueueOperationPut) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueClient().Create(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Queue = armstorage.Queue{ // Name: to.Ptr("queue6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), // } }
Output:
Example (QueueOperationPutWithMetadata) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPutWithMetadata.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueClient().Create(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{ QueueProperties: &armstorage.QueueProperties{ Metadata: map[string]*string{ "sample1": to.Ptr("meta1"), "sample2": to.Ptr("meta2"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Queue = armstorage.Queue{ // Name: to.Ptr("queue6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), // QueueProperties: &armstorage.QueueProperties{ // Metadata: map[string]*string{ // "sample1": to.Ptr("meta1"), // "sample2": to.Ptr("meta2"), // }, // }, // } }
Output:
func (*QueueClient) Delete ¶
func (client *QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientDeleteOptions) (QueueClientDeleteResponse, error)
Delete - Deletes the queue with the specified queue name, under the specified account if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- queueName - A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
- options - QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewQueueClient().Delete(ctx, "res3376", "sto328", "queue6185", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*QueueClient) Get ¶
func (client *QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, queueName string, options *QueueClientGetOptions) (QueueClientGetResponse, error)
Get - Gets the queue with the specified queue name, under the specified account if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- queueName - A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
- options - QueueClientGetOptions contains the optional parameters for the QueueClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueClient().Get(ctx, "res3376", "sto328", "queue6185", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Queue = armstorage.Queue{ // Name: to.Ptr("queue6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), // QueueProperties: &armstorage.QueueProperties{ // Metadata: map[string]*string{ // "sample1": to.Ptr("meta1"), // "sample2": to.Ptr("meta2"), // }, // }, // } }
Output:
func (*QueueClient) NewListPager ¶ added in v0.6.0
func (client *QueueClient) NewListPager(resourceGroupName string, accountName string, options *QueueClientListOptions) *runtime.Pager[QueueClientListResponse]
NewListPager - Gets a list of all the queues under the specified storage account
Generated from API version 2023-05-01
- 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.
- options - QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewQueueClient().NewListPager("res9290", "sto328", &armstorage.QueueClientListOptions{Maxpagesize: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListQueueResource = armstorage.ListQueueResource{ // Value: []*armstorage.ListQueue{ // { // Name: to.Ptr("queue6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), // QueueProperties: &armstorage.ListQueueProperties{ // Metadata: map[string]*string{ // "sample1": to.Ptr("meta1"), // "sample2": to.Ptr("meta2"), // }, // }, // }, // { // Name: to.Ptr("queue6186"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6186"), // QueueProperties: &armstorage.ListQueueProperties{ // Metadata: map[string]*string{ // "sample1": to.Ptr("meta1"), // "sample2": to.Ptr("meta2"), // }, // }, // }}, // } } }
Output:
func (*QueueClient) Update ¶
func (client *QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue, options *QueueClientUpdateOptions) (QueueClientUpdateResponse, error)
Update - Creates a new queue with the specified queue name, under the specified account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- queueName - A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
- queue - Queue properties and metadata to be created with
- options - QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueClient().Update(ctx, "res3376", "sto328", "queue6185", armstorage.Queue{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Queue = armstorage.Queue{ // Name: to.Ptr("queue6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices/queues"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185"), // } }
Output:
type QueueClientCreateOptions ¶ added in v0.3.0
type QueueClientCreateOptions struct { }
QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method.
type QueueClientCreateResponse ¶ added in v0.3.0
type QueueClientCreateResponse struct {
Queue
}
QueueClientCreateResponse contains the response from method QueueClient.Create.
type QueueClientDeleteOptions ¶ added in v0.3.0
type QueueClientDeleteOptions struct { }
QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method.
type QueueClientDeleteResponse ¶ added in v0.3.0
type QueueClientDeleteResponse struct { }
QueueClientDeleteResponse contains the response from method QueueClient.Delete.
type QueueClientGetOptions ¶ added in v0.3.0
type QueueClientGetOptions struct { }
QueueClientGetOptions contains the optional parameters for the QueueClient.Get method.
type QueueClientGetResponse ¶ added in v0.3.0
type QueueClientGetResponse struct {
Queue
}
QueueClientGetResponse contains the response from method QueueClient.Get.
type QueueClientListOptions ¶ added in v0.3.0
type QueueClientListOptions struct { // Optional, When specified, only the queues with a name starting with the given filter will be listed. Filter *string // Optional, a maximum number of queues that should be included in a list queue response Maxpagesize *string }
QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method.
type QueueClientListResponse ¶ added in v0.3.0
type QueueClientListResponse struct { // Response schema. Contains list of queues returned ListQueueResource }
QueueClientListResponse contains the response from method QueueClient.NewListPager.
type QueueClientUpdateOptions ¶ added in v0.3.0
type QueueClientUpdateOptions struct { }
QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method.
type QueueClientUpdateResponse ¶ added in v0.3.0
type QueueClientUpdateResponse struct {
Queue
}
QueueClientUpdateResponse contains the response from method QueueClient.Update.
type QueueProperties ¶
type QueueProperties struct { // A name-value pair that represents queue metadata. Metadata map[string]*string // READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual // number of messages in the queue, but could be higher. ApproximateMessageCount *int32 }
func (QueueProperties) MarshalJSON ¶
func (q QueueProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueueProperties.
func (*QueueProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueueProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueueProperties.
type QueueServiceProperties ¶
type QueueServiceProperties struct { // The properties of a storage account’s Queue service. QueueServiceProperties *QueueServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
QueueServiceProperties - The properties of a storage account’s Queue service.
func (QueueServiceProperties) MarshalJSON ¶
func (q QueueServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueueServiceProperties.
func (*QueueServiceProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueueServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueueServiceProperties.
type QueueServicePropertiesProperties ¶
type QueueServicePropertiesProperties struct { // Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Queue service. Cors *CorsRules }
QueueServicePropertiesProperties - The properties of a storage account’s Queue service.
func (QueueServicePropertiesProperties) MarshalJSON ¶ added in v1.1.0
func (q QueueServicePropertiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueueServicePropertiesProperties.
func (*QueueServicePropertiesProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueueServicePropertiesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueueServicePropertiesProperties.
type QueueServicesClient ¶
type QueueServicesClient struct {
// contains filtered or unexported fields
}
QueueServicesClient contains the methods for the QueueServices group. Don't use this type directly, use NewQueueServicesClient() instead.
func NewQueueServicesClient ¶
func NewQueueServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QueueServicesClient, error)
NewQueueServicesClient creates a new instance of QueueServicesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*QueueServicesClient) GetServiceProperties ¶
func (client *QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientGetServicePropertiesOptions) (QueueServicesClientGetServicePropertiesResponse, error)
GetServiceProperties - Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.QueueServiceProperties = armstorage.QueueServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // } }
Output:
func (*QueueServicesClient) List ¶
func (client *QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *QueueServicesClientListOptions) (QueueServicesClientListResponse, error)
List - List all queue services for the storage account If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueServicesClient().List(ctx, "res9290", "sto1590", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ListQueueServices = armstorage.ListQueueServices{ // Value: []*armstorage.QueueServiceProperties{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // }}, // } }
Output:
func (*QueueServicesClient) SetServiceProperties ¶
func (client *QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties, options *QueueServicesClientSetServicePropertiesOptions) (QueueServicesClientSetServicePropertiesResponse, error)
SetServiceProperties - Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 properties of a storage account’s Queue service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified.
- options - QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewQueueServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.QueueServiceProperties{ QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ Cors: &armstorage.CorsRules{ CorsRules: []*armstorage.CorsRule{ { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.contoso.com"), to.Ptr("http://www.fabrikam.com")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-*")}, MaxAgeInSeconds: to.Ptr[int32](100), }, { AllowedHeaders: []*string{ to.Ptr("*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, AllowedOrigins: []*string{ to.Ptr("*")}, ExposedHeaders: []*string{ to.Ptr("*")}, MaxAgeInSeconds: to.Ptr[int32](2), }, { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-12345675754564*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.abc23.com"), to.Ptr("https://www.fabrikam.com/*")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, MaxAgeInSeconds: to.Ptr[int32](2000), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.QueueServiceProperties = armstorage.QueueServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/queueServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default"), // QueueServiceProperties: &armstorage.QueueServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // } }
Output:
type QueueServicesClientGetServicePropertiesOptions ¶ added in v0.3.0
type QueueServicesClientGetServicePropertiesOptions struct { }
QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties method.
type QueueServicesClientGetServicePropertiesResponse ¶ added in v0.3.0
type QueueServicesClientGetServicePropertiesResponse struct { // The properties of a storage account’s Queue service. QueueServiceProperties }
QueueServicesClientGetServicePropertiesResponse contains the response from method QueueServicesClient.GetServiceProperties.
type QueueServicesClientListOptions ¶ added in v0.3.0
type QueueServicesClientListOptions struct { }
QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method.
type QueueServicesClientListResponse ¶ added in v0.3.0
type QueueServicesClientListResponse struct {
ListQueueServices
}
QueueServicesClientListResponse contains the response from method QueueServicesClient.List.
type QueueServicesClientSetServicePropertiesOptions ¶ added in v0.3.0
type QueueServicesClientSetServicePropertiesOptions struct { }
QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties method.
type QueueServicesClientSetServicePropertiesResponse ¶ added in v0.3.0
type QueueServicesClientSetServicePropertiesResponse struct { // The properties of a storage account’s Queue service. QueueServiceProperties }
QueueServicesClientSetServicePropertiesResponse contains the response from method QueueServicesClient.SetServiceProperties.
type Reason ¶
type Reason string
Reason - Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.
func PossibleReasonValues ¶
func PossibleReasonValues() []Reason
PossibleReasonValues returns the possible values for the Reason const type.
type ReasonCode ¶
type ReasonCode string
ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC.
const ( ReasonCodeNotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" ReasonCodeQuotaID ReasonCode = "QuotaId" )
func PossibleReasonCodeValues ¶
func PossibleReasonCodeValues() []ReasonCode
PossibleReasonCodeValues returns the possible values for the ReasonCode const type.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceAccessRule ¶
ResourceAccessRule - Resource Access Rule.
func (ResourceAccessRule) MarshalJSON ¶ added in v1.1.0
func (r ResourceAccessRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceAccessRule.
func (*ResourceAccessRule) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceAccessRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAccessRule.
type ResourceAssociationAccessMode ¶ added in v1.6.0
type ResourceAssociationAccessMode string
ResourceAssociationAccessMode - Access Mode of the resource association
const ( ResourceAssociationAccessModeAudit ResourceAssociationAccessMode = "Audit" ResourceAssociationAccessModeEnforced ResourceAssociationAccessMode = "Enforced" ResourceAssociationAccessModeLearning ResourceAssociationAccessMode = "Learning" )
func PossibleResourceAssociationAccessModeValues ¶ added in v1.6.0
func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode
PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type.
type ResourceAutoGenerated ¶ added in v1.6.0
type ResourceAutoGenerated struct { // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ResourceAutoGenerated - Common fields that are returned in the response for all Azure Resource Manager resources
func (ResourceAutoGenerated) MarshalJSON ¶ added in v1.6.0
func (r ResourceAutoGenerated) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceAutoGenerated.
func (*ResourceAutoGenerated) UnmarshalJSON ¶ added in v1.6.0
func (r *ResourceAutoGenerated) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAutoGenerated.
type RestorePolicyProperties ¶
type RestorePolicyProperties struct { // REQUIRED; Blob restore is enabled if set to true. Enabled *bool // how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. Days *int32 // READ-ONLY; Deprecated in favor of minRestoreTime property. LastEnabledTime *time.Time // READ-ONLY; Returns the minimum date and time that the restore can be started. MinRestoreTime *time.Time }
RestorePolicyProperties - The blob service properties for blob restore policy
func (RestorePolicyProperties) MarshalJSON ¶
func (r RestorePolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorePolicyProperties.
func (*RestorePolicyProperties) UnmarshalJSON ¶
func (r *RestorePolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorePolicyProperties.
type Restriction ¶
type Restriction struct { // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when // the SKU has requiredQuotas parameter as the subscription does not belong to that // quota. The "NotAvailableForSubscription" is related to capacity at DC. ReasonCode *ReasonCode // READ-ONLY; The type of restrictions. As of now only possible value for this is location. Type *string // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where // the SKU is restricted. Values []*string }
Restriction - The restriction because of which SKU cannot be used.
func (Restriction) MarshalJSON ¶
func (r Restriction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Restriction.
func (*Restriction) UnmarshalJSON ¶ added in v1.1.0
func (r *Restriction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Restriction.
type RootSquashType ¶
type RootSquashType string
RootSquashType - The property is for NFS share only. The default is NoRootSquash.
const ( RootSquashTypeAllSquash RootSquashType = "AllSquash" RootSquashTypeNoRootSquash RootSquashType = "NoRootSquash" RootSquashTypeRootSquash RootSquashType = "RootSquash" )
func PossibleRootSquashTypeValues ¶
func PossibleRootSquashTypeValues() []RootSquashType
PossibleRootSquashTypeValues returns the possible values for the RootSquashType const type.
type RoutingChoice ¶
type RoutingChoice string
RoutingChoice - Routing Choice defines the kind of network routing opted by the user.
const ( RoutingChoiceInternetRouting RoutingChoice = "InternetRouting" RoutingChoiceMicrosoftRouting RoutingChoice = "MicrosoftRouting" )
func PossibleRoutingChoiceValues ¶
func PossibleRoutingChoiceValues() []RoutingChoice
PossibleRoutingChoiceValues returns the possible values for the RoutingChoice const type.
type RoutingPreference ¶
type RoutingPreference struct { // A boolean flag which indicates whether internet routing storage endpoints are to be published PublishInternetEndpoints *bool // A boolean flag which indicates whether microsoft routing storage endpoints are to be published PublishMicrosoftEndpoints *bool // Routing Choice defines the kind of network routing opted by the user. RoutingChoice *RoutingChoice }
RoutingPreference - Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user data, the default option is microsoft routing
func (RoutingPreference) MarshalJSON ¶ added in v1.1.0
func (r RoutingPreference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingPreference.
func (*RoutingPreference) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingPreference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingPreference.
type RuleType ¶
type RuleType string
RuleType - The valid value is Lifecycle
const (
RuleTypeLifecycle RuleType = "Lifecycle"
)
func PossibleRuleTypeValues ¶
func PossibleRuleTypeValues() []RuleType
PossibleRuleTypeValues returns the possible values for the RuleType const type.
type RunResult ¶ added in v1.6.0
type RunResult string
RunResult - Represents the overall result of the execution for the run instance
func PossibleRunResultValues ¶ added in v1.6.0
func PossibleRunResultValues() []RunResult
PossibleRunResultValues returns the possible values for the RunResult const type.
type RunStatusEnum ¶ added in v1.6.0
type RunStatusEnum string
RunStatusEnum - Represents the status of the execution.
const ( RunStatusEnumFinished RunStatusEnum = "Finished" RunStatusEnumInProgress RunStatusEnum = "InProgress" )
func PossibleRunStatusEnumValues ¶ added in v1.6.0
func PossibleRunStatusEnumValues() []RunStatusEnum
PossibleRunStatusEnumValues returns the possible values for the RunStatusEnum const type.
type SKU ¶
type SKU struct { // REQUIRED; The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called // accountType. Name *SKUName // READ-ONLY; The SKU tier. This is based on the SKU name. Tier *SKUTier }
SKU - The SKU of the storage account.
func (SKU) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUCapability ¶
type SKUCapability struct { // READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network // ACLs, change notification, etc. Name *string // READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. Value *string }
SKUCapability - The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.
func (SKUCapability) MarshalJSON ¶ added in v1.1.0
func (s SKUCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUCapability.
func (*SKUCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.
type SKUConversionStatus ¶ added in v0.5.0
type SKUConversionStatus string
SKUConversionStatus - This property indicates the current sku conversion status.
const ( SKUConversionStatusFailed SKUConversionStatus = "Failed" SKUConversionStatusInProgress SKUConversionStatus = "InProgress" SKUConversionStatusSucceeded SKUConversionStatus = "Succeeded" )
func PossibleSKUConversionStatusValues ¶ added in v0.5.0
func PossibleSKUConversionStatusValues() []SKUConversionStatus
PossibleSKUConversionStatusValues returns the possible values for the SKUConversionStatus const type.
type SKUInformation ¶
type SKUInformation struct { // REQUIRED; The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called // accountType. Name *SKUName // The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. Restrictions []*Restriction // READ-ONLY; The capability information in the specified SKU, including file encryption, network ACLs, change notification, // etc. Capabilities []*SKUCapability // READ-ONLY; Indicates the type of storage account. Kind *Kind // READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. // West US, East US, Southeast Asia, etc.). Locations []*string // READ-ONLY; The type of the resource, usually it is 'storageAccounts'. ResourceType *string // READ-ONLY; The SKU tier. This is based on the SKU name. Tier *SKUTier }
SKUInformation - Storage SKU and its properties
func (SKUInformation) MarshalJSON ¶
func (s SKUInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUInformation.
func (*SKUInformation) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUInformation.
type SKUListResult ¶ added in v0.3.0
type SKUListResult struct { // READ-ONLY; Get the list result of storage SKUs and their properties. Value []*SKUInformation }
SKUListResult - The response from the List Storage SKUs operation.
func (SKUListResult) MarshalJSON ¶ added in v0.3.0
func (s SKUListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUListResult.
func (*SKUListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUListResult.
type SKUName ¶
type SKUName string
SKUName - The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.
const ( SKUNamePremiumLRS SKUName = "Premium_LRS" SKUNamePremiumZRS SKUName = "Premium_ZRS" SKUNameStandardGRS SKUName = "Standard_GRS" SKUNameStandardGZRS SKUName = "Standard_GZRS" SKUNameStandardLRS SKUName = "Standard_LRS" SKUNameStandardRAGRS SKUName = "Standard_RAGRS" SKUNameStandardRAGZRS SKUName = "Standard_RAGZRS" SKUNameStandardZRS SKUName = "Standard_ZRS" )
func PossibleSKUNameValues ¶
func PossibleSKUNameValues() []SKUName
PossibleSKUNameValues returns the possible values for the SKUName const type.
type SKUTier ¶
type SKUTier string
SKUTier - The SKU tier. This is based on the SKU name.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type SKUsClient ¶
type SKUsClient struct {
// contains filtered or unexported fields
}
SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.
func NewSKUsClient ¶
func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)
NewSKUsClient creates a new instance of SKUsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SKUsClient) NewListPager ¶ added in v0.6.0
func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]
NewListPager - Lists the available SKUs supported by Microsoft.Storage for given subscription.
Generated from API version 2023-05-01
- options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSKUsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SKUListResult = armstorage.SKUListResult{ // Value: []*armstorage.SKUInformation{ // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2(stage)")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southeastasia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japaneast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("japanwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("northeurope")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("brazilsouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("australiasoutheast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("southindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centralindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westindia")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadaeast")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("canadacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westus2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("westcentralus")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("ukwest")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreacentral")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("koreasouth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uknorth")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("uksouth2")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("eastus2euap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardZRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNamePremiumLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierPremium), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardLRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportsarchivepreview"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("true"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }, // { // Name: to.Ptr(armstorage.SKUNameStandardRAGRS), // Capabilities: []*armstorage.SKUCapability{ // { // Name: to.Ptr("supportschangenotification"), // Value: to.Ptr("true"), // }, // { // Name: to.Ptr("supportsfileencryption"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportshoeboxcapacitymetrics"), // Value: to.Ptr("false"), // }, // { // Name: to.Ptr("supportsnetworkacls"), // Value: to.Ptr("false"), // }}, // Kind: to.Ptr(armstorage.KindBlobStorage), // Locations: []*string{ // to.Ptr("centraluseuap")}, // ResourceType: to.Ptr("storageAccounts"), // Restrictions: []*armstorage.Restriction{ // }, // Tier: to.Ptr(armstorage.SKUTierStandard), // }}, // } } }
Output:
type SKUsClientListOptions ¶ added in v0.3.0
type SKUsClientListOptions struct { }
SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
type SKUsClientListResponse ¶ added in v0.3.0
type SKUsClientListResponse struct { // The response from the List Storage SKUs operation. SKUListResult }
SKUsClientListResponse contains the response from method SKUsClient.NewListPager.
type SSHPublicKey ¶ added in v0.3.0
type SSHPublicKey struct { // Optional. It is used to store the function/usage of the key Description *string // Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB Key *string }
func (SSHPublicKey) MarshalJSON ¶ added in v1.1.0
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶ added in v1.1.0
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type SasPolicy ¶
type SasPolicy struct { // REQUIRED; The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. // The 'Log' action can be used for audit purposes and the 'Block' action can be used to block // and deny the usage of SAS tokens that do not adhere to the sas policy expiration period. ExpirationAction *ExpirationAction // REQUIRED; The SAS expiration period, DD.HH:MM:SS. SasExpirationPeriod *string }
SasPolicy assigned to the storage account.
func (SasPolicy) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SasPolicy.
func (*SasPolicy) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SasPolicy.
type Schedule ¶
type Schedule string
Schedule - This is a required field. This field is used to schedule an inventory formation.
func PossibleScheduleValues ¶
func PossibleScheduleValues() []Schedule
PossibleScheduleValues returns the possible values for the Schedule const type.
type ServiceSasParameters ¶
type ServiceSasParameters struct { // REQUIRED; The canonical path to the signed resource. CanonicalizedResource *string // The response header override for cache control. CacheControl *string // The response header override for content disposition. ContentDisposition *string // The response header override for content encoding. ContentEncoding *string // The response header override for content language. ContentLanguage *string // The response header override for content type. ContentType *string // An IP address or a range of IP addresses from which to accept requests. IPAddressOrRange *string // A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or // table. Identifier *string // The key to sign the account SAS token with. KeyToSign *string // The end of partition key. PartitionKeyEnd *string // The start of partition key. PartitionKeyStart *string // 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). Permissions *Permissions // The protocol permitted for a request made with the account SAS. Protocols *HTTPProtocol // The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share // (s). Resource *SignedResource // The end of row key. RowKeyEnd *string // The start of row key. RowKeyStart *string SharedAccessExpiryTime *time.Time SharedAccessStartTime *time.Time }
ServiceSasParameters - The parameters to list service SAS credentials of a specific resource.
func (ServiceSasParameters) MarshalJSON ¶
func (s ServiceSasParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceSasParameters.
func (*ServiceSasParameters) UnmarshalJSON ¶
func (s *ServiceSasParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSasParameters.
type ServiceSpecification ¶
type ServiceSpecification struct { // Metric specifications of operation. MetricSpecifications []*MetricSpecification }
ServiceSpecification - One property of operation, include metric specifications.
func (ServiceSpecification) MarshalJSON ¶
func (s ServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.
func (*ServiceSpecification) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.
type Services ¶
type Services string
Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).
func PossibleServicesValues ¶
func PossibleServicesValues() []Services
PossibleServicesValues returns the possible values for the Services const type.
type Severity ¶ added in v1.6.0
type Severity string
Severity - Severity of the issue.
func PossibleSeverityValues ¶ added in v1.6.0
func PossibleSeverityValues() []Severity
PossibleSeverityValues returns the possible values for the Severity const type.
type ShareAccessTier ¶
type ShareAccessTier string
ShareAccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
const ()
func PossibleShareAccessTierValues ¶
func PossibleShareAccessTierValues() []ShareAccessTier
PossibleShareAccessTierValues returns the possible values for the ShareAccessTier const type.
type SignedIdentifier ¶
type SignedIdentifier struct { // Access policy AccessPolicy *AccessPolicy // An unique identifier of the stored access policy. ID *string }
func (SignedIdentifier) MarshalJSON ¶ added in v1.1.0
func (s SignedIdentifier) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SignedIdentifier.
func (*SignedIdentifier) UnmarshalJSON ¶ added in v1.1.0
func (s *SignedIdentifier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SignedIdentifier.
type SignedResource ¶
type SignedResource string
SignedResource - The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).
const ( SignedResourceB SignedResource = "b" SignedResourceC SignedResource = "c" SignedResourceF SignedResource = "f" SignedResourceS SignedResource = "s" )
func PossibleSignedResourceValues ¶
func PossibleSignedResourceValues() []SignedResource
PossibleSignedResourceValues returns the possible values for the SignedResource const type.
type SignedResourceTypes ¶
type SignedResourceTypes string
SignedResourceTypes - 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.
const ( SignedResourceTypesC SignedResourceTypes = "c" SignedResourceTypesO SignedResourceTypes = "o" SignedResourceTypesS SignedResourceTypes = "s" )
func PossibleSignedResourceTypesValues ¶
func PossibleSignedResourceTypesValues() []SignedResourceTypes
PossibleSignedResourceTypesValues returns the possible values for the SignedResourceTypes const type.
type SmbSetting ¶
type SmbSetting struct { // SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter // ';'. AuthenticationMethods *string // SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as // a string with delimiter ';'. ChannelEncryption *string // Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter // ';' KerberosTicketEncryption *string // Multichannel setting. Applies to Premium FileStorage only. Multichannel *Multichannel // SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with // delimiter ';'. Versions *string }
SmbSetting - Setting for SMB protocol
func (SmbSetting) MarshalJSON ¶ added in v1.1.0
func (s SmbSetting) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SmbSetting.
func (*SmbSetting) UnmarshalJSON ¶ added in v1.1.0
func (s *SmbSetting) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SmbSetting.
type State ¶
type State string
State - Gets the state of virtual network rule.
func PossibleStateValues ¶
func PossibleStateValues() []State
PossibleStateValues returns the possible values for the State const type.
type StorageAccountExpand ¶
type StorageAccountExpand string
const ( StorageAccountExpandBlobRestoreStatus StorageAccountExpand = "blobRestoreStatus" StorageAccountExpandGeoReplicationStats StorageAccountExpand = "geoReplicationStats" )
func PossibleStorageAccountExpandValues ¶
func PossibleStorageAccountExpandValues() []StorageAccountExpand
PossibleStorageAccountExpandValues returns the possible values for the StorageAccountExpand const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type Table ¶
type Table struct { // Table resource properties. TableProperties *TableProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Table - Properties of the table, including Id, resource name, resource type.
func (Table) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Table.
func (*Table) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Table.
type TableAccessPolicy ¶ added in v0.5.0
type TableAccessPolicy struct { // REQUIRED; Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' Permission *string // Expiry time of the access policy ExpiryTime *time.Time // Start time of the access policy StartTime *time.Time }
TableAccessPolicy - Table Access Policy Properties Object.
func (TableAccessPolicy) MarshalJSON ¶ added in v0.5.0
func (t TableAccessPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableAccessPolicy.
func (*TableAccessPolicy) UnmarshalJSON ¶ added in v0.5.0
func (t *TableAccessPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableAccessPolicy.
type TableClient ¶
type TableClient struct {
// contains filtered or unexported fields
}
TableClient contains the methods for the Table group. Don't use this type directly, use NewTableClient() instead.
func NewTableClient ¶
func NewTableClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableClient, error)
NewTableClient creates a new instance of TableClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TableClient) Create ¶
func (client *TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientCreateOptions) (TableClientCreateResponse, error)
Create - Creates a new table with the specified table name, under the specified account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- tableName - A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
- options - TableClientCreateOptions contains the optional parameters for the TableClient.Create method.
Example (TableOperationPut) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableClient().Create(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientCreateOptions{Parameters: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Table = armstorage.Table{ // Name: to.Ptr("table6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), // TableProperties: &armstorage.TableProperties{ // TableName: to.Ptr("table6185"), // }, // } }
Output:
Example (TableOperationPutOrPatchAcls) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableClient().Create(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientCreateOptions{Parameters: &armstorage.Table{ TableProperties: &armstorage.TableProperties{ SignedIdentifiers: []*armstorage.TableSignedIdentifier{ { AccessPolicy: &armstorage.TableAccessPolicy{ ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.000Z"); return t }()), Permission: to.Ptr("raud"), StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); return t }()), }, ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), }, { AccessPolicy: &armstorage.TableAccessPolicy{ ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.000Z"); return t }()), Permission: to.Ptr("rad"), StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); return t }()), }, ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), }}, }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Table = armstorage.Table{ // Name: to.Ptr("table6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), // TableProperties: &armstorage.TableProperties{ // SignedIdentifiers: []*armstorage.TableSignedIdentifier{ // { // AccessPolicy: &armstorage.TableAccessPolicy{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.000Z"); return t}()), // Permission: to.Ptr("raud"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); return t}()), // }, // ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"), // }, // { // AccessPolicy: &armstorage.TableAccessPolicy{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-20T08:49:37.000Z"); return t}()), // Permission: to.Ptr("rad"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-17T08:49:37.000Z"); return t}()), // }, // ID: to.Ptr("PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"), // }}, // TableName: to.Ptr("table6185"), // }, // } }
Output:
func (*TableClient) Delete ¶
func (client *TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientDeleteOptions) (TableClientDeleteResponse, error)
Delete - Deletes the table with the specified table name, under the specified account if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- tableName - A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
- options - TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewTableClient().Delete(ctx, "res3376", "sto328", "table6185", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*TableClient) Get ¶
func (client *TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientGetOptions) (TableClientGetResponse, error)
Get - Gets the table with the specified table name, under the specified account if it exists. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- tableName - A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
- options - TableClientGetOptions contains the optional parameters for the TableClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableClient().Get(ctx, "res3376", "sto328", "table6185", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Table = armstorage.Table{ // Name: to.Ptr("table6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), // TableProperties: &armstorage.TableProperties{ // TableName: to.Ptr("table6185"), // }, // } }
Output:
func (*TableClient) NewListPager ¶ added in v0.6.0
func (client *TableClient) NewListPager(resourceGroupName string, accountName string, options *TableClientListOptions) *runtime.Pager[TableClientListResponse]
NewListPager - Gets a list of all the tables under the specified storage account
Generated from API version 2023-05-01
- 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.
- options - TableClientListOptions contains the optional parameters for the TableClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTableClient().NewListPager("res9290", "sto328", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListTableResource = armstorage.ListTableResource{ // Value: []*armstorage.Table{ // { // Name: to.Ptr("table6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), // TableProperties: &armstorage.TableProperties{ // TableName: to.Ptr("table6185"), // }, // }, // { // Name: to.Ptr("table6186"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6186"), // TableProperties: &armstorage.TableProperties{ // TableName: to.Ptr("table6186"), // }, // }}, // } } }
Output:
func (*TableClient) Update ¶
func (client *TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableClientUpdateOptions) (TableClientUpdateResponse, error)
Update - Creates a new table with the specified table name, under the specified account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- tableName - A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
- options - TableClientUpdateOptions contains the optional parameters for the TableClient.Update method.
Example (TableOperationPatch) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableClient().Update(ctx, "res3376", "sto328", "table6185", &armstorage.TableClientUpdateOptions{Parameters: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Table = armstorage.Table{ // Name: to.Ptr("table6185"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices/tables"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185"), // TableProperties: &armstorage.TableProperties{ // TableName: to.Ptr("table6185"), // }, // } }
Output:
type TableClientCreateOptions ¶ added in v0.3.0
type TableClientCreateOptions struct { // The parameters to provide to create a table. Parameters *Table }
TableClientCreateOptions contains the optional parameters for the TableClient.Create method.
type TableClientCreateResponse ¶ added in v0.3.0
type TableClientCreateResponse struct { // Properties of the table, including Id, resource name, resource type. Table }
TableClientCreateResponse contains the response from method TableClient.Create.
type TableClientDeleteOptions ¶ added in v0.3.0
type TableClientDeleteOptions struct { }
TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method.
type TableClientDeleteResponse ¶ added in v0.3.0
type TableClientDeleteResponse struct { }
TableClientDeleteResponse contains the response from method TableClient.Delete.
type TableClientGetOptions ¶ added in v0.3.0
type TableClientGetOptions struct { }
TableClientGetOptions contains the optional parameters for the TableClient.Get method.
type TableClientGetResponse ¶ added in v0.3.0
type TableClientGetResponse struct { // Properties of the table, including Id, resource name, resource type. Table }
TableClientGetResponse contains the response from method TableClient.Get.
type TableClientListOptions ¶ added in v0.3.0
type TableClientListOptions struct { }
TableClientListOptions contains the optional parameters for the TableClient.NewListPager method.
type TableClientListResponse ¶ added in v0.3.0
type TableClientListResponse struct { // Response schema. Contains list of tables returned ListTableResource }
TableClientListResponse contains the response from method TableClient.NewListPager.
type TableClientUpdateOptions ¶ added in v0.3.0
type TableClientUpdateOptions struct { // The parameters to provide to create a table. Parameters *Table }
TableClientUpdateOptions contains the optional parameters for the TableClient.Update method.
type TableClientUpdateResponse ¶ added in v0.3.0
type TableClientUpdateResponse struct { // Properties of the table, including Id, resource name, resource type. Table }
TableClientUpdateResponse contains the response from method TableClient.Update.
type TableProperties ¶
type TableProperties struct { // List of stored access policies specified on the table. SignedIdentifiers []*TableSignedIdentifier // READ-ONLY; Table name under the specified account TableName *string }
func (TableProperties) MarshalJSON ¶ added in v0.5.0
func (t TableProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableProperties.
func (*TableProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TableProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableProperties.
type TableServiceProperties ¶
type TableServiceProperties struct { // The properties of a storage account’s Table service. TableServiceProperties *TableServicePropertiesProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TableServiceProperties - The properties of a storage account’s Table service.
func (TableServiceProperties) MarshalJSON ¶
func (t TableServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableServiceProperties.
func (*TableServiceProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TableServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableServiceProperties.
type TableServicePropertiesProperties ¶
type TableServicePropertiesProperties struct { // Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule // elements are included in the request body, all CORS rules will be deleted, and // CORS will be disabled for the Table service. Cors *CorsRules }
TableServicePropertiesProperties - The properties of a storage account’s Table service.
func (TableServicePropertiesProperties) MarshalJSON ¶ added in v1.1.0
func (t TableServicePropertiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableServicePropertiesProperties.
func (*TableServicePropertiesProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TableServicePropertiesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableServicePropertiesProperties.
type TableServicesClient ¶
type TableServicesClient struct {
// contains filtered or unexported fields
}
TableServicesClient contains the methods for the TableServices group. Don't use this type directly, use NewTableServicesClient() instead.
func NewTableServicesClient ¶
func NewTableServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableServicesClient, error)
NewTableServicesClient creates a new instance of TableServicesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TableServicesClient) GetServiceProperties ¶
func (client *TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientGetServicePropertiesOptions) (TableServicesClientGetServicePropertiesResponse, error)
GetServiceProperties - Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableServicesClient().GetServiceProperties(ctx, "res4410", "sto8607", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TableServiceProperties = armstorage.TableServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // } }
Output:
func (*TableServicesClient) List ¶
func (client *TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string, options *TableServicesClientListOptions) (TableServicesClientListResponse, error)
List - List all table services for the storage account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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.
- options - TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableServicesClient().List(ctx, "res9290", "sto1590", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ListTableServices = armstorage.ListTableServices{ // Value: []*armstorage.TableServiceProperties{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // }}, // } }
Output:
func (*TableServicesClient) SetServiceProperties ¶
func (client *TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties, options *TableServicesClientSetServicePropertiesOptions) (TableServicesClientSetServicePropertiesResponse, error)
SetServiceProperties - Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- 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 properties of a storage account’s Table service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified.
- options - TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableServicesClient().SetServiceProperties(ctx, "res4410", "sto8607", armstorage.TableServiceProperties{ TableServiceProperties: &armstorage.TableServicePropertiesProperties{ Cors: &armstorage.CorsRules{ CorsRules: []*armstorage.CorsRule{ { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.contoso.com"), to.Ptr("http://www.fabrikam.com")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-*")}, MaxAgeInSeconds: to.Ptr[int32](100), }, { AllowedHeaders: []*string{ to.Ptr("*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, AllowedOrigins: []*string{ to.Ptr("*")}, ExposedHeaders: []*string{ to.Ptr("*")}, MaxAgeInSeconds: to.Ptr[int32](2), }, { AllowedHeaders: []*string{ to.Ptr("x-ms-meta-12345675754564*")}, AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, AllowedOrigins: []*string{ to.Ptr("http://www.abc23.com"), to.Ptr("https://www.fabrikam.com/*")}, ExposedHeaders: []*string{ to.Ptr("x-ms-meta-abc"), to.Ptr("x-ms-meta-data*"), to.Ptr("x-ms-meta-target*")}, MaxAgeInSeconds: to.Ptr[int32](2000), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TableServiceProperties = armstorage.TableServiceProperties{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/tableServices"), // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default"), // TableServiceProperties: &armstorage.TableServicePropertiesProperties{ // Cors: &armstorage.CorsRules{ // CorsRules: []*armstorage.CorsRule{ // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemHEAD), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPOST), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemOPTIONS), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemMERGE), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.contoso.com"), // to.Ptr("http://www.fabrikam.com")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-*")}, // MaxAgeInSeconds: to.Ptr[int32](100), // }, // { // AllowedHeaders: []*string{ // to.Ptr("*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET)}, // AllowedOrigins: []*string{ // to.Ptr("*")}, // ExposedHeaders: []*string{ // to.Ptr("*")}, // MaxAgeInSeconds: to.Ptr[int32](2), // }, // { // AllowedHeaders: []*string{ // to.Ptr("x-ms-meta-12345675754564*")}, // AllowedMethods: []*armstorage.CorsRuleAllowedMethodsItem{ // to.Ptr(armstorage.CorsRuleAllowedMethodsItemGET), // to.Ptr(armstorage.CorsRuleAllowedMethodsItemPUT)}, // AllowedOrigins: []*string{ // to.Ptr("http://www.abc23.com"), // to.Ptr("https://www.fabrikam.com/*")}, // ExposedHeaders: []*string{ // to.Ptr("x-ms-meta-abc"), // to.Ptr("x-ms-meta-data*"), // to.Ptr("x-ms-meta-target*")}, // MaxAgeInSeconds: to.Ptr[int32](2000), // }}, // }, // }, // } }
Output:
type TableServicesClientGetServicePropertiesOptions ¶ added in v0.3.0
type TableServicesClientGetServicePropertiesOptions struct { }
TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties method.
type TableServicesClientGetServicePropertiesResponse ¶ added in v0.3.0
type TableServicesClientGetServicePropertiesResponse struct { // The properties of a storage account’s Table service. TableServiceProperties }
TableServicesClientGetServicePropertiesResponse contains the response from method TableServicesClient.GetServiceProperties.
type TableServicesClientListOptions ¶ added in v0.3.0
type TableServicesClientListOptions struct { }
TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method.
type TableServicesClientListResponse ¶ added in v0.3.0
type TableServicesClientListResponse struct {
ListTableServices
}
TableServicesClientListResponse contains the response from method TableServicesClient.List.
type TableServicesClientSetServicePropertiesOptions ¶ added in v0.3.0
type TableServicesClientSetServicePropertiesOptions struct { }
TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties method.
type TableServicesClientSetServicePropertiesResponse ¶ added in v0.3.0
type TableServicesClientSetServicePropertiesResponse struct { // The properties of a storage account’s Table service. TableServiceProperties }
TableServicesClientSetServicePropertiesResponse contains the response from method TableServicesClient.SetServiceProperties.
type TableSignedIdentifier ¶ added in v0.5.0
type TableSignedIdentifier struct { // REQUIRED; unique-64-character-value of the stored access policy. ID *string // Access policy AccessPolicy *TableAccessPolicy }
TableSignedIdentifier - Object to set Table Access Policy.
func (TableSignedIdentifier) MarshalJSON ¶ added in v1.1.0
func (t TableSignedIdentifier) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableSignedIdentifier.
func (*TableSignedIdentifier) UnmarshalJSON ¶ added in v1.1.0
func (t *TableSignedIdentifier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableSignedIdentifier.
type TagFilter ¶
type TagFilter struct { // REQUIRED; This is the filter tag name, it can have 1 - 128 characters Name *string // REQUIRED; This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) // is currently supported Op *string // REQUIRED; This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters Value *string }
TagFilter - Blob index tag based filtering for blob objects
func (TagFilter) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type TagFilter.
func (*TagFilter) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type TagFilter.
type TagProperty ¶
type TagProperty struct { // READ-ONLY; Returns the Object ID of the user who added the tag. ObjectIdentifier *string // READ-ONLY; The tag value. Tag *string // READ-ONLY; Returns the Tenant ID that issued the token for the user who added the tag. TenantID *string // READ-ONLY; Returns the date and time the tag was added. Timestamp *time.Time // READ-ONLY; Returns the User Principal Name of the user who added the tag. Upn *string }
TagProperty - A tag of the LegalHold of a blob container.
func (TagProperty) MarshalJSON ¶
func (t TagProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TagProperty.
func (*TagProperty) UnmarshalJSON ¶
func (t *TagProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TagProperty.
type TaskAssignment ¶ added in v1.6.0
type TaskAssignment struct { // REQUIRED; Properties of the storage task assignment. Properties *TaskAssignmentProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TaskAssignment - The storage task assignment.
func (TaskAssignment) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignment.
func (*TaskAssignment) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignment.
type TaskAssignmentExecutionContext ¶ added in v1.6.0
type TaskAssignmentExecutionContext struct { // REQUIRED; Execution trigger of the storage task assignment Trigger *ExecutionTrigger // Execution target of the storage task assignment Target *ExecutionTarget }
TaskAssignmentExecutionContext - Execution context of the storage task assignment.
func (TaskAssignmentExecutionContext) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentExecutionContext) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentExecutionContext.
func (*TaskAssignmentExecutionContext) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentExecutionContext) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentExecutionContext.
type TaskAssignmentInstancesReportClient ¶ added in v1.6.0
type TaskAssignmentInstancesReportClient struct {
// contains filtered or unexported fields
}
TaskAssignmentInstancesReportClient contains the methods for the StorageTaskAssignmentInstancesReport group. Don't use this type directly, use NewTaskAssignmentInstancesReportClient() instead.
func NewTaskAssignmentInstancesReportClient ¶ added in v1.6.0
func NewTaskAssignmentInstancesReportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentInstancesReportClient, error)
NewTaskAssignmentInstancesReportClient creates a new instance of TaskAssignmentInstancesReportClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TaskAssignmentInstancesReportClient) NewListPager ¶ added in v1.6.0
func (client *TaskAssignmentInstancesReportClient) NewListPager(resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentInstancesReportClientListResponse]
NewListPager - Fetch the report summary of a single storage task assignment's instances
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- options - TaskAssignmentInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentInstancesReportClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTaskAssignmentInstancesReportClient().NewListPager("res4228", "sto4445", "myassignment1", &armstorage.TaskAssignmentInstancesReportClientListOptions{Maxpagesize: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TaskReportSummary = armstorage.TaskReportSummary{ // Value: []*armstorage.TaskReportInstance{ // { // Name: to.Ptr("instance1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance1"), // Properties: &armstorage.TaskReportProperties{ // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), // ObjectFailedCount: to.Ptr("0"), // ObjectsOperatedOnCount: to.Ptr("150"), // ObjectsSucceededCount: to.Ptr("150"), // ObjectsTargetedCount: to.Ptr("150"), // RunResult: to.Ptr(armstorage.RunResultSucceeded), // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), // RunStatusError: to.Ptr("0"), // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // TaskVersion: to.Ptr("1"), // }, // }, // { // Name: to.Ptr("instance2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance2"), // Properties: &armstorage.TaskReportProperties{ // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), // ObjectFailedCount: to.Ptr("0"), // ObjectsOperatedOnCount: to.Ptr("150"), // ObjectsSucceededCount: to.Ptr("150"), // ObjectsTargetedCount: to.Ptr("150"), // RunResult: to.Ptr(armstorage.RunResultSucceeded), // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), // RunStatusError: to.Ptr("0"), // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // TaskVersion: to.Ptr("1"), // }, // }}, // } } }
Output:
type TaskAssignmentInstancesReportClientListOptions ¶ added in v1.6.0
type TaskAssignmentInstancesReportClientListOptions struct { // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for // details. Filter *string // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. Maxpagesize *int32 }
TaskAssignmentInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentInstancesReportClient.NewListPager method.
type TaskAssignmentInstancesReportClientListResponse ¶ added in v1.6.0
type TaskAssignmentInstancesReportClientListResponse struct { // Fetch Storage Tasks Run Summary. TaskReportSummary }
TaskAssignmentInstancesReportClientListResponse contains the response from method TaskAssignmentInstancesReportClient.NewListPager.
type TaskAssignmentProperties ¶ added in v1.6.0
type TaskAssignmentProperties struct { // REQUIRED; Text that describes the purpose of the storage task assignment Description *string // REQUIRED; Whether the storage task assignment is enabled or not Enabled *bool // REQUIRED; The storage task assignment execution context ExecutionContext *TaskAssignmentExecutionContext // REQUIRED; The storage task assignment report Report *TaskAssignmentReport // REQUIRED; Id of the corresponding storage task TaskID *string // Run status of storage task assignment RunStatus *TaskReportProperties // READ-ONLY; Represents the provisioning state of the storage task assignment. ProvisioningState *ProvisioningState }
TaskAssignmentProperties - Properties of the storage task assignment.
func (TaskAssignmentProperties) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentProperties.
func (*TaskAssignmentProperties) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentProperties.
type TaskAssignmentReport ¶ added in v1.6.0
type TaskAssignmentReport struct { // REQUIRED; The container prefix for the location of storage task assignment report Prefix *string }
TaskAssignmentReport - The storage task assignment report
func (TaskAssignmentReport) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentReport) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentReport.
func (*TaskAssignmentReport) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentReport) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentReport.
type TaskAssignmentUpdateExecutionContext ¶ added in v1.6.0
type TaskAssignmentUpdateExecutionContext struct { // Execution target of the storage task assignment Target *ExecutionTarget // Execution trigger of the storage task assignment Trigger *ExecutionTriggerUpdate }
TaskAssignmentUpdateExecutionContext - Execution context of the storage task assignment update.
func (TaskAssignmentUpdateExecutionContext) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentUpdateExecutionContext) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateExecutionContext.
func (*TaskAssignmentUpdateExecutionContext) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentUpdateExecutionContext) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateExecutionContext.
type TaskAssignmentUpdateParameters ¶ added in v1.6.0
type TaskAssignmentUpdateParameters struct { // Properties of the storage task assignment. Properties *TaskAssignmentUpdateProperties }
TaskAssignmentUpdateParameters - Parameters of the storage task assignment update request
func (TaskAssignmentUpdateParameters) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateParameters.
func (*TaskAssignmentUpdateParameters) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateParameters.
type TaskAssignmentUpdateProperties ¶ added in v1.6.0
type TaskAssignmentUpdateProperties struct { // Text that describes the purpose of the storage task assignment Description *string // Whether the storage task assignment is enabled or not Enabled *bool // The storage task assignment execution context ExecutionContext *TaskAssignmentUpdateExecutionContext // The storage task assignment report Report *TaskAssignmentUpdateReport // Run status of storage task assignment RunStatus *TaskReportProperties // READ-ONLY; Represents the provisioning state of the storage task assignment. ProvisioningState *ProvisioningState // READ-ONLY; Id of the corresponding storage task TaskID *string }
TaskAssignmentUpdateProperties - Properties of the storage task update assignment.
func (TaskAssignmentUpdateProperties) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateProperties.
func (*TaskAssignmentUpdateProperties) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateProperties.
type TaskAssignmentUpdateReport ¶ added in v1.6.0
type TaskAssignmentUpdateReport struct { // The prefix of the storage task assignment report Prefix *string }
TaskAssignmentUpdateReport - The storage task assignment report
func (TaskAssignmentUpdateReport) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentUpdateReport) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentUpdateReport.
func (*TaskAssignmentUpdateReport) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentUpdateReport) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentUpdateReport.
type TaskAssignmentsClient ¶ added in v1.6.0
type TaskAssignmentsClient struct {
// contains filtered or unexported fields
}
TaskAssignmentsClient contains the methods for the StorageTaskAssignments group. Don't use this type directly, use NewTaskAssignmentsClient() instead.
func NewTaskAssignmentsClient ¶ added in v1.6.0
func NewTaskAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentsClient, error)
NewTaskAssignmentsClient creates a new instance of TaskAssignmentsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TaskAssignmentsClient) BeginCreate ¶ added in v1.6.0
func (client *TaskAssignmentsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignment, options *TaskAssignmentsClientBeginCreateOptions) (*runtime.Poller[TaskAssignmentsClientCreateResponse], error)
BeginCreate - Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- parameters - The parameters to create a Storage Task Assignment.
- options - TaskAssignmentsClientBeginCreateOptions contains the optional parameters for the TaskAssignmentsClient.BeginCreate method.
Example (PutStorageTaskAssignment) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTaskAssignmentsClient().BeginCreate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignment{ Properties: &armstorage.TaskAssignmentProperties{ Description: to.Ptr("My Storage task assignment"), Enabled: to.Ptr(true), ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ Target: &armstorage.ExecutionTarget{ ExcludePrefix: []*string{}, Prefix: []*string{ to.Ptr("prefix1"), to.Ptr("prefix2")}, }, Trigger: &armstorage.ExecutionTrigger{ Type: to.Ptr(armstorage.TriggerTypeRunOnce), Parameters: &armstorage.TriggerParameters{ StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), }, }, }, Report: &armstorage.TaskAssignmentReport{ Prefix: to.Ptr("container1"), }, TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TaskAssignment = armstorage.TaskAssignment{ // Name: to.Ptr("myassignment1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Target: &armstorage.ExecutionTarget{ // ExcludePrefix: []*string{ // }, // Prefix: []*string{ // to.Ptr("prefix1"), // to.Ptr("prefix2")}, // }, // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container1"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // }, // } }
Output:
Example (PutStorageTaskAssignmentRequiredProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTaskAssignmentsClient().BeginCreate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignment{ Properties: &armstorage.TaskAssignmentProperties{ Description: to.Ptr("My Storage task assignment"), Enabled: to.Ptr(true), ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ Trigger: &armstorage.ExecutionTrigger{ Type: to.Ptr(armstorage.TriggerTypeRunOnce), Parameters: &armstorage.TriggerParameters{ StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), }, }, }, Report: &armstorage.TaskAssignmentReport{ Prefix: to.Ptr("container1"), }, TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TaskAssignment = armstorage.TaskAssignment{ // Name: to.Ptr("myassignment1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container1"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // }, // } }
Output:
func (*TaskAssignmentsClient) BeginDelete ¶ added in v1.6.0
func (client *TaskAssignmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientBeginDeleteOptions) (*runtime.Poller[TaskAssignmentsClientDeleteResponse], error)
BeginDelete - Delete the storage task assignment sub-resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- options - TaskAssignmentsClientBeginDeleteOptions contains the optional parameters for the TaskAssignmentsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTaskAssignmentsClient().BeginDelete(ctx, "res4228", "sto4445", "myassignment1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*TaskAssignmentsClient) BeginUpdate ¶ added in v1.6.0
func (client *TaskAssignmentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, parameters TaskAssignmentUpdateParameters, options *TaskAssignmentsClientBeginUpdateOptions) (*runtime.Poller[TaskAssignmentsClientUpdateResponse], error)
BeginUpdate - Update storage task assignment properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- parameters - The parameters to update a Storage Task Assignment.
- options - TaskAssignmentsClientBeginUpdateOptions contains the optional parameters for the TaskAssignmentsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTaskAssignmentsClient().BeginUpdate(ctx, "res4228", "sto4445", "myassignment1", armstorage.TaskAssignmentUpdateParameters{ Properties: &armstorage.TaskAssignmentUpdateProperties{ Description: to.Ptr("My Storage task assignment"), Enabled: to.Ptr(true), ExecutionContext: &armstorage.TaskAssignmentUpdateExecutionContext{ Target: &armstorage.ExecutionTarget{ ExcludePrefix: []*string{}, Prefix: []*string{ to.Ptr("prefix1"), to.Ptr("prefix2")}, }, Trigger: &armstorage.ExecutionTriggerUpdate{ Type: to.Ptr(armstorage.TriggerTypeRunOnce), Parameters: &armstorage.TriggerParametersUpdate{ StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t }()), }, }, }, Report: &armstorage.TaskAssignmentUpdateReport{ Prefix: to.Ptr("container1"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TaskAssignment = armstorage.TaskAssignment{ // Name: to.Ptr("myassignment1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Target: &armstorage.ExecutionTarget{ // ExcludePrefix: []*string{ // }, // Prefix: []*string{ // to.Ptr("prefix1"), // to.Ptr("prefix2")}, // }, // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container1"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // }, // } }
Output:
func (*TaskAssignmentsClient) Get ¶ added in v1.6.0
func (client *TaskAssignmentsClient) Get(ctx context.Context, resourceGroupName string, accountName string, storageTaskAssignmentName string, options *TaskAssignmentsClientGetOptions) (TaskAssignmentsClientGetResponse, error)
Get - Get the storage task assignment properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- storageTaskAssignmentName - The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- options - TaskAssignmentsClientGetOptions contains the optional parameters for the TaskAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTaskAssignmentsClient().Get(ctx, "res4228", "sto4445", "myassignment1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TaskAssignment = armstorage.TaskAssignment{ // Name: to.Ptr("myassignment1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Target: &armstorage.ExecutionTarget{ // ExcludePrefix: []*string{ // }, // Prefix: []*string{ // to.Ptr("prefix1"), // to.Ptr("prefix2")}, // }, // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container1"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // }, // } }
Output:
func (*TaskAssignmentsClient) NewListPager ¶ added in v1.6.0
func (client *TaskAssignmentsClient) NewListPager(resourceGroupName string, accountName string, options *TaskAssignmentsClientListOptions) *runtime.Pager[TaskAssignmentsClientListResponse]
NewListPager - List all the storage task assignments in an account
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- options - TaskAssignmentsClientListOptions contains the optional parameters for the TaskAssignmentsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTaskAssignmentsClient().NewListPager("res4228", "sto4445", &armstorage.TaskAssignmentsClientListOptions{Maxpagesize: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TaskAssignmentsList = armstorage.TaskAssignmentsList{ // Value: []*armstorage.TaskAssignment{ // { // Name: to.Ptr("myassignment1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment #1"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Target: &armstorage.ExecutionTarget{ // ExcludePrefix: []*string{ // }, // Prefix: []*string{ // to.Ptr("prefix1"), // to.Ptr("prefix2")}, // }, // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container1"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // }, // }, // { // Name: to.Ptr("myassignment2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/storageTaskAssignments"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment2"), // Properties: &armstorage.TaskAssignmentProperties{ // Description: to.Ptr("My Storage task assignment #2"), // Enabled: to.Ptr(true), // ExecutionContext: &armstorage.TaskAssignmentExecutionContext{ // Target: &armstorage.ExecutionTarget{ // ExcludePrefix: []*string{ // }, // Prefix: []*string{ // to.Ptr("prefix3"), // to.Ptr("prefix4")}, // }, // Trigger: &armstorage.ExecutionTrigger{ // Type: to.Ptr(armstorage.TriggerTypeRunOnce), // Parameters: &armstorage.TriggerParameters{ // StartOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-15T21:52:47.814Z"); return t}()), // }, // }, // }, // ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded), // Report: &armstorage.TaskAssignmentReport{ // Prefix: to.Ptr("container2"), // }, // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask2"), // }, // }}, // } } }
Output:
type TaskAssignmentsClientBeginCreateOptions ¶ added in v1.6.0
type TaskAssignmentsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TaskAssignmentsClientBeginCreateOptions contains the optional parameters for the TaskAssignmentsClient.BeginCreate method.
type TaskAssignmentsClientBeginDeleteOptions ¶ added in v1.6.0
type TaskAssignmentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TaskAssignmentsClientBeginDeleteOptions contains the optional parameters for the TaskAssignmentsClient.BeginDelete method.
type TaskAssignmentsClientBeginUpdateOptions ¶ added in v1.6.0
type TaskAssignmentsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TaskAssignmentsClientBeginUpdateOptions contains the optional parameters for the TaskAssignmentsClient.BeginUpdate method.
type TaskAssignmentsClientCreateResponse ¶ added in v1.6.0
type TaskAssignmentsClientCreateResponse struct { // The storage task assignment. TaskAssignment }
TaskAssignmentsClientCreateResponse contains the response from method TaskAssignmentsClient.BeginCreate.
type TaskAssignmentsClientDeleteResponse ¶ added in v1.6.0
type TaskAssignmentsClientDeleteResponse struct { }
TaskAssignmentsClientDeleteResponse contains the response from method TaskAssignmentsClient.BeginDelete.
type TaskAssignmentsClientGetOptions ¶ added in v1.6.0
type TaskAssignmentsClientGetOptions struct { }
TaskAssignmentsClientGetOptions contains the optional parameters for the TaskAssignmentsClient.Get method.
type TaskAssignmentsClientGetResponse ¶ added in v1.6.0
type TaskAssignmentsClientGetResponse struct { // The storage task assignment. TaskAssignment }
TaskAssignmentsClientGetResponse contains the response from method TaskAssignmentsClient.Get.
type TaskAssignmentsClientListOptions ¶ added in v1.6.0
type TaskAssignmentsClientListOptions struct { // Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. Maxpagesize *int32 }
TaskAssignmentsClientListOptions contains the optional parameters for the TaskAssignmentsClient.NewListPager method.
type TaskAssignmentsClientListResponse ¶ added in v1.6.0
type TaskAssignmentsClientListResponse struct { // List of storage task assignments for the storage account TaskAssignmentsList }
TaskAssignmentsClientListResponse contains the response from method TaskAssignmentsClient.NewListPager.
type TaskAssignmentsClientUpdateResponse ¶ added in v1.6.0
type TaskAssignmentsClientUpdateResponse struct { // The storage task assignment. TaskAssignment }
TaskAssignmentsClientUpdateResponse contains the response from method TaskAssignmentsClient.BeginUpdate.
type TaskAssignmentsInstancesReportClient ¶ added in v1.6.0
type TaskAssignmentsInstancesReportClient struct {
// contains filtered or unexported fields
}
TaskAssignmentsInstancesReportClient contains the methods for the StorageTaskAssignmentsInstancesReport group. Don't use this type directly, use NewTaskAssignmentsInstancesReportClient() instead.
func NewTaskAssignmentsInstancesReportClient ¶ added in v1.6.0
func NewTaskAssignmentsInstancesReportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TaskAssignmentsInstancesReportClient, error)
NewTaskAssignmentsInstancesReportClient creates a new instance of TaskAssignmentsInstancesReportClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TaskAssignmentsInstancesReportClient) NewListPager ¶ added in v1.6.0
func (client *TaskAssignmentsInstancesReportClient) NewListPager(resourceGroupName string, accountName string, options *TaskAssignmentsInstancesReportClientListOptions) *runtime.Pager[TaskAssignmentsInstancesReportClientListResponse]
NewListPager - Fetch the report summary of all the storage task assignments and instances in an account
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. 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.
- options - TaskAssignmentsInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentsInstancesReportClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTaskAssignmentsInstancesReportClient().NewListPager("res4228", "sto4445", &armstorage.TaskAssignmentsInstancesReportClientListOptions{Maxpagesize: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TaskReportSummary = armstorage.TaskReportSummary{ // Value: []*armstorage.TaskReportInstance{ // { // Name: to.Ptr("instance1"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance1"), // Properties: &armstorage.TaskReportProperties{ // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), // ObjectFailedCount: to.Ptr("0"), // ObjectsOperatedOnCount: to.Ptr("150"), // ObjectsSucceededCount: to.Ptr("150"), // ObjectsTargetedCount: to.Ptr("150"), // RunResult: to.Ptr(armstorage.RunResultSucceeded), // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), // RunStatusError: to.Ptr("0"), // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1"), // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // TaskVersion: to.Ptr("1"), // }, // }, // { // Name: to.Ptr("instance2"), // Type: to.Ptr("Microsoft.Storage/storageAccounts/reports"), // ID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/instance2"), // Properties: &armstorage.TaskReportProperties{ // FinishTime: to.Ptr("2023-06-23T00:40:10.2931264Z"), // ObjectFailedCount: to.Ptr("0"), // ObjectsOperatedOnCount: to.Ptr("150"), // ObjectsSucceededCount: to.Ptr("150"), // ObjectsTargetedCount: to.Ptr("150"), // RunResult: to.Ptr(armstorage.RunResultSucceeded), // RunStatusEnum: to.Ptr(armstorage.RunStatusEnumFinished), // RunStatusError: to.Ptr("0"), // StartTime: to.Ptr("2023-06-23T00:30:43.226744Z"), // StorageAccountID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445"), // SummaryReportPath: to.Ptr("https://acc123.blob.core.windows.net/result-container/{folderpath}/SummaryReport.json"), // TaskAssignmentID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment2"), // TaskID: to.Ptr("/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourcegroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1"), // TaskVersion: to.Ptr("1"), // }, // }}, // } } }
Output:
type TaskAssignmentsInstancesReportClientListOptions ¶ added in v1.6.0
type TaskAssignmentsInstancesReportClientListOptions struct { // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for // details. Filter *string // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. Maxpagesize *int32 }
TaskAssignmentsInstancesReportClientListOptions contains the optional parameters for the TaskAssignmentsInstancesReportClient.NewListPager method.
type TaskAssignmentsInstancesReportClientListResponse ¶ added in v1.6.0
type TaskAssignmentsInstancesReportClientListResponse struct { // Fetch Storage Tasks Run Summary. TaskReportSummary }
TaskAssignmentsInstancesReportClientListResponse contains the response from method TaskAssignmentsInstancesReportClient.NewListPager.
type TaskAssignmentsList ¶ added in v1.6.0
type TaskAssignmentsList struct { // READ-ONLY; Request URL that can be used to query next page of storage task assignments. Returned when total number of requested // storage task assignments exceed maximum page size. NextLink *string // READ-ONLY; Gets the list of storage task assignments and their properties. Value []*TaskAssignment }
TaskAssignmentsList - List of storage task assignments for the storage account
func (TaskAssignmentsList) MarshalJSON ¶ added in v1.6.0
func (t TaskAssignmentsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskAssignmentsList.
func (*TaskAssignmentsList) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskAssignmentsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskAssignmentsList.
type TaskReportInstance ¶ added in v1.6.0
type TaskReportInstance struct { // Storage task execution report for a run instance. Properties *TaskReportProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TaskReportInstance - Storage Tasks run report instance
func (TaskReportInstance) MarshalJSON ¶ added in v1.6.0
func (t TaskReportInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskReportInstance.
func (*TaskReportInstance) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskReportInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportInstance.
type TaskReportProperties ¶ added in v1.6.0
type TaskReportProperties struct { // READ-ONLY; End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison // operators can be used as described for DateTime properties in // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators FinishTime *string // READ-ONLY; Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount // eq 0 and other comparison operators can be used as described for Numerical properties // in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectFailedCount *string // READ-ONLY; Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as // objectsOperatedOnCount ge 100 and other comparison operators can be used as described for // Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsOperatedOnCount *string // READ-ONLY; Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount // gt 150 and other comparison operators can be used as described for Numerical // properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsSucceededCount *string // READ-ONLY; Total number of objects that meet the condition as defined in the storage task assignment execution context. // Filter options such as objectsTargetedCount gt 50 and other comparison operators can be // used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsTargetedCount *string // READ-ONLY; Represents the overall result of the execution for the run instance RunResult *RunResult // READ-ONLY; Represents the status of the execution. RunStatusEnum *RunStatusEnum // READ-ONLY; Well known Azure Storage error code that represents the error encountered during execution of the run instance. RunStatusError *string // READ-ONLY; Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other // comparison operators can be used as described for DateTime properties in // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators StartTime *string // READ-ONLY; Represents the Storage Account Id where the storage task definition was applied and executed. StorageAccountID *string // READ-ONLY; Full path to the verbose report stored in the reporting container as specified in the assignment execution context // for the storage account. SummaryReportPath *string // READ-ONLY; Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. TaskAssignmentID *string // READ-ONLY; Storage Task Arm Id. TaskID *string // READ-ONLY; Storage Task Version TaskVersion *string }
TaskReportProperties - Storage task execution report for a run instance.
func (TaskReportProperties) MarshalJSON ¶ added in v1.6.0
func (t TaskReportProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskReportProperties.
func (*TaskReportProperties) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskReportProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportProperties.
type TaskReportSummary ¶ added in v1.6.0
type TaskReportSummary struct { // READ-ONLY; Request URL that can be used to query next page of storage task run results summary. Returned when the number // of run instances and summary reports exceed maximum page size. NextLink *string // READ-ONLY; Gets storage tasks run result summary. Value []*TaskReportInstance }
TaskReportSummary - Fetch Storage Tasks Run Summary.
func (TaskReportSummary) MarshalJSON ¶ added in v1.6.0
func (t TaskReportSummary) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TaskReportSummary.
func (*TaskReportSummary) UnmarshalJSON ¶ added in v1.6.0
func (t *TaskReportSummary) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TaskReportSummary.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type TriggerParameters ¶ added in v1.6.0
type TriggerParameters struct { // When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' EndBy *time.Time // Run interval of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' Interval *int32 // Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this // property should not be present when ExecutionTrigger.properties.type is // 'RunOnce' IntervalUnit *string // When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' StartFrom *time.Time // When to start task execution. This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property // should not be present when ExecutionTrigger.properties.type is 'OnSchedule' StartOn *time.Time }
TriggerParameters - The trigger parameters update for the storage task assignment execution
func (TriggerParameters) MarshalJSON ¶ added in v1.6.0
func (t TriggerParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TriggerParameters.
func (*TriggerParameters) UnmarshalJSON ¶ added in v1.6.0
func (t *TriggerParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TriggerParameters.
type TriggerParametersUpdate ¶ added in v1.6.0
type TriggerParametersUpdate struct { // When to end task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' EndBy *time.Time // Run interval of task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' Interval *int32 // Run interval unit of task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this // property should not be present when ExecutionTrigger.properties.type is // 'RunOnce' IntervalUnit *string // When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property // should not be present when ExecutionTrigger.properties.type is 'RunOnce' StartFrom *time.Time // When to start task execution. This is a mutable field when ExecutionTrigger.properties.type is 'RunOnce'; this property // should not be present when ExecutionTrigger.properties.type is 'OnSchedule' StartOn *time.Time }
TriggerParametersUpdate - The trigger parameters update for the storage task assignment execution
func (TriggerParametersUpdate) MarshalJSON ¶ added in v1.6.0
func (t TriggerParametersUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TriggerParametersUpdate.
func (*TriggerParametersUpdate) UnmarshalJSON ¶ added in v1.6.0
func (t *TriggerParametersUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TriggerParametersUpdate.
type TriggerType ¶ added in v1.6.0
type TriggerType string
TriggerType - The trigger type of the storage task assignment execution
const ( TriggerTypeOnSchedule TriggerType = "OnSchedule" TriggerTypeRunOnce TriggerType = "RunOnce" )
func PossibleTriggerTypeValues ¶ added in v1.6.0
func PossibleTriggerTypeValues() []TriggerType
PossibleTriggerTypeValues returns the possible values for the TriggerType const type.
type UpdateHistoryProperty ¶
type UpdateHistoryProperty struct { // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // an append blob while maintaining immutability protection and compliance. Only // new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy // API. AllowProtectedAppendWrites *bool // This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to // both 'Append and Bock Blobs' while maintaining immutability protection and // compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be // changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and // 'allowProtectedAppendWritesAll' properties are mutually exclusive. AllowProtectedAppendWritesAll *bool // READ-ONLY; The immutability period for the blobs in the container since the policy creation, in days. ImmutabilityPeriodSinceCreationInDays *int32 // READ-ONLY; Returns the Object ID of the user who updated the ImmutabilityPolicy. ObjectIdentifier *string // READ-ONLY; Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. TenantID *string // READ-ONLY; Returns the date and time the ImmutabilityPolicy was updated. Timestamp *time.Time // READ-ONLY; The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Update *ImmutabilityPolicyUpdateType // READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. Upn *string }
UpdateHistoryProperty - An update history of the ImmutabilityPolicy of a blob container.
func (UpdateHistoryProperty) MarshalJSON ¶
func (u UpdateHistoryProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateHistoryProperty.
func (*UpdateHistoryProperty) UnmarshalJSON ¶
func (u *UpdateHistoryProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateHistoryProperty.
type Usage ¶
type Usage struct { // READ-ONLY; Gets the current count of the allocated resources in the subscription. CurrentValue *int32 // READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription. Limit *int32 // READ-ONLY; Gets the name of the type of usage. Name *UsageName // READ-ONLY; Gets the unit of measurement. Unit *UsageUnit }
Usage - Describes Storage Resource Usage.
func (Usage) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsageListResult ¶
type UsageListResult struct { // Gets or sets the list of Storage Resource Usages. Value []*Usage }
UsageListResult - The response from the List Usages operation.
func (UsageListResult) MarshalJSON ¶
func (u UsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageListResult.
func (*UsageListResult) UnmarshalJSON ¶ added in v1.1.0
func (u *UsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageListResult.
type UsageName ¶
type UsageName struct { // READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string // READ-ONLY; Gets a string describing the resource name. Value *string }
UsageName - The usage names that can be used; currently limited to StorageAccount.
func (UsageName) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type UsageName.
func (*UsageName) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.
type UsageUnit ¶
type UsageUnit string
UsageUnit - Gets the unit of measurement.
func PossibleUsageUnitValues ¶
func PossibleUsageUnitValues() []UsageUnit
PossibleUsageUnitValues returns the possible values for the UsageUnit const type.
type UsagesClient ¶
type UsagesClient struct {
// contains filtered or unexported fields
}
UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.
func NewUsagesClient ¶
func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)
NewUsagesClient creates a new instance of UsagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsagesClient) NewListByLocationPager ¶ added in v0.6.0
func (client *UsagesClient) NewListByLocationPager(location string, options *UsagesClientListByLocationOptions) *runtime.Pager[UsagesClientListByLocationResponse]
NewListByLocationPager - Gets the current usage count and the limit for the resources of the location under the subscription.
Generated from API version 2023-05-01
- location - The location of the Azure Storage resource.
- options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsagesClient().NewListByLocationPager("eastus2(stage)", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsageListResult = armstorage.UsageListResult{ // Value: []*armstorage.Usage{ // { // Name: &armstorage.UsageName{ // LocalizedValue: to.Ptr("Storage Accounts"), // Value: to.Ptr("StorageAccounts"), // }, // CurrentValue: to.Ptr[int32](55), // Limit: to.Ptr[int32](250), // Unit: to.Ptr(armstorage.UsageUnitCount), // }}, // } } }
Output:
type UsagesClientListByLocationOptions ¶ added in v0.3.0
type UsagesClientListByLocationOptions struct { }
UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.
type UsagesClientListByLocationResponse ¶ added in v0.3.0
type UsagesClientListByLocationResponse struct { // The response from the List Usages operation. UsageListResult }
UsagesClientListByLocationResponse contains the response from method UsagesClient.NewListByLocationPager.
type UserAssignedIdentity ¶
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the identity. ClientID *string // READ-ONLY; The principal ID of the identity. PrincipalID *string }
UserAssignedIdentity for the resource.
func (UserAssignedIdentity) MarshalJSON ¶ added in v1.1.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v1.1.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VirtualNetworkRule ¶
type VirtualNetworkRule struct { // REQUIRED; Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. VirtualNetworkResourceID *string // The action of virtual network rule. Action *string // Gets the state of virtual network rule. State *State }
VirtualNetworkRule - Virtual Network rule.
func (VirtualNetworkRule) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.
func (*VirtualNetworkRule) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.
Source Files ¶
- accounts_client.go
- blobcontainers_client.go
- blobinventorypolicies_client.go
- blobservices_client.go
- build.go
- client_factory.go
- constants.go
- deletedaccounts_client.go
- encryptionscopes_client.go
- fileservices_client.go
- fileshares_client.go
- localusers_client.go
- managementpolicies_client.go
- models.go
- models_serde.go
- networksecurityperimeterconfigurations_client.go
- objectreplicationpolicies_client.go
- operations_client.go
- options.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- queue_client.go
- queueservices_client.go
- responses.go
- skus_client.go
- table_client.go
- tableservices_client.go
- taskassignmentinstancesreport_client.go
- taskassignments_client.go
- taskassignmentsinstancesreport_client.go
- time_rfc3339.go
- usages_client.go